Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hhhrrrttt222111
GitHub Repository: hhhrrrttt222111/Dorkify
Path: blob/master/venv/Lib/site-packages/setuptools/command/dist_info.py
811 views
1
"""
2
Create a dist_info directory
3
As defined in the wheel specification
4
"""
5
6
import os
7
8
from distutils.core import Command
9
from distutils import log
10
11
12
class dist_info(Command):
13
14
description = 'create a .dist-info directory'
15
16
user_options = [
17
('egg-base=', 'e', "directory containing .egg-info directories"
18
" (default: top of the source tree)"),
19
]
20
21
def initialize_options(self):
22
self.egg_base = None
23
24
def finalize_options(self):
25
pass
26
27
def run(self):
28
egg_info = self.get_finalized_command('egg_info')
29
egg_info.egg_base = self.egg_base
30
egg_info.finalize_options()
31
egg_info.run()
32
dist_info_dir = egg_info.egg_info[:-len('.egg-info')] + '.dist-info'
33
log.info("creating '{}'".format(os.path.abspath(dist_info_dir)))
34
35
bdist_wheel = self.get_finalized_command('bdist_wheel')
36
bdist_wheel.egg2dist(egg_info.egg_info, dist_info_dir)
37
38