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
8d887526
Commit
8d887526
authored
Jun 16, 2018
by
Daniele Esposti
Committed by
Paul Ganssle
Aug 17, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support scripts with unicode content
This also renames the _to_ascii function to better reflect its purpose.
parent
85593de6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
setuptools/command/easy_install.py
setuptools/command/easy_install.py
+4
-4
No files found.
setuptools/command/easy_install.py
View file @
8d887526
...
...
@@ -96,7 +96,7 @@ def samefile(p1, p2):
if
six
.
PY2
:
def
_to_
ascii
(
s
):
def
_to_
bytes
(
s
):
return
s
def
isascii
(
s
):
...
...
@@ -107,8 +107,8 @@ if six.PY2:
return
False
else
:
def
_to_
ascii
(
s
):
return
s
.
encode
(
'
ascii
'
)
def
_to_
bytes
(
s
):
return
s
.
encode
(
'
utf8
'
)
def
isascii
(
s
):
try
:
...
...
@@ -805,7 +805,7 @@ class easy_install(Command):
if
is_script
:
body
=
self
.
_load_template
(
dev_path
)
%
locals
()
script_text
=
ScriptWriter
.
get_header
(
script_text
)
+
body
self
.
write_script
(
script_name
,
_to_
ascii
(
script_text
),
'b'
)
self
.
write_script
(
script_name
,
_to_
bytes
(
script_text
),
'b'
)
@
staticmethod
def
_load_template
(
dev_path
):
...
...
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