Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
7f408bff
Commit
7f408bff
authored
Aug 16, 2012
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pyximport: make sure we encode extension file paths to 'str' in Py2 to work around distutils quirk
parent
c5be029b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
pyximport/pyximport.py
pyximport/pyximport.py
+4
-0
No files found.
pyximport/pyximport.py
View file @
7f408bff
...
...
@@ -93,6 +93,10 @@ def get_distutils_extension(modname, pyxfilename, language_level=None):
# modname = modname + extra
extension_mod
,
setup_args
=
handle_special_build
(
modname
,
pyxfilename
)
if
not
extension_mod
:
if
not
isinstance
(
pyxfilename
,
str
):
# distutils is stupid in Py2 and requires exactly 'str'
# => encode accidentally coerced unicode strings back to str
pyxfilename
=
pyxfilename
.
encode
(
sys
.
getfilesystemencoding
())
from
distutils.extension
import
Extension
extension_mod
=
Extension
(
name
=
modname
,
sources
=
[
pyxfilename
])
if
language_level
is
not
None
:
...
...
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