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
7407f582
Kaydet (Commit)
7407f582
authored
Ock 31, 2015
tarafından
Steve Dower
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #23199: libpython27.a in amd64 release is 32-bit
üst
73bcde20
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
19 deletions
+18
-19
msi.py
Tools/msi/msi.py
+18
-19
No files found.
Tools/msi/msi.py
Dosyayı görüntüle @
7407f582
...
...
@@ -132,34 +132,32 @@ docfile = 'python%s%s%s.chm' % (major, minor, docfile)
# Build the mingw import library, libpythonXY.a
# This requires 'nm' and 'dlltool' executables on your PATH
def
build_mingw_lib
(
lib_file
,
def_file
,
dll_file
,
mingw_lib
):
def
build_mingw_lib
(
dll_path
,
def_file
,
dll_file
,
mingw_lib
):
warning
=
"WARNING:
%
s - libpythonXX.a not built"
nm
=
find_executable
(
'nm
'
)
gendef
=
find_executable
(
'gendef
'
)
dlltool
=
find_executable
(
'dlltool'
)
if
not
nm
or
not
dlltool
:
print
warning
%
"
nm
and/or dlltool were not found"
if
not
gendef
or
not
dlltool
:
print
warning
%
"
gendef
and/or dlltool were not found"
return
False
nm_command
=
'
%
s -Cs
%
s'
%
(
nm
,
lib_file
)
gendef_command
=
'
%
s -
%
s'
%
(
gendef
,
dll_path
)
dlltool_command
=
"
%
s --dllname
%
s --def
%
s --output-lib
%
s"
%
\
(
dlltool
,
dll_file
,
def_file
,
mingw_lib
)
export_match
=
re
.
compile
(
r"^_imp__(.*) in python\d+\.dll"
)
.
match
if
msilib
.
Win64
:
dlltool_command
+=
" -m i386:x86-64"
else
:
dlltool_command
+=
" -m i386"
f
=
open
(
def_file
,
'w'
)
print
>>
f
,
"LIBRARY
%
s"
%
dll_file
print
>>
f
,
"EXPORTS"
nm_pipe
=
os
.
popen
(
nm_command
)
for
line
in
nm_pipe
.
readlines
():
m
=
export_match
(
line
)
if
m
:
print
>>
f
,
m
.
group
(
1
)
gendef_pipe
=
os
.
popen
(
gendef_command
)
for
line
in
gendef_pipe
.
readlines
():
print
>>
f
,
line
f
.
close
()
exit
=
nm
_pipe
.
close
()
exit
=
gendef
_pipe
.
close
()
if
exit
:
print
warning
%
"
nm
did not run successfully"
print
warning
%
"
gendef
did not run successfully"
return
False
if
os
.
system
(
dlltool_command
)
!=
0
:
...
...
@@ -169,13 +167,11 @@ def build_mingw_lib(lib_file, def_file, dll_file, mingw_lib):
return
True
# Target files (.def and .a) go in PCBuild directory
lib_file
=
os
.
path
.
join
(
srcdir
,
PCBUILD
,
"python
%
s
%
s.lib
"
%
(
major
,
minor
))
dll_path
=
os
.
path
.
join
(
srcdir
,
PCBUILD
,
"python
%
s
%
s.dll
"
%
(
major
,
minor
))
def_file
=
os
.
path
.
join
(
srcdir
,
PCBUILD
,
"python
%
s
%
s.def"
%
(
major
,
minor
))
dll_file
=
"python
%
s
%
s.dll"
%
(
major
,
minor
)
mingw_lib
=
os
.
path
.
join
(
srcdir
,
PCBUILD
,
"libpython
%
s
%
s.a"
%
(
major
,
minor
))
have_mingw
=
build_mingw_lib
(
lib_file
,
def_file
,
dll_file
,
mingw_lib
)
# Determine the target architecture
if
os
.
system
(
"nmake /nologo /c /f msisupport.mak"
)
!=
0
:
raise
RuntimeError
(
"'nmake /f msisupport.mak' failed"
)
...
...
@@ -183,6 +179,7 @@ dll_path = os.path.join(srcdir, PCBUILD, dll_file)
msilib
.
set_arch_from_file
(
dll_path
)
if
msilib
.
pe_type
(
dll_path
)
!=
msilib
.
pe_type
(
"msisupport.dll"
):
raise
SystemError
,
"msisupport.dll for incorrect architecture"
if
msilib
.
Win64
:
upgrade_code
=
upgrade_code_64
# Bump the last digit of the code by one, so that 32-bit and 64-bit
...
...
@@ -190,6 +187,8 @@ if msilib.Win64:
digit
=
hex
((
int
(
product_code
[
-
2
],
16
)
+
1
)
%
16
)[
-
1
]
product_code
=
product_code
[:
-
2
]
+
digit
+
'}'
have_mingw
=
build_mingw_lib
(
dll_path
,
def_file
,
dll_file
,
mingw_lib
)
if
testpackage
:
ext
=
'px'
testprefix
=
'x'
...
...
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