setup.py
raw| 1 | #!/usr/bin/env python |
| 2 | import platform |
| 3 | |
| 4 | import setuptools |
| 5 | |
| 6 | if platform.python_implementation() == "CPython": |
| 7 | ext_modules = [ |
| 8 | setuptools.Extension( |
| 9 | "bitstruct.c", |
| 10 | sources=[ |
| 11 | "src/bitstruct/c.c", |
| 12 | "src/bitstruct/bitstream.c", |
| 13 | ], |
| 14 | ) |
| 15 | ] |
| 16 | else: |
| 17 | ext_modules = [] |
| 18 | |
| 19 | setuptools.setup( |
| 20 | ext_modules=ext_modules, |
| 21 | ) |