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
9fda931f
Kaydet (Commit)
9fda931f
authored
Ara 22, 2004
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Patch #1088716: build and incorporate libpython24.a. Backported to 2.4
üst
ac191dac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
1 deletion
+51
-1
msi.py
Tools/msi/msi.py
+51
-1
No files found.
Tools/msi/msi.py
Dosyayı görüntüle @
9fda931f
# Python MSI Generator
# (C) 2003 Martin v. Loewis
# See "FOO" in comments refers to MSDN sections with the title FOO.
import
msilib
,
schema
,
sequence
,
os
,
glob
,
time
import
msilib
,
schema
,
sequence
,
os
,
glob
,
time
,
re
from
msilib
import
Feature
,
CAB
,
Directory
,
Dialog
,
Binary
,
add_data
import
uisample
from
win32com.client
import
constants
from
distutils.spawn
import
find_executable
# Settings can be overridden in config.py below
# 1 for Itanium build
...
...
@@ -116,6 +117,52 @@ if major+minor <= "23":
'parser.pyd'
,
])
# 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
):
warning
=
"WARNING:
%
s - libpythonXX.a not built"
nm
=
find_executable
(
'nm'
)
dlltool
=
find_executable
(
'dlltool'
)
if
not
nm
or
not
dlltool
:
print
warning
%
"nm and/or dlltool were not found"
return
False
nm_command
=
'
%
s -Cs
%
s'
%
(
nm
,
lib_file
)
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
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
)
f
.
close
()
exit
=
nm_pipe
.
close
()
if
exit
:
print
warning
%
"nm did not run successfully"
return
False
if
os
.
system
(
dlltool_command
)
!=
0
:
print
warning
%
"dlltool did not run successfully"
return
False
return
True
# Target files (.def and .a) go in PCBuild directory
lib_file
=
os
.
path
.
join
(
srcdir
,
"PCBuild"
,
"python
%
s
%
s.lib"
%
(
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
)
if
testpackage
:
ext
=
'px'
testprefix
=
'x'
...
...
@@ -924,6 +971,9 @@ def add_files(db):
for
f
in
dlls
:
lib
.
add_file
(
f
.
replace
(
'pyd'
,
'lib'
))
lib
.
add_file
(
'python
%
s
%
s.lib'
%
(
major
,
minor
))
# Add the mingw-format library
if
have_mingw
:
lib
.
add_file
(
'libpython
%
s
%
s.a'
%
(
major
,
minor
))
if
have_tcl
:
# Add Tcl/Tk
tcldirs
=
[(
root
,
'../tcltk/lib'
,
'tcl'
)]
...
...
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