Skip to content

Commit

Permalink
add support for py312 and np2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertDominguez committed Oct 5, 2024
1 parent 7722cbe commit 95eb7fd
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 17 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/cibuildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-2019, macos-13]
py: [cp39, cp310, cp311]
py: [cp39, cp310, cp311, cp312]

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
CIBW_TEST_COMMAND: pytest -v --cov=spotiflow {project}


- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
name: Upload wheels
with:
name: dist
Expand Down Expand Up @@ -120,5 +120,3 @@ jobs:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true


6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
The documentation of the software can be found [here](https://weigertlab.github.io/spotiflow/).

## Installation (pip, recommended)
Create and activate a fresh conda environment (we currently support Python 3.9 to 3.11):
Create and activate a fresh conda environment (we currently support Python 3.9 to 3.12):

```console
conda create -n spotiflow python=3.9
conda create -n spotiflow python=3.12
conda activate spotiflow
```

Expand All @@ -31,7 +31,7 @@ conda activate spotiflow

For Linux/Windows with a CUDA device, install PyTorch using conda/mamba (one might need to change the cuda version accordingly):
```console
conda install pytorch torchvision pytorch-cuda=11.8 -c pytorch -c nvidia # Might need to change the cuda version accordingly
conda install pytorch torchvision pytorch-cuda=12.1 -c pytorch -c nvidia # Might need to change the cuda version accordingly
```

**Note (for Windows users):** if using Windows, please install the latest [Build Tools for Visual Studio](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022) (make sure to select the C++ build tools during installation) before proceeding to install Spotiflow.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
requires = ["setuptools<=71.0",
"setuptools_scm[toml]>=6.2",
"wheel",
"oldest-supported-numpy"]
"numpy"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
Expand Down
5 changes: 3 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12

[options]
packages = find:
Expand All @@ -25,7 +26,7 @@ install_requires =
dask
lightning
networkx
numpy<2.0.0
numpy
pandas
Pillow
pydash
Expand All @@ -40,7 +41,7 @@ install_requires =
typing-extensions
wandb
zarr
python_requires = >=3.9, <3.12
python_requires = >=3.9, <3.13

[options.entry_points]
console_scripts =
Expand Down
14 changes: 7 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from __future__ import absolute_import, print_function
from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext
from numpy.distutils.misc_util import get_numpy_include_dirs
from numpy import get_include
from os import path

# ------------------------------------------------------------------------------------
Expand Down Expand Up @@ -76,37 +76,37 @@ def compile_patched(obj, src, ext, cc_args, extra_postargs, pp_opts):
"spotiflow.lib.spotflow2d",
sources=["spotiflow/lib/spotflow2d.cpp"],
extra_compile_args=["-std=c++11"],
include_dirs=get_numpy_include_dirs() + [nanoflann_root],
include_dirs=[get_include()] + [nanoflann_root],
),
Extension(
"spotiflow.lib.spotflow3d",
sources=["spotiflow/lib/spotflow3d.cpp"],
extra_compile_args=["-std=c++11"],
include_dirs=get_numpy_include_dirs() + [nanoflann_root],
include_dirs=[get_include()] + [nanoflann_root],
),
Extension(
"spotiflow.lib.point_nms",
sources=["spotiflow/lib/point_nms.cpp"],
extra_compile_args=["-std=c++11"],
include_dirs=get_numpy_include_dirs() + [nanoflann_root],
include_dirs=[get_include()] + [nanoflann_root],
),
Extension(
"spotiflow.lib.point_nms3d",
sources=["spotiflow/lib/point_nms3d.cpp"],
extra_compile_args=["-std=c++11"],
include_dirs=get_numpy_include_dirs() + [nanoflann_root],
include_dirs=[get_include()] + [nanoflann_root],
),
Extension(
"spotiflow.lib.filters",
sources=["spotiflow/lib/filters.cpp"],
extra_compile_args=["-std=c++11"],
include_dirs=get_numpy_include_dirs() + [nanoflann_root],
include_dirs=[get_include()] + [nanoflann_root],
),
Extension(
"spotiflow.lib.filters3d",
sources=["spotiflow/lib/filters3d.cpp"],
extra_compile_args=["-std=c++11"],
include_dirs=get_numpy_include_dirs() + [nanoflann_root],
include_dirs=[get_include()] + [nanoflann_root],
),
],
include_package_data=True,
Expand Down

0 comments on commit 95eb7fd

Please sign in to comment.