Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
797721b1
Kaydet (Commit)
797721b1
authored
Agu 03, 2010
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add various missing files.
Improve detection of unpackaged files.
üst
da991da3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
12 deletions
+37
-12
msi.py
Tools/msi/msi.py
+26
-12
msilib.py
Tools/msi/msilib.py
+11
-0
No files found.
Tools/msi/msi.py
Dosyayı görüntüle @
797721b1
...
@@ -902,6 +902,13 @@ class PyDirectory(Directory):
...
@@ -902,6 +902,13 @@ class PyDirectory(Directory):
kw
[
'componentflags'
]
=
2
#msidbComponentAttributesOptional
kw
[
'componentflags'
]
=
2
#msidbComponentAttributesOptional
Directory
.
__init__
(
self
,
*
args
,
**
kw
)
Directory
.
__init__
(
self
,
*
args
,
**
kw
)
def
check_unpackaged
(
self
):
self
.
unpackaged_files
.
discard
(
'__pycache__'
)
self
.
unpackaged_files
.
discard
(
'.svn'
)
if
self
.
unpackaged_files
:
print
"Warning: Unpackaged files in
%
s"
%
self
.
absolute
print
self
.
unpackaged_files
# See "File Table", "Component Table", "Directory Table",
# See "File Table", "Component Table", "Directory Table",
# "FeatureComponents Table"
# "FeatureComponents Table"
def
add_files
(
db
):
def
add_files
(
db
):
...
@@ -965,13 +972,13 @@ def add_files(db):
...
@@ -965,13 +972,13 @@ def add_files(db):
extensions
.
remove
(
"_ctypes.pyd"
)
extensions
.
remove
(
"_ctypes.pyd"
)
# Add all .py files in Lib, except tkinter, test
# Add all .py files in Lib, except tkinter, test
dirs
=
{}
dirs
=
[]
pydirs
=
[(
root
,
"Lib"
)]
pydirs
=
[(
root
,
"Lib"
)]
while
pydirs
:
while
pydirs
:
# Commit every now and then, or else installer will complain
# Commit every now and then, or else installer will complain
db
.
Commit
()
db
.
Commit
()
parent
,
dir
=
pydirs
.
pop
()
parent
,
dir
=
pydirs
.
pop
()
if
dir
==
".svn"
or
dir
.
startswith
(
"plat-"
):
if
dir
==
".svn"
or
dir
==
'__pycache__'
or
dir
.
startswith
(
"plat-"
):
continue
continue
elif
dir
in
[
"tkinter"
,
"idlelib"
,
"Icons"
]:
elif
dir
in
[
"tkinter"
,
"idlelib"
,
"Icons"
]:
if
not
have_tcl
:
if
not
have_tcl
:
...
@@ -989,7 +996,7 @@ def add_files(db):
...
@@ -989,7 +996,7 @@ def add_files(db):
default_feature
.
set_current
()
default_feature
.
set_current
()
lib
=
PyDirectory
(
db
,
cab
,
parent
,
dir
,
dir
,
"
%
s|
%
s"
%
(
parent
.
make_short
(
dir
),
dir
))
lib
=
PyDirectory
(
db
,
cab
,
parent
,
dir
,
dir
,
"
%
s|
%
s"
%
(
parent
.
make_short
(
dir
),
dir
))
# Add additional files
# Add additional files
dirs
[
dir
]
=
lib
dirs
.
append
(
lib
)
lib
.
glob
(
"*.txt"
)
lib
.
glob
(
"*.txt"
)
if
dir
==
'site-packages'
:
if
dir
==
'site-packages'
:
lib
.
add_file
(
"README.txt"
,
src
=
"README"
)
lib
.
add_file
(
"README.txt"
,
src
=
"README"
)
...
@@ -999,18 +1006,13 @@ def add_files(db):
...
@@ -999,18 +1006,13 @@ def add_files(db):
if
files
:
if
files
:
# Add an entry to the RemoveFile table to remove bytecode files.
# Add an entry to the RemoveFile table to remove bytecode files.
lib
.
remove_pyc
()
lib
.
remove_pyc
()
if
dir
.
endswith
(
'.egg-info'
):
# package READMEs if present
lib
.
add_file
(
'entry_points.txt'
)
lib
.
glob
(
"README"
)
lib
.
add_file
(
'PKG-INFO'
)
if
dir
==
'Lib'
:
lib
.
add_file
(
'top_level.txt'
)
lib
.
add_file
(
'wsgiref.egg-info'
)
lib
.
add_file
(
'zip-safe'
)
continue
if
dir
==
'test'
and
parent
.
physical
==
'Lib'
:
if
dir
==
'test'
and
parent
.
physical
==
'Lib'
:
lib
.
add_file
(
"185test.db"
)
lib
.
add_file
(
"185test.db"
)
lib
.
add_file
(
"audiotest.au"
)
lib
.
add_file
(
"audiotest.au"
)
lib
.
add_file
(
"cfgparser.1"
)
lib
.
add_file
(
"cfgparser.2"
)
lib
.
add_file
(
"cfgparser.3"
)
lib
.
add_file
(
"sgml_input.html"
)
lib
.
add_file
(
"sgml_input.html"
)
lib
.
add_file
(
"testtar.tar"
)
lib
.
add_file
(
"testtar.tar"
)
lib
.
add_file
(
"test_difflib_expect.html"
)
lib
.
add_file
(
"test_difflib_expect.html"
)
...
@@ -1020,7 +1022,10 @@ def add_files(db):
...
@@ -1020,7 +1022,10 @@ def add_files(db):
lib
.
glob
(
"*.uue"
)
lib
.
glob
(
"*.uue"
)
lib
.
glob
(
"*.pem"
)
lib
.
glob
(
"*.pem"
)
lib
.
glob
(
"*.pck"
)
lib
.
glob
(
"*.pck"
)
lib
.
glob
(
"cfgparser.*"
)
lib
.
add_file
(
"zipdir.zip"
)
lib
.
add_file
(
"zipdir.zip"
)
if
dir
==
'capath'
:
lib
.
glob
(
"*.0"
)
if
dir
==
'tests'
and
parent
.
physical
==
'distutils'
:
if
dir
==
'tests'
and
parent
.
physical
==
'distutils'
:
lib
.
add_file
(
"Setup.sample"
)
lib
.
add_file
(
"Setup.sample"
)
if
dir
==
'decimaltestdata'
:
if
dir
==
'decimaltestdata'
:
...
@@ -1030,19 +1035,26 @@ def add_files(db):
...
@@ -1030,19 +1035,26 @@ def add_files(db):
lib
.
add_file
(
"test.xml.out"
)
lib
.
add_file
(
"test.xml.out"
)
if
dir
==
'output'
:
if
dir
==
'output'
:
lib
.
glob
(
"test_*"
)
lib
.
glob
(
"test_*"
)
if
dir
==
'sndhdrdata'
:
lib
.
glob
(
"sndhdr.*"
)
if
dir
==
'idlelib'
:
if
dir
==
'idlelib'
:
lib
.
glob
(
"*.def"
)
lib
.
glob
(
"*.def"
)
lib
.
add_file
(
"idle.bat"
)
lib
.
add_file
(
"idle.bat"
)
lib
.
add_file
(
"ChangeLog"
)
if
dir
==
"Icons"
:
if
dir
==
"Icons"
:
lib
.
glob
(
"*.gif"
)
lib
.
glob
(
"*.gif"
)
lib
.
add_file
(
"idle.icns"
)
lib
.
add_file
(
"idle.icns"
)
if
dir
==
"command"
and
parent
.
physical
==
"distutils"
:
if
dir
==
"command"
and
parent
.
physical
==
"distutils"
:
lib
.
glob
(
"wininst*.exe"
)
lib
.
glob
(
"wininst*.exe"
)
lib
.
add_file
(
"command_template"
)
if
dir
==
"setuptools"
:
if
dir
==
"setuptools"
:
lib
.
add_file
(
"cli.exe"
)
lib
.
add_file
(
"cli.exe"
)
lib
.
add_file
(
"gui.exe"
)
lib
.
add_file
(
"gui.exe"
)
if
dir
==
"lib2to3"
:
if
dir
==
"lib2to3"
:
lib
.
removefile
(
"pickle"
,
"*.pickle"
)
lib
.
removefile
(
"pickle"
,
"*.pickle"
)
if
dir
==
"macholib"
:
lib
.
add_file
(
"README.ctypes"
)
lib
.
glob
(
"fetch_macholib*"
)
if
dir
==
"data"
and
parent
.
physical
==
"test"
and
parent
.
basedir
.
physical
==
"email"
:
if
dir
==
"data"
and
parent
.
physical
==
"test"
and
parent
.
basedir
.
physical
==
"email"
:
# This should contain all non-.svn files listed in subversion
# This should contain all non-.svn files listed in subversion
for
f
in
os
.
listdir
(
lib
.
absolute
):
for
f
in
os
.
listdir
(
lib
.
absolute
):
...
@@ -1054,6 +1066,8 @@ def add_files(db):
...
@@ -1054,6 +1066,8 @@ def add_files(db):
for
f
in
os
.
listdir
(
lib
.
absolute
):
for
f
in
os
.
listdir
(
lib
.
absolute
):
if
os
.
path
.
isdir
(
os
.
path
.
join
(
lib
.
absolute
,
f
)):
if
os
.
path
.
isdir
(
os
.
path
.
join
(
lib
.
absolute
,
f
)):
pydirs
.
append
((
lib
,
f
))
pydirs
.
append
((
lib
,
f
))
for
d
in
dirs
:
d
.
check_unpackaged
()
# Add DLLs
# Add DLLs
default_feature
.
set_current
()
default_feature
.
set_current
()
lib
=
DLLs
lib
=
DLLs
...
...
Tools/msi/msilib.py
Dosyayı görüntüle @
797721b1
...
@@ -451,6 +451,12 @@ class Directory:
...
@@ -451,6 +451,12 @@ class Directory:
else
:
else
:
self
.
absolute
=
physical
self
.
absolute
=
physical
blogical
=
None
blogical
=
None
# initially assume that all files in this directory are unpackaged
# as files from self.absolute get added, this set is reduced
self
.
unpackaged_files
=
set
()
for
f
in
os
.
listdir
(
self
.
absolute
):
if
os
.
path
.
isfile
(
os
.
path
.
join
(
self
.
absolute
,
f
)):
self
.
unpackaged_files
.
add
(
f
)
add_data
(
db
,
"Directory"
,
[(
logical
,
blogical
,
default
)])
add_data
(
db
,
"Directory"
,
[(
logical
,
blogical
,
default
)])
def
start_component
(
self
,
component
=
None
,
feature
=
None
,
flags
=
None
,
keyfile
=
None
,
uuid
=
None
):
def
start_component
(
self
,
component
=
None
,
feature
=
None
,
flags
=
None
,
keyfile
=
None
,
uuid
=
None
):
...
@@ -527,6 +533,11 @@ class Directory:
...
@@ -527,6 +533,11 @@ class Directory:
src
=
file
src
=
file
file
=
os
.
path
.
basename
(
file
)
file
=
os
.
path
.
basename
(
file
)
absolute
=
os
.
path
.
join
(
self
.
absolute
,
src
)
absolute
=
os
.
path
.
join
(
self
.
absolute
,
src
)
if
absolute
.
startswith
(
self
.
absolute
):
# mark file as packaged
relative
=
absolute
[
len
(
self
.
absolute
)
+
1
:]
if
relative
in
self
.
unpackaged_files
:
self
.
unpackaged_files
.
remove
(
relative
)
assert
not
re
.
search
(
r'[\?|><:/*]"'
,
file
)
# restrictions on long names
assert
not
re
.
search
(
r'[\?|><:/*]"'
,
file
)
# restrictions on long names
if
self
.
keyfiles
.
has_key
(
file
):
if
self
.
keyfiles
.
has_key
(
file
):
logical
=
self
.
keyfiles
[
file
]
logical
=
self
.
keyfiles
[
file
]
...
...
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