diff --git a/.bumpversion.cfg b/.bumpversion.cfg deleted file mode 100644 index a1c533f6..00000000 --- a/.bumpversion.cfg +++ /dev/null @@ -1,20 +0,0 @@ -[bumpversion] -current_version = 0.8.4.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/publish_pypi.yml b/.github/workflows/publish_pypi.yml index 436eafbf..b58f5720 100644 --- a/.github/workflows/publish_pypi.yml +++ b/.github/workflows/publish_pypi.yml @@ -11,8 +11,8 @@ jobs: - uses: actions/setup-python@v4 - name: Build a binary wheel and a source tarball run: | - python -mpip install wheel - python setup.py sdist bdist_wheel + python -mpip install wheel build + python -m build - name: Publish distribution to PyPI if: startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@v1.3.0 diff --git a/.isort.cfg b/.isort.cfg index fec62009..0f1f7e33 100644 --- a/.isort.cfg +++ b/.isort.cfg @@ -1,5 +1,5 @@ [settings] -known_third_party = dask,numcodecs,numpy,pytest,scipy,setuptools,skimage,zarr +known_third_party = dask,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..c43cd5a5 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,61 @@ +[build-system] +requires = [ + "setuptools>=60", + "setuptools-scm>=8.0", +] + +[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.8" + +dependencies = [ + "tifffile", + "numpy", + "dask", + "distributed", + "zarr>=2.8.1", + "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"] diff --git a/setup.py b/setup.py deleted file mode 100644 index 56c0145f..00000000 --- a/setup.py +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env python - -import codecs -import os -from typing import List - -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"],) -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.8.4.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.6", - 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"], -)