-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsetup.py
More file actions
29 lines (24 loc) · 798 Bytes
/
setup.py
File metadata and controls
29 lines (24 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
"""
sparrow
Next generation package for sequence parameter calculation
"""
from setuptools import setup, Extension, find_packages
from Cython.Build import cythonize
import os
import numpy
# defines the absolute path of where your cython files are
cython_dir = os.path.join("sparrow", "patterning")
# build a list of the files
cython_files = [os.path.join(cython_dir, f) for f in os.listdir(cython_dir) if f.endswith('.pyx')]
extensions = [
Extension(
name=f"sparrow.patterning.{os.path.splitext(os.path.basename(file))[0]}",
sources=[file],
include_dirs=[numpy.get_include()],
) for file in cython_files
]
setup(
ext_modules=cythonize(extensions, compiler_directives={'language_level': "3"}),
packages=find_packages(),
include_package_data=True,
)