Commit 5aae589d authored by Jason Madden's avatar Jason Madden

Cleanups from review.

Detect pip installs with 'bdist_wheel' (or manual builds for upload) and don't let the C extensions fail to build unless PURE_PYTHON is set.
parent 0b663377
......@@ -85,9 +85,10 @@ def import_c_extension(mod_globals):
new_values.pop('__doc__', None)
mod_globals.update(new_values)
else:
# No C extension,
# make the Py versions available without that extension
for py in [k for k in mod_globals.keys() if k.endswith('Py')]:
# No C extension, make the Py versions available without that
# extension. The list comprehension both filters and prevents
# concurrent modification errors.
for py in [k for k in mod_globals if k.endswith('Py')]:
mod_globals[py[:-2]] = mod_globals[py]
# Assign the global aliases
......
......@@ -2302,7 +2302,6 @@ class ConflictTestBase(object):
super(ConflictTestBase, self).setUp()
_skip_if_pure_py_and_py_test(self)
def tearDown(self):
import transaction
transaction.abort()
......
......@@ -38,7 +38,7 @@ class TestBTreesUnicode(unittest.TestCase):
(b'future', 4),
(b'quick', 5),
(b'zerst\xf6rt', 6),
(b'dreit\xe4gigen'.decode('latin1'), 7),
(u'dreit\xe4gigen', 7),
]
self.tree = OOBTree()
......
......@@ -11,10 +11,11 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
from __future__ import print_function
__version__ = '4.4.1'
import os
import sys
from distutils.errors import CCompilerError
from distutils.errors import DistutilsExecError
......@@ -59,6 +60,11 @@ class optional_build_ext(build_ext):
print()
print(e)
print('*' * 80)
if 'bdist_wheel' in sys.argv and not os.environ.get("PURE_PYTHON"):
# pip uses bdist_wheel by default, and hides the error output.
# Let this error percolate up so the user can see it.
# pip will then go ahead and run 'setup.py install' directly.
raise
# Include directories for C extensions
# Sniff the location of the headers in 'persistent' or fall back
......
......@@ -32,7 +32,7 @@ setenv =
basepython =
python2.7
deps =
{[testenv]deps}
{[testenv]deps}
ZODB
[testenv:coverage]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment