Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6ca5a4d

Browse files
committed
Issue #12406: Update list of files.
1 parent bc499d2 commit 6ca5a4d

1 file changed

Lines changed: 43 additions & 7 deletions

File tree

Tools/msi/msi.py

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@
8585
full_current_version = current_version
8686

8787
extensions = [
88-
'bz2.pyd',
8988
'pyexpat.pyd',
9089
'select.pyd',
9190
'unicodedata.pyd',
9291
'winsound.pyd',
92+
'_bz2.pyd',
9393
'_elementtree.pyd',
9494
'_socket.pyd',
9595
'_ssl.pyd',
@@ -100,7 +100,8 @@
100100
'_ctypes_test.pyd',
101101
'_sqlite3.pyd',
102102
'_hashlib.pyd',
103-
'_multiprocessing.pyd'
103+
'_multiprocessing.pyd',
104+
'_lzma.pyd'
104105
]
105106

106107
# Well-known component UUIDs
@@ -912,6 +913,21 @@ def check_unpackaged(self):
912913
print "Warning: Unpackaged files in %s" % self.absolute
913914
print self.unpackaged_files
914915

916+
917+
def inside_test(dir):
918+
if dir.physical in ('test', 'tests'):
919+
return True
920+
if dir.basedir:
921+
return inside_test(dir.basedir)
922+
return False
923+
924+
def in_packaging_tests(dir):
925+
if dir.physical == 'tests' and dir.basedir.physical == 'packaging':
926+
return True
927+
if dir.basedir:
928+
return in_packaging_tests(dir.basedir)
929+
return False
930+
915931
# See "File Table", "Component Table", "Directory Table",
916932
# "FeatureComponents Table"
917933
def add_files(db):
@@ -987,11 +1003,7 @@ def add_files(db):
9871003
if not have_tcl:
9881004
continue
9891005
tcltk.set_current()
990-
elif dir in ['test', 'tests', 'data', 'output']:
991-
# test: Lib, Lib/email, Lib/ctypes, Lib/sqlite3
992-
# tests: Lib/distutils
993-
# data: Lib/email/test
994-
# output: Lib/test
1006+
elif dir in ('test', 'tests') or inside_test(parent):
9951007
testsuite.set_current()
9961008
elif not have_ctypes and dir == "ctypes":
9971009
continue
@@ -1028,6 +1040,7 @@ def add_files(db):
10281040
lib.glob("cfgparser.*")
10291041
lib.add_file("zip_cp437_header.zip")
10301042
lib.add_file("zipdir.zip")
1043+
lib.add_file("mime.types")
10311044
if dir=='capath':
10321045
lib.glob("*.0")
10331046
if dir=='tests' and parent.physical=='distutils':
@@ -1060,6 +1073,25 @@ def add_files(db):
10601073
lib.add_file("turtle.cfg")
10611074
if dir=="pydoc_data":
10621075
lib.add_file("_pydoc.css")
1076+
if dir.endswith('.dist-info'):
1077+
lib.add_file('INSTALLER')
1078+
lib.add_file('REQUESTED')
1079+
lib.add_file('RECORD')
1080+
lib.add_file('METADATA')
1081+
lib.glob('RESOURCES')
1082+
if dir.endswith('.egg-info') or dir == 'EGG-INFO':
1083+
lib.add_file('PKG-INFO')
1084+
if in_packaging_tests(parent):
1085+
lib.glob('*.html')
1086+
lib.glob('*.tar.gz')
1087+
if dir=='fake_dists':
1088+
# cannot use glob since there are also egg-info directories here
1089+
lib.add_file('cheese-2.0.2.egg-info')
1090+
lib.add_file('nut-funkyversion.egg-info')
1091+
lib.add_file('strawberry-0.6.egg')
1092+
lib.add_file('truffles-5.0.egg-info')
1093+
lib.add_file('babar.cfg')
1094+
lib.add_file('babar.png')
10631095
if dir=="data" and parent.physical=="test_email":
10641096
# This should contain all non-.svn files listed in subversion
10651097
for f in os.listdir(lib.absolute):
@@ -1068,6 +1100,10 @@ def add_files(db):
10681100
lib.add_file(f)
10691101
else:
10701102
print("WARNING: New file %s in test/test_email/data" % f)
1103+
if dir=='tests' and parent.physical == 'packaging':
1104+
lib.add_file('SETUPTOOLS-PKG-INFO2')
1105+
lib.add_file('SETUPTOOLS-PKG-INFO')
1106+
lib.add_file('PKG-INFO')
10711107
for f in os.listdir(lib.absolute):
10721108
if os.path.isdir(os.path.join(lib.absolute, f)):
10731109
pydirs.append((lib, f))

0 commit comments

Comments
 (0)