File: setup.py

package info (click to toggle)
borghash 0.1.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,736 kB
  • sloc: python: 73; makefile: 3
file content (21 lines) | stat: -rw-r--r-- 527 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from setuptools import Extension, setup

try:
    from Cython.Build import cythonize
except ImportError:
    cythonize = None  # we don't have cython installed

ext = '.pyx' if cythonize else '.c'

extensions = [
    Extension("borghash.HashTable", ["src/borghash/HashTable" + ext]),
    Extension("borghash.HashTableNT", ["src/borghash/HashTableNT" + ext]),
]

if cythonize:
    extensions = cythonize(extensions, language_level="3str")

setup(
    package_data={"borghash": ["*.pxd", "*.pyx"]},
    ext_modules=extensions,
)