Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
923b7f43
Commit
923b7f43
authored
Jun 06, 2000
by
Greg Ward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support for multiple distribution formats in one run.
parent
e91f5266
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
17 deletions
+18
-17
Lib/distutils/command/bdist.py
Lib/distutils/command/bdist.py
+18
-17
No files found.
Lib/distutils/command/bdist.py
View file @
923b7f43
...
...
@@ -20,9 +20,9 @@ class bdist (Command):
user_options
=
[(
'bdist-base='
,
'b'
,
"temporary directory for creating built distributions"
),
(
'format
='
,
'f'
,
"format for distribution "
+
"(
tar, ztar, gztar, bztar, zip
, ... )"
),
(
'format
s='
,
None
,
"format
s
for distribution "
+
"(
gztar, bztar, zip, rpm
, ... )"
),
]
# The following commands do not take a format option from bdist
...
...
@@ -43,7 +43,7 @@ class bdist (Command):
def
initialize_options
(
self
):
self
.
bdist_base
=
None
self
.
format
=
None
self
.
format
s
=
None
# initialize_options()
...
...
@@ -57,31 +57,32 @@ class bdist (Command):
plat
=
get_platform
()
self
.
bdist_base
=
os
.
path
.
join
(
build_base
,
'bdist.'
+
plat
)
if
self
.
format
is
None
:
self
.
ensure_string_list
(
'formats'
)
if
self
.
formats
is
None
:
try
:
self
.
format
=
self
.
default_format
[
os
.
name
]
self
.
format
s
=
[
self
.
default_format
[
os
.
name
]
]
except
KeyError
:
raise
DistutilsPlatformError
,
\
"don't know how to create built distributions "
+
\
"on platform %s"
%
os
.
name
#elif type (self.format) is StringType:
# self.format = string.split (self.format, ',')
# finalize_options()
def
run
(
self
):
try
:
cmd_name
=
self
.
format_command
[
self
.
format
]
except
KeyError
:
raise
DistutilsOptionError
,
\
"invalid archive format '%s'"
%
self
.
format
for
format
in
self
.
formats
:
if
cmd_name
not
in
self
.
no_format_option
:
sub_cmd
=
self
.
get_finalized_command
(
cmd_name
)
sub_cmd
.
format
=
self
.
format
self
.
run_command
(
cmd_name
)
try
:
cmd_name
=
self
.
format_command
[
self
.
format
]
except
KeyError
:
raise
DistutilsOptionError
,
\
"invalid format '%s'"
%
self
.
format
sub_cmd
=
self
.
reinitialize_command
(
cmd_name
)
if
cmd_name
not
in
self
.
no_format_option
:
sub_cmd
.
format
=
self
.
format
self
.
run_command
(
cmd_name
)
# run()
...
...
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