summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTres Seaver <tseaver@palladion.com>2016-04-14 14:03:12 -0400
committerTres Seaver <tseaver@palladion.com>2016-04-14 14:03:12 -0400
commit3e0b584b084815a3601e6efcf77976f19e84c417 (patch)
tree6561c0b1dc5bc472afbb4110f2bc769d1d16bc9b
parent1f70adee7a67c7a64326079036d77c6bb4a28348 (diff)
downloadzope-interface-3e0b584b084815a3601e6efcf77976f19e84c417.tar.gz
Add support for building/testing w/ 'PURE_PYTHON' defined.add-pure-test-support
-rw-r--r--setup.py3
-rw-r--r--tox.ini12
2 files changed, 13 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index ef10ca1..8879c5c 100644
--- a/setup.py
+++ b/setup.py
@@ -79,11 +79,12 @@ else:
py_impl = getattr(platform, 'python_implementation', lambda: None)
is_pypy = py_impl() == 'PyPy'
is_jython = 'java' in sys.platform
+ is_pure = 'PURE_PYTHON' in os.environ
# Jython cannot build the C optimizations, while on PyPy they are
# anti-optimizations (the C extension compatibility layer is known-slow,
# and defeats JIT opportunities).
- if is_pypy or is_jython:
+ if is_pypy or is_jython or is_pure:
features = {}
else:
features = {'codeoptimization': codeoptimization}
diff --git a/tox.ini b/tox.ini
index dd6591c..329acd8 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,6 @@
[tox]
envlist =
- py27,py33,py34,py35,pypy,pypy3,coverage,docs
+ py27,py27-pure,py33,py34,py34-pure,py35,pypy,pypy3,coverage,docs
[testenv]
commands =
@@ -8,6 +8,16 @@ commands =
deps =
zope.event
+[testenv:py27-pure]
+setenv =
+ PURE_PYTHON=1
+ PIP_CACHE_DIR = {envdir}/.cache
+
+[testenv:py34-pure]
+setenv =
+ PURE_PYTHON=1
+ PIP_CACHE_DIR = {envdir}/.cache
+
[testenv:py]
commands =
python --version