summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2018-04-02 22:43:52 -0400
committerYury Selivanov <yury@magic.io>2018-04-02 23:51:14 -0400
commit451a84825d82e7fba4022857085ee2977f9a1d09 (patch)
treef9dd6105d5ae5040a864c799cc747a19faaab1c6 /setup.py
parent552544080cd9a46c6be612f35b924515d998dbe9 (diff)
downloadimmutables-451a84825d82e7fba4022857085ee2977f9a1d09.tar.gz
immutables-451a84825d82e7fba4022857085ee2977f9a1d09.zip
Add pure Python implementation (compatible with PyPy)
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/setup.py b/setup.py
index b0cd4c9..40877c0 100644
--- a/setup.py
+++ b/setup.py
@@ -21,6 +21,17 @@ with open(os.path.join(
'unable to read the version from immutables/__init__.py')
+if platform.python_implementation() == 'CPython':
+ ext_modules = [
+ setuptools.Extension(
+ "immutables._map",
+ ["immutables/_map.c"],
+ extra_compile_args=CFLAGS)
+ ]
+else:
+ ext_modules = []
+
+
setuptools.setup(
name='immutables',
version=VERSION,
@@ -42,11 +53,6 @@ setuptools.setup(
packages=['immutables'],
provides=['immutables'],
include_package_data=True,
- ext_modules=[
- setuptools.Extension(
- "immutables._map",
- ["immutables/_map.c"],
- extra_compile_args=CFLAGS)
- ],
+ ext_modules=ext_modules,
test_suite='tests.suite',
)