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
610948de
Commit
610948de
authored
Nov 23, 2016
by
Steve Dower
Browse files
Options
Browse Files
Download
Plain Diff
Issue #28783: Embedded and nuget packages incorrect reference missing bdist_wininst command.
parents
f4ffd8c6
f170c3fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
3 deletions
+48
-3
Tools/msi/distutils.command.__init__.py
Tools/msi/distutils.command.__init__.py
+32
-0
Tools/msi/make_zip.py
Tools/msi/make_zip.py
+16
-3
No files found.
Tools/msi/distutils.command.__init__.py
0 → 100644
View file @
610948de
"""distutils.command
Package containing implementation of all the standard Distutils
commands."""
__all__
=
[
'build'
,
'build_py'
,
'build_ext'
,
'build_clib'
,
'build_scripts'
,
'clean'
,
'install'
,
'install_lib'
,
'install_headers'
,
'install_scripts'
,
'install_data'
,
'sdist'
,
'register'
,
'bdist'
,
'bdist_dumb'
,
'bdist_rpm'
,
# This command is not included in this package
#'bdist_wininst',
'check'
,
'upload'
,
# These two are reserved for future use:
#'bdist_sdux',
#'bdist_pkgtool',
# Note:
# bdist_packager is not included because it only provides
# an abstract base class
]
Tools/msi/make_zip.py
View file @
610948de
...
@@ -7,6 +7,7 @@ import stat
...
@@ -7,6 +7,7 @@ import stat
import
os
import
os
import
tempfile
import
tempfile
from
itertools
import
chain
from
pathlib
import
Path
from
pathlib
import
Path
from
zipfile
import
ZipFile
,
ZIP_DEFLATED
from
zipfile
import
ZipFile
,
ZIP_DEFLATED
import
subprocess
import
subprocess
...
@@ -42,6 +43,7 @@ EXCLUDE_FILE_FROM_LIBRARY = {
...
@@ -42,6 +43,7 @@ EXCLUDE_FILE_FROM_LIBRARY = {
}
}
EXCLUDE_FILE_FROM_LIBS = {
EXCLUDE_FILE_FROM_LIBS = {
'
liblzma
',
'
ssleay
',
'
ssleay
',
'
libeay
',
'
libeay
',
'
python3stub
',
'
python3stub
',
...
@@ -77,6 +79,10 @@ def include_in_lib(p):
...
@@ -77,6 +79,10 @@ def include_in_lib(p):
if name in EXCLUDE_FILE_FROM_LIBRARY:
if name in EXCLUDE_FILE_FROM_LIBRARY:
return False
return False
# Special code is included below to patch this file back in
if [d.lower() for d in p.parts[-3:]] == ['
distutils
', '
command
', '
__init__
.
py
']:
return False
suffix = p.suffix.lower()
suffix = p.suffix.lower()
return suffix not in {'
.
pyc
', '
.
pyo
', '
.
exe
'}
return suffix not in {'
.
pyc
', '
.
pyo
', '
.
exe
'}
...
@@ -173,7 +179,7 @@ def rglob(root, pattern, condition):
...
@@ -173,7 +179,7 @@ def rglob(root, pattern, condition):
def main():
def main():
parser = argparse.ArgumentParser()
parser = argparse.ArgumentParser()
parser.add_argument('
-
s
', '
--
source
', metavar='
dir
', help='
The
directory
containing
the
repository
root
', type=Path)
parser.add_argument('
-
s
', '
--
source
', metavar='
dir
', help='
The
directory
containing
the
repository
root
', type=Path)
parser.add_argument('
-
o
', '
--
out
', metavar='
file
', help='
The
name
of
the
output
self
-
extracting
archive
', type=Path, default=None)
parser.add_argument('
-
o
', '
--
out
', metavar='
file
', help='
The
name
of
the
output
archive
', type=Path, default=None)
parser.add_argument('
-
t
', '
--
temp
', metavar='
dir
', help='
A
directory
to
temporarily
extract
files
into
', type=Path, default=None)
parser.add_argument('
-
t
', '
--
temp
', metavar='
dir
', help='
A
directory
to
temporarily
extract
files
into
', type=Path, default=None)
parser.add_argument('
-
e
', '
--
embed
', help='
Create
an
embedding
layout
', action='
store_true
', default=False)
parser.add_argument('
-
e
', '
--
embed
', help='
Create
an
embedding
layout
', action='
store_true
', default=False)
parser.add_argument('
-
a
', '
--
arch
', help='
Specify
the
architecture
to
use
(
win32
/
amd64
)
', type=str, default="win32")
parser.add_argument('
-
a
', '
--
arch
', help='
Specify
the
architecture
to
use
(
win32
/
amd64
)
', type=str, default="win32")
...
@@ -207,8 +213,15 @@ def main():
...
@@ -207,8 +213,15 @@ def main():
try:
try:
for t, s, p, c in layout:
for t, s, p, c in layout:
s = source / s.replace("$arch", arch)
fs = source / s.replace("$arch", arch)
copied = copy_to_layout(temp / t.rstrip('
/
'), rglob(s, p, c))
files = rglob(fs, p, c)
extra_files = []
if s == '
Lib
' and p == '
**/*
':
extra_files.append((
source / '
tools
' / '
msi
' / '
distutils
.
command
.
__init__
.
py
',
Path('
distutils
') / '
command
' / '
__init__
.
py
'
))
copied = copy_to_layout(temp / t.rstrip('
/
'), chain(files, extra_files))
print('
Copied
{}
files
'.format(copied))
print('
Copied
{}
files
'.format(copied))
if ns.embed:
if ns.embed:
...
...
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