Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
needs: [generate_matrix]
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')
if: github.event_name == 'pull_request' || github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')
strategy:
matrix:
os: ${{ fromJson(needs.generate_matrix.outputs.OSES) }}
Expand All @@ -81,13 +81,14 @@ jobs:
platforms: all

- name: Build wheels
uses: pypa/cibuildwheel@v2.11.2
uses: pypa/cibuildwheel@v2.16.0
env:
CIBW_ARCHS_MACOS: "x86_64 arm64"
CIBW_ARCHS_LINUX: ${{ fromJson(needs.generate_matrix.outputs.CIBW_ARCHS_LINUX) }}
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_EXTRAS: "py36"
CIBW_TEST_REQUIRES: "pytest scikit-learn"
CIBW_BEFORE_BUILD: "pip install numpy>=2.0.0"
CIBW_TEST_COMMAND: "pytest {package}/test"
CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-*"

- uses: actions/upload-artifact@v4
with:
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ homepage = "https://sites.google.com/view/yiqiuwang/dbscan"
repository = "https://github.com/wangyiqiu/dbscan-python"

[build-system]
requires = ["setuptools", "setuptools_scm", "wheel", "oldest-supported-numpy"]
requires = ["setuptools", "setuptools_scm", "wheel", "numpy>=2.0.0"]
backend = "setuptools.build_meta"

[tool.setuptools_scm]
write_to = "pythonmodule/_version.py"
Expand All @@ -53,7 +54,7 @@ write_to = "pythonmodule/_version.py"
# architectures, like ppc64le or s390x. You can do this by running the same
# command you run normally:
# pip install dbscan
build = "cp36-* cp38-macosx_arm64" # pp39-* cp39-win_arm64
build = "cp39-* cp310-* cp311-* cp312-*"
skip = "*-win32 *_i686 *-musllinux_*"

# We will only build x86_64 when merged into master to save on compilation
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,10 @@ def initialize_options(self):
]
)],
python_requires=f'>={sys.version_info.major}.{sys.version_info.minor},<4',
install_requires=[f'numpy>={numpy.__version__},<2'],
install_requires=['numpy>=2.0.0'],
extras_require={
'scikit-learn': ['scikit-learn'],
'example': ['scikit-learn', 'matplotlib'],
'py36': ['scikit-learn', 'matplotlib', 'pytest'],
},
zip_safe=False,

Expand Down