Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
a69032e1
Commit
a69032e1
authored
Sep 04, 2008
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #3160: the "bdist_wininst" distutils command didn't work.
Reviewed by Trent Nelson.
parent
acd8349d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
command/bdist_wininst.py
command/bdist_wininst.py
+9
-4
No files found.
command/bdist_wininst.py
View file @
a69032e1
...
...
@@ -260,13 +260,18 @@ class bdist_wininst(Command):
cfgdata
=
cfgdata
.
encode
(
"mbcs"
)
# Append the pre-install script
cfgdata
=
cfgdata
+
"
\
0
"
cfgdata
=
cfgdata
+
b
"
\
0
"
if
self
.
pre_install_script
:
script_data
=
open
(
self
.
pre_install_script
,
"r"
).
read
()
cfgdata
=
cfgdata
+
script_data
+
"
\
n
\
0
"
# We need to normalize newlines, so we open in text mode and
# convert back to bytes. "latin1" simply avoids any possible
# failures.
with
open
(
self
.
pre_install_script
,
"r"
,
encoding
=
"latin1"
)
as
script
:
script_data
=
script
.
read
().
encode
(
"latin1"
)
cfgdata
=
cfgdata
+
script_data
+
b"
\
n
\
0
"
else
:
# empty pre-install script
cfgdata
=
cfgdata
+
"
\
0
"
cfgdata
=
cfgdata
+
b
"
\
0
"
file
.
write
(
cfgdata
)
# The 'magic number' 0x1234567B is used to make sure that the
...
...
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