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
f4bd6b0f
Commit
f4bd6b0f
authored
Sep 11, 2000
by
Greg Ward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added --plat-name option to override sysconfig.get_platform() in
generated filenames.
parent
0c8b3d60
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
Lib/distutils/command/bdist.py
Lib/distutils/command/bdist.py
+9
-2
Lib/distutils/command/bdist_dumb.py
Lib/distutils/command/bdist_dumb.py
+9
-2
No files found.
Lib/distutils/command/bdist.py
View file @
f4bd6b0f
...
@@ -32,6 +32,9 @@ class bdist (Command):
...
@@ -32,6 +32,9 @@ class bdist (Command):
user_options
=
[(
'bdist-base='
,
'b'
,
user_options
=
[(
'bdist-base='
,
'b'
,
"temporary directory for creating built distributions"
),
"temporary directory for creating built distributions"
),
(
'plat-name='
,
'p'
,
"platform name to embed in generated filenames "
"(default: %s)"
%
get_platform
()),
(
'formats='
,
None
,
(
'formats='
,
None
,
"formats for distribution (comma-separated list)"
),
"formats for distribution (comma-separated list)"
),
(
'dist-dir='
,
'd'
,
(
'dist-dir='
,
'd'
,
...
@@ -70,6 +73,7 @@ class bdist (Command):
...
@@ -70,6 +73,7 @@ class bdist (Command):
def
initialize_options
(
self
):
def
initialize_options
(
self
):
self
.
bdist_base
=
None
self
.
bdist_base
=
None
self
.
plat_name
=
None
self
.
formats
=
None
self
.
formats
=
None
self
.
dist_dir
=
None
self
.
dist_dir
=
None
...
@@ -77,13 +81,16 @@ class bdist (Command):
...
@@ -77,13 +81,16 @@ class bdist (Command):
def
finalize_options
(
self
):
def
finalize_options
(
self
):
# have to finalize 'plat_name' before 'bdist_base'
if
self
.
plat_name
is
None
:
self
.
plat_name
=
get_platform
()
# 'bdist_base' -- parent of per-built-distribution-format
# 'bdist_base' -- parent of per-built-distribution-format
# temporary directories (eg. we'll probably have
# temporary directories (eg. we'll probably have
# "build/bdist.<plat>/dumb", "build/bdist.<plat>/rpm", etc.)
# "build/bdist.<plat>/dumb", "build/bdist.<plat>/rpm", etc.)
if
self
.
bdist_base
is
None
:
if
self
.
bdist_base
is
None
:
build_base
=
self
.
get_finalized_command
(
'build'
).
build_base
build_base
=
self
.
get_finalized_command
(
'build'
).
build_base
plat
=
get_platform
()
self
.
bdist_base
=
os
.
path
.
join
(
build_base
,
'bdist.'
+
self
.
plat_name
)
self
.
bdist_base
=
os
.
path
.
join
(
build_base
,
'bdist.'
+
plat
)
self
.
ensure_string_list
(
'formats'
)
self
.
ensure_string_list
(
'formats'
)
if
self
.
formats
is
None
:
if
self
.
formats
is
None
:
...
...
Lib/distutils/command/bdist_dumb.py
View file @
f4bd6b0f
...
@@ -20,6 +20,9 @@ class bdist_dumb (Command):
...
@@ -20,6 +20,9 @@ class bdist_dumb (Command):
user_options
=
[(
'bdist-dir='
,
'd'
,
user_options
=
[(
'bdist-dir='
,
'd'
,
"temporary directory for creating the distribution"
),
"temporary directory for creating the distribution"
),
(
'plat-name='
,
'p'
,
"platform name to embed in generated filenames "
"(default: %s)"
%
get_platform
()),
(
'format='
,
'f'
,
(
'format='
,
'f'
,
"archive format to create (tar, ztar, gztar, zip)"
),
"archive format to create (tar, ztar, gztar, zip)"
),
(
'keep-tree'
,
'k'
,
(
'keep-tree'
,
'k'
,
...
@@ -35,6 +38,7 @@ class bdist_dumb (Command):
...
@@ -35,6 +38,7 @@ class bdist_dumb (Command):
def
initialize_options
(
self
):
def
initialize_options
(
self
):
self
.
bdist_dir
=
None
self
.
bdist_dir
=
None
self
.
plat_name
=
None
self
.
format
=
None
self
.
format
=
None
self
.
keep_tree
=
0
self
.
keep_tree
=
0
self
.
dist_dir
=
None
self
.
dist_dir
=
None
...
@@ -43,6 +47,7 @@ class bdist_dumb (Command):
...
@@ -43,6 +47,7 @@ class bdist_dumb (Command):
def
finalize_options
(
self
):
def
finalize_options
(
self
):
if
self
.
bdist_dir
is
None
:
if
self
.
bdist_dir
is
None
:
bdist_base
=
self
.
get_finalized_command
(
'bdist'
).
bdist_base
bdist_base
=
self
.
get_finalized_command
(
'bdist'
).
bdist_base
self
.
bdist_dir
=
os
.
path
.
join
(
bdist_base
,
'dumb'
)
self
.
bdist_dir
=
os
.
path
.
join
(
bdist_base
,
'dumb'
)
...
@@ -55,7 +60,9 @@ class bdist_dumb (Command):
...
@@ -55,7 +60,9 @@ class bdist_dumb (Command):
(
"don't know how to create dumb built distributions "
+
(
"don't know how to create dumb built distributions "
+
"on platform %s"
)
%
os
.
name
"on platform %s"
)
%
os
.
name
self
.
set_undefined_options
(
'bdist'
,
(
'dist_dir'
,
'dist_dir'
))
self
.
set_undefined_options
(
'bdist'
,
(
'dist_dir'
,
'dist_dir'
),
(
'plat_name'
,
'plat_name'
))
# finalize_options()
# finalize_options()
...
@@ -74,7 +81,7 @@ class bdist_dumb (Command):
...
@@ -74,7 +81,7 @@ class bdist_dumb (Command):
# And make an archive relative to the root of the
# And make an archive relative to the root of the
# pseudo-installation tree.
# pseudo-installation tree.
archive_basename
=
"%s.%s"
%
(
self
.
distribution
.
get_fullname
(),
archive_basename
=
"%s.%s"
%
(
self
.
distribution
.
get_fullname
(),
get_platform
()
)
self
.
plat_name
)
print
"self.bdist_dir = %s"
%
self
.
bdist_dir
print
"self.bdist_dir = %s"
%
self
.
bdist_dir
print
"self.format = %s"
%
self
.
format
print
"self.format = %s"
%
self
.
format
self
.
make_archive
(
os
.
path
.
join
(
self
.
dist_dir
,
archive_basename
),
self
.
make_archive
(
os
.
path
.
join
(
self
.
dist_dir
,
archive_basename
),
...
...
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