Skip to content

Commit 3203906

Browse files
committed
Build seq.pyx on install and use as default
* Ignore .so files in src/ Signed-off-by: Jono Yang <[email protected]>
1 parent 93f0af8 commit 3203906

File tree

9 files changed

+9934
-3
lines changed

9 files changed

+9934
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
# Python compiled files
55
*.py[cod]
6+
/src/*/*.so
67

78
# do not commit thirdparty cache of wheels
89
/thirdparty

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["setuptools", "wheel"]
2+
requires = ["cython", "setuptools", "wheel"]
33
build-backend = "setuptools.build_meta"
44

55
[tool.setuptools_scm]
@@ -69,7 +69,7 @@ include = [
6969
"."
7070

7171
]
72-
# ignore test data and testfiles: they should never be linted nor formatted
72+
# ignore test data and testfiles: they should never be linted nor formatted
7373
exclude = [
7474
# main style
7575
"**/tests/data/**/*",

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ install_requires =
7575
colorama >= 0.3.9
7676
commoncode >= 32.3.0
7777
container-inspector >= 31.0.0
78+
cython
7879
debian-inspector >= 31.1.0
7980
dparse2 >= 0.7.0
8081
fasteners

setup.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
#!/usr/bin/env python
22

33
import setuptools
4+
from Cython.Build import cythonize
5+
6+
7+
extensions = [
8+
setuptools.Extension("licensedcode.seq", ["src/licensedcode/seq.pyx"], language="c++"),
9+
]
410

511
if __name__ == "__main__":
6-
setuptools.setup()
12+
setuptools.setup(
13+
ext_modules=cythonize(extensions)
14+
)
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)