Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
BTrees
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
BTrees
Commits
998d8c7d
Commit
998d8c7d
authored
Oct 22, 2012
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow suppressing C extensions via PURE_PYTHON environment variable.
parent
c84a9aa0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
setup.py
setup.py
+2
-1
No files found.
setup.py
View file @
998d8c7d
...
@@ -93,13 +93,14 @@ def BTreeExtension(family):
...
@@ -93,13 +93,14 @@ def BTreeExtension(family):
return
Extension
(
name
,
sources
,
**
kwargs
)
return
Extension
(
name
,
sources
,
**
kwargs
)
py_impl
=
getattr
(
platform
,
'python_implementation'
,
lambda
:
None
)
py_impl
=
getattr
(
platform
,
'python_implementation'
,
lambda
:
None
)
pure_python
=
os
.
environ
.
get
(
'PURE_PYTHON'
,
False
)
is_pypy
=
py_impl
()
==
'PyPy'
is_pypy
=
py_impl
()
==
'PyPy'
is_jython
=
'java'
in
sys
.
platform
is_jython
=
'java'
in
sys
.
platform
# Jython cannot build the C optimizations, while on PyPy they are
# Jython cannot build the C optimizations, while on PyPy they are
# anti-optimizations (the C extension compatibility layer is known-slow,
# anti-optimizations (the C extension compatibility layer is known-slow,
# and defeats JIT opportunities).
# and defeats JIT opportunities).
if
is_pypy
or
is_jython
or
sys
.
version_info
[
0
]
>
2
:
if
pure_python
or
is_pypy
or
is_jython
or
sys
.
version_info
[
0
]
>
2
:
ext_modules
=
[]
ext_modules
=
[]
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