Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
0a3e5710
Commit
0a3e5710
authored
Jun 08, 2000
by
Greg Ward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cosmetic tweaks to imports, the 'show_formats()' function, and the
'help_options' list; also added an editorial comment.
parent
33a33497
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
11 deletions
+19
-11
command/sdist.py
command/sdist.py
+19
-11
No files found.
command/sdist.py
View file @
0a3e5710
...
@@ -11,9 +11,9 @@ import fnmatch
...
@@ -11,9 +11,9 @@ import fnmatch
from
types
import
*
from
types
import
*
from
glob
import
glob
from
glob
import
glob
from
distutils.core
import
Command
from
distutils.core
import
Command
from
distutils.util
import
newer
,
create_tree
,
remove_tree
,
convert_path
,
\
from
distutils.util
import
\
write_file
convert_path
,
create_tree
,
remove_tree
,
newer
,
write_file
,
\
from
distutils.archive_util
import
check_archive_formats
,
ARCHIVE_FORMATS
check_archive_formats
,
ARCHIVE_FORMATS
from
distutils.text_file
import
TextFile
from
distutils.text_file
import
TextFile
from
distutils.errors
import
DistutilsExecError
,
DistutilsOptionError
from
distutils.errors
import
DistutilsExecError
,
DistutilsOptionError
...
@@ -40,19 +40,27 @@ class sdist (Command):
...
@@ -40,19 +40,27 @@ class sdist (Command):
"keep the distribution tree around after creating "
+
"keep the distribution tree around after creating "
+
"archive file(s)"
),
"archive file(s)"
),
]
]
# prints all possible arguments to --formats
def
show_formats
():
# XXX ugh: this has to precede the 'help_options' list, because
# it is mentioned there -- also, this is not a method, even though
# it's defined in a class: double-ugh!
def
show_formats
():
"""Print all possible values for the 'formats' option -- used by
the "--help-formats" command-line option.
"""
from
distutils.fancy_getopt
import
FancyGetopt
from
distutils.fancy_getopt
import
FancyGetopt
list_of_
formats
=
[]
formats
=
[]
for
format
in
ARCHIVE_FORMATS
.
keys
():
for
format
in
ARCHIVE_FORMATS
.
keys
():
list_of_formats
.
append
((
"formats="
+
format
,
None
,
ARCHIVE_FORMATS
[
format
][
2
]))
formats
.
append
((
"formats="
+
format
,
None
,
ARCHIVE_FORMATS
[
format
][
2
]))
list_of_formats
.
sort
()
formats
.
sort
()
pretty_printer
=
FancyGetopt
(
list_of_formats
)
pretty_printer
=
FancyGetopt
(
formats
)
pretty_printer
.
print_help
(
"List of available distribution formats:"
)
pretty_printer
.
print_help
(
"List of available source distribution formats:"
)
help_options
=
[
help_options
=
[
(
'help-formats'
,
None
,
(
'help-formats'
,
None
,
"lists available distribution formats"
,
show_formats
),
"lists available distribution formats"
,
show_formats
),
]
]
negative_opts
=
{
'use-defaults'
:
'no-defaults'
}
negative_opts
=
{
'use-defaults'
:
'no-defaults'
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment