From a72add271da446b1553103174ee203b797cc041c Mon Sep 17 00:00:00 2001 From: Olivier Boulant Date: Tue, 1 Dec 2020 17:29:52 +0100 Subject: [PATCH 1/4] build(setup.py/cfg): add necessary files to sdist for build and automate build_ext --inplace --- setup.cfg | 2 ++ setup.py | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 setup.cfg diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..8f696136 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[build_ext] +inplace=1 diff --git a/setup.py b/setup.py index c279429e..b0e5540c 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,5 @@ from setuptools import setup, find_packages, Extension +from setuptools.command.build_ext import build_ext import numpy as np from Cython.Build import cythonize @@ -28,6 +29,22 @@ packages=find_packages(exclude=["docs", "tests*", "images"]), install_requires=["numpy", "scipy"], extras_require={"display": ["matplotlib"]}, + setup_requires=["cython", "numpy"], + package_data={ + "ruptures.detection._detection": [ + "ekcpd.pxd", + "ekcpd.pyx", + "ekcpd_computation.h", + "ekcpd_pelt_computation.h", + "kernels.h", + ], + "ruptures.utils._utils": [ + "convert_path_matrix.pyx", + "convert_path_matrix.pxd", + "convert_path_matrix_c.h", + ], + }, + cmdclass={"build_ext": build_ext}, python_requires=">=3", url="https://centre-borelli.github.io/ruptures-docs/", license="BSD License", From a62212ddc5a96abe9dfea731adb1f1ef8ca56c88 Mon Sep 17 00:00:00 2001 From: Olivier Boulant Date: Wed, 2 Dec 2020 13:16:11 +0100 Subject: [PATCH 2/4] build(setup.py/cfg): remove now implicit call to --- .github/workflows/check-docs.yml | 1 - .github/workflows/publish-doc-to-remote.yml | 1 - .github/workflows/run-test.yml | 1 - 3 files changed, 3 deletions(-) diff --git a/.github/workflows/check-docs.yml b/.github/workflows/check-docs.yml index 7e041665..429a0137 100644 --- a/.github/workflows/check-docs.yml +++ b/.github/workflows/check-docs.yml @@ -19,7 +19,6 @@ jobs: run: | python -m pip install --upgrade pip if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi - python setup.py build_ext --inplace python setup.py install - name: Run notebooks run: | diff --git a/.github/workflows/publish-doc-to-remote.yml b/.github/workflows/publish-doc-to-remote.yml index 2f676173..65c90cd5 100644 --- a/.github/workflows/publish-doc-to-remote.yml +++ b/.github/workflows/publish-doc-to-remote.yml @@ -23,7 +23,6 @@ jobs: run: | python -m pip install --upgrade pip if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi - python setup.py build_ext --inplace python setup.py install - name: Run notebooks run: | diff --git a/.github/workflows/run-test.yml b/.github/workflows/run-test.yml index 3c788179..c81b6a09 100644 --- a/.github/workflows/run-test.yml +++ b/.github/workflows/run-test.yml @@ -30,7 +30,6 @@ jobs: pip install -r requirements-dev.txt - name: Install ruptures run: | - python setup.py build_ext --inplace python setup.py install - name: Test with pytest run: | From 598d4bfd7247715b73702ea66513c0970b793b08 Mon Sep 17 00:00:00 2001 From: Charles T Date: Wed, 2 Dec 2020 14:15:20 +0100 Subject: [PATCH 3/4] doc: update installation instructions remove `python setup.py build_ext --inplace` --- CONTRIBUTING.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7b1c5d98..53af00de 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,7 +23,6 @@ cd ruptures Then install the downloaded package. ``` -python setup.py build_ext --inplace python -m pip install --verbose --no-build-isolation --editable . ``` From e7742d41bffede5f7a988e513c6e1d041a217237 Mon Sep 17 00:00:00 2001 From: Charles T Date: Wed, 2 Dec 2020 14:16:32 +0100 Subject: [PATCH 4/4] ci(circleci): update installation instructions remove `python setup.py build_ext --inplace` --- .circleci/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ae68a56e..61cd2c87 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,7 +34,6 @@ jobs: . venv/bin/activate python -m pip install --upgrade pip pip install -r requirements-dev.txt - python setup.py build_ext --inplace python setup.py install