diff --git a/.bumpversion.cfg b/.bumpversion.cfg deleted file mode 100644 index 6fbe6308..00000000 --- a/.bumpversion.cfg +++ /dev/null @@ -1,20 +0,0 @@ -[bumpversion] -current_version = 0.10.2.dev0 -commit = True -tag = True -sign_tags = True -parse = (?P\d+)\.(?P\d+)\.(?P\d+)(\.(?P[a-z]+)(?P\d+))? -serialize = - {major}.{minor}.{patch}.{release}{build} - {major}.{minor}.{patch} - -[bumpversion:part:release] -optional_value = prod -first_value = dev -values = - dev - prod - -[bumpversion:part:build] - -[bumpversion:file:setup.py] diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 931ec8b6..87e29b9b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9', '3.10', '3.11', '3.12'] + python-version: ['3.11', '3.12'] os: ['windows-latest', 'macos-latest', 'ubuntu-latest'] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/publish_pypi.yml b/.github/workflows/publish_pypi.yml index 953399e1..b0039914 100644 --- a/.github/workflows/publish_pypi.yml +++ b/.github/workflows/publish_pypi.yml @@ -10,7 +10,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: '3.11' - name: Build a binary wheel and a source tarball run: | python -mpip install build diff --git a/.isort.cfg b/.isort.cfg index d51435fa..52ac204c 100644 --- a/.isort.cfg +++ b/.isort.cfg @@ -1,5 +1,5 @@ [settings] -known_third_party = dask,fsspec,numcodecs,numpy,pytest,scipy,setuptools,skimage,zarr +known_third_party = dask,fsspec,numcodecs,numpy,pytest,scipy,skimage,zarr multi_line_output = 3 include_trailing_comma = True force_grid_wrap = 0 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..2327a521 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,64 @@ +[build-system] +requires = [ + "setuptools>=64", + "setuptools-scm>=8.0", +] +build-backend = "setuptools.build_meta" + +[tools.setuptools.dynamic] +version = {attr = "ome_zarr.__version__"} + +[project] +name = "ome-zarr" +readme = "README.rst" +dynamic = ["version"] +description="Implementation of images in Zarr files." + +requires-python = ">3.10" + +dependencies = [ + "numpy", + "dask", + "distributed", + "zarr>=2.8.1,<3", + "fsspec[s3]>=0.8,!=2021.07.0", + # See https://github.com/fsspec/filesystem_spec/issues/819 + "aiohttp<4", + "requests", + "scikit-image", + "toolz", +] +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: Science/Research", + "Topic :: Software Development :: Libraries :: Python Modules", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Operating System :: OS Independent", + "License :: OSI Approved :: BSD License", +] + +authors = [ + {name = "The Open Microscopy Team"}, +] + +[project.entry-points."console_scripts"] +ome_zarr = "ome_zarr.cli:main" + +[project.optional-dependencies] +tests = [ + "pytest", +] + +[project.urls] +Documentation = "https://ome-zarr.readthedocs.io" +Repository = "https://github.com/ome/ome-zarr-py" +Changelog = "https://github.com/ome/ome-zarr-py/blob/master/CHANGELOG.md" + +[tool.setuptools] +packages = ["ome_zarr"] +py-modules = ["ome_zarr"] + +[tool.setuptools_scm] +version_file = "ome_zarr/_version.py" diff --git a/setup.py b/setup.py deleted file mode 100644 index b01a8454..00000000 --- a/setup.py +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env python - -import codecs -import os - -from setuptools import setup - - -def read(fname): - file_path = os.path.join(os.path.dirname(__file__), fname) - return codecs.open(file_path, encoding="utf-8").read() - - -install_requires: list[list[str]] = [] -install_requires += (["dataclasses;python_version<'3.7'"],) -install_requires += (["tifffile<2020.09.22;python_version<'3.7'"],) -install_requires += (["numpy"],) -install_requires += (["dask"],) -install_requires += (["distributed"],) -install_requires += (["zarr>=2.8.1,<3"],) -install_requires += (["fsspec[s3]>=0.8,!=2021.07.0"],) -# See https://github.com/fsspec/filesystem_spec/issues/819 -install_requires += (["aiohttp<4"],) -install_requires += (["requests"],) -install_requires += (["scikit-image"],) -install_requires += (["toolz"],) - - -setup( - name="ome-zarr", - version="0.10.2.dev0", - author="The Open Microscopy Team", - url="https://github.com/ome/ome-zarr-py", - description="Implementation of images in Zarr files.", - long_description=read("README.rst"), - packages=["ome_zarr"], - py_modules=["ome_zarr"], - python_requires=">=3.9", - install_requires=install_requires, - classifiers=[ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: Science/Research", - "Topic :: Software Development :: Libraries :: Python Modules", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Operating System :: OS Independent", - "License :: OSI Approved :: BSD License", - ], - entry_points={ - "console_scripts": ["ome_zarr = ome_zarr.cli:main"], - }, - tests_require=["pytest"], -) diff --git a/tox.ini b/tox.ini index 8758f0ec..b58b94c7 100644 --- a/tox.ini +++ b/tox.ini @@ -1,11 +1,9 @@ [tox] -envlist = py{39,310,311,312} +envlist = py{311,312} [gh-actions] python = - 3.9: py39 - 3.10: py310 3.11: py311 3.12: py312