Skip to content

Commit 8c9aa35

Browse files
authored
build(setup.py/cfg): add build_ext to setup.py (#88)
1 parent 10ef8e8 commit 8c9aa35

7 files changed

Lines changed: 19 additions & 5 deletions

File tree

.circleci/config.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ jobs:
3434
. venv/bin/activate
3535
python -m pip install --upgrade pip
3636
pip install -r requirements-dev.txt
37-
python setup.py build_ext --inplace
3837
python setup.py install
3938
4039

.github/workflows/check-docs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ jobs:
1919
run: |
2020
python -m pip install --upgrade pip
2121
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
22-
python setup.py build_ext --inplace
2322
python setup.py install
2423
- name: Run notebooks
2524
run: |

.github/workflows/publish-doc-to-remote.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ jobs:
2323
run: |
2424
python -m pip install --upgrade pip
2525
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
26-
python setup.py build_ext --inplace
2726
python setup.py install
2827
- name: Run notebooks
2928
run: |

.github/workflows/run-test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ jobs:
3333
pip install -r requirements-dev.txt
3434
- name: Install ruptures
3535
run: |
36-
python setup.py build_ext --inplace
3736
python setup.py install
3837
- name: Test with pytest
3938
run: |

CONTRIBUTING.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ cd ruptures
2323
Then install the downloaded package.
2424

2525
```
26-
python setup.py build_ext --inplace
2726
python -m pip install --verbose --no-build-isolation --editable .
2827
```
2928

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[build_ext]
2+
inplace=1

setup.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from setuptools import setup, find_packages, Extension
2+
from setuptools.command.build_ext import build_ext
23
import numpy as np
34
from Cython.Build import cythonize
45

@@ -28,6 +29,22 @@
2829
packages=find_packages(exclude=["docs", "tests*", "images"]),
2930
install_requires=["numpy", "scipy"],
3031
extras_require={"display": ["matplotlib"]},
32+
setup_requires=["cython", "numpy"],
33+
package_data={
34+
"ruptures.detection._detection": [
35+
"ekcpd.pxd",
36+
"ekcpd.pyx",
37+
"ekcpd_computation.h",
38+
"ekcpd_pelt_computation.h",
39+
"kernels.h",
40+
],
41+
"ruptures.utils._utils": [
42+
"convert_path_matrix.pyx",
43+
"convert_path_matrix.pxd",
44+
"convert_path_matrix_c.h",
45+
],
46+
},
47+
cmdclass={"build_ext": build_ext},
3148
python_requires=">=3",
3249
url="https://centre-borelli.github.io/ruptures-docs/",
3350
license="BSD License",

0 commit comments

Comments
 (0)