Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not attempt to compile extensions for pypy and jython. This fixes #4
- Loading branch information
Showing
3 changed files
with
34 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
|
@@ -9,6 +9,9 @@ | ||
# fail safe compilation shamelessly stolen from the simplejson | # fail safe compilation shamelessly stolen from the simplejson | ||
# setup.py file. Original author: Bob Ippolito | # setup.py file. Original author: Bob Ippolito | ||
|
|
||
is_jython = 'java' in sys.platform | |||
is_pypy = hasattr(sys, 'pypy_version_info') | |||
|
|||
|
|
||
speedups = Feature( | speedups = Feature( | ||
'optional C speed-enhancement module', | 'optional C speed-enhancement module', | ||
|
@@ -92,21 +95,29 @@ def run_setup(with_binary): | ||
) | ) | ||
|
|
||
|
|
||
try: | def try_building_extension(): | ||
run_setup(True) | try: | ||
except BuildFailed: | run_setup(True) | ||
LINE = '=' * 74 | except BuildFailed: | ||
BUILD_EXT_WARNING = 'WARNING: The C extension could not be compiled, speedups are not enabled.' | LINE = '=' * 74 | ||
BUILD_EXT_WARNING = 'WARNING: The C extension could not be ' \ | |||
'compiled, speedups are not enabled.' | |||
|
|||
echo(LINE) | |||
echo(BUILD_EXT_WARNING) | |||
echo('Failure information, if any, is above.') | |||
echo('Retrying the build without the C extension now.') | |||
echo() | |||
|
|||
run_setup(False) | |||
|
|
||
echo(LINE) | echo(LINE) | ||
echo(BUILD_EXT_WARNING) | echo(BUILD_EXT_WARNING) | ||
echo('Failure information, if any, is above.') | echo('Plain-Python installation succeeded.') | ||
echo('Retrying the build without the C extension now.') | echo(LINE) | ||
echo() | |||
|
|
||
run_setup(False) | |||
|
|
||
echo(LINE) | if not (is_pypy or is_jython): | ||
echo(BUILD_EXT_WARNING) | try_building_extension() | ||
echo('Plain-Python installation succeeded.') | else: | ||
echo(LINE) | run_setpu(False) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
mitsuhiko
Author
Contributor
|
run_setpu? you sure you don't need tox? ;-)