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
4c6c7caf
Commit
4c6c7caf
authored
Aug 30, 2007
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Port to Python 3.0.
parent
945362cf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
Tools/msi/msi.py
Tools/msi/msi.py
+5
-4
Tools/msi/msilib.py
Tools/msi/msilib.py
+5
-5
No files found.
Tools/msi/msi.py
View file @
4c6c7caf
...
@@ -103,8 +103,9 @@ extensions = [
...
@@ -103,8 +103,9 @@ extensions = [
msvcr71_uuid
=
"{8666C8DD-D0B4-4B42-928E-A69E32FA5D4D}"
msvcr71_uuid
=
"{8666C8DD-D0B4-4B42-928E-A69E32FA5D4D}"
pythondll_uuid
=
{
pythondll_uuid
=
{
"24"
:
"{9B81E618-2301-4035-AC77-75D9ABEB7301}"
,
"24"
:
"{9B81E618-2301-4035-AC77-75D9ABEB7301}"
,
"25"
:
"{2e41b118-38bd-4c1b-a840-6977efd1b911}"
"25"
:
"{2e41b118-38bd-4c1b-a840-6977efd1b911}"
,
"26"
:
"{34ebecac-f046-4e1c-b0e3-9bac3cdaacfa}"
,
"26"
:
"{34ebecac-f046-4e1c-b0e3-9bac3cdaacfa}"
,
"30"
:
"{6953bc3b-6768-4291-8410-7914ce6e2ca8}"
,
}
[
major
+
minor
]
}
[
major
+
minor
]
# Build the mingw import library, libpythonXY.a
# Build the mingw import library, libpythonXY.a
...
@@ -124,14 +125,14 @@ def build_mingw_lib(lib_file, def_file, dll_file, mingw_lib):
...
@@ -124,14 +125,14 @@ def build_mingw_lib(lib_file, def_file, dll_file, mingw_lib):
export_match
=
re
.
compile
(
r"^_imp__(.*) in python\
d+
\.dll"
).
match
export_match
=
re
.
compile
(
r"^_imp__(.*) in python\
d+
\.dll"
).
match
f
=
open
(
def_file
,
'w'
)
f
=
open
(
def_file
,
'w'
)
print
(
"LIBRARY %s"
%
dll_file
,
file
=
f
)
f
.
write
(
"LIBRARY %s
\
n
"
%
dll_file
)
print
(
"EXPORTS"
,
file
=
f
)
f
.
write
(
"EXPORTS
\
n
"
)
nm_pipe
=
os
.
popen
(
nm_command
)
nm_pipe
=
os
.
popen
(
nm_command
)
for
line
in
nm_pipe
.
readlines
():
for
line
in
nm_pipe
.
readlines
():
m
=
export_match
(
line
)
m
=
export_match
(
line
)
if
m
:
if
m
:
print
(
m
.
group
(
1
),
file
=
f
)
f
.
write
(
m
.
group
(
1
)
+
"
\
n
"
)
f
.
close
()
f
.
close
()
exit
=
nm_pipe
.
close
()
exit
=
nm_pipe
.
close
()
...
...
Tools/msi/msilib.py
View file @
4c6c7caf
...
@@ -202,7 +202,7 @@ def gen_sequence(destpath, msipath):
...
@@ -202,7 +202,7 @@ def gen_sequence(destpath, msipath):
v
=
seqmsi
.
OpenView
(
"SELECT * FROM _Tables"
);
v
=
seqmsi
.
OpenView
(
"SELECT * FROM _Tables"
);
v
.
Execute
(
None
)
v
.
Execute
(
None
)
f
=
open
(
destpath
,
"w"
)
f
=
open
(
destpath
,
"w"
)
print
(
"import msilib,os;dirname=os.path.dirname(__file__)"
,
file
=
f
)
f
.
write
(
"import msilib,os;dirname=os.path.dirname(__file__)
\
n
"
)
tables
=
[]
tables
=
[]
while
1
:
while
1
:
r
=
v
.
Fetch
()
r
=
v
.
Fetch
()
...
@@ -364,9 +364,9 @@ class CAB:
...
@@ -364,9 +364,9 @@ class CAB:
logical
=
self
.
gen_id
(
dir
,
file
)
logical
=
self
.
gen_id
(
dir
,
file
)
self
.
index
+=
1
self
.
index
+=
1
if
full
.
find
(
" "
)
!=-
1
:
if
full
.
find
(
" "
)
!=-
1
:
print
(
'"%s" %s'
%
(
full
,
logical
),
file
=
self
.
file
)
self
.
file
.
write
(
'"%s" %s
\
n
'
%
(
full
,
logical
)
)
else
:
else
:
print
(
'%s %s'
%
(
full
,
logical
),
file
=
self
.
file
)
self
.
file
.
write
(
'%s %s
\
n
'
%
(
full
,
logical
)
)
return
self
.
index
,
logical
return
self
.
index
,
logical
def
commit
(
self
,
db
):
def
commit
(
self
,
db
):
...
@@ -390,8 +390,8 @@ class CAB:
...
@@ -390,8 +390,8 @@ class CAB:
cabarc = "
cabarc
.
exe
"
cabarc = "
cabarc
.
exe
"
cmd = r'"
%
s
" -m lzx:21 n %s.cab @%s.txt' % (cabarc, self.name, self.name)
cmd = r'"
%
s
" -m lzx:21 n %s.cab @%s.txt' % (cabarc, self.name, self.name)
p = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE,
p = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
[0]
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
for line in
(p.stdout, p.stdin)
:
for line in
p.stdout
:
if line.startswith("
--
adding
"):
if line.startswith("
--
adding
"):
sys.stdout.write("
.
")
sys.stdout.write("
.
")
else:
else:
...
...
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