From 65619a0f09157f1af4354b206b893b74b0626e5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Robert?= Date: Fri, 5 Apr 2024 09:57:10 +0200 Subject: [PATCH] MNT: migrate project static metadata from setup.cfg to pyproject.toml --- .flake8 | 2 ++ .pycodestyle | 2 ++ pyproject.toml | 55 ++++++++++++++++++++++++++++++++++++++++++++++- setup.cfg | 58 -------------------------------------------------- 4 files changed, 58 insertions(+), 59 deletions(-) create mode 100644 .flake8 create mode 100644 .pycodestyle delete mode 100644 setup.cfg diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..7da1f96 --- /dev/null +++ b/.flake8 @@ -0,0 +1,2 @@ +[flake8] +max-line-length = 100 diff --git a/.pycodestyle b/.pycodestyle new file mode 100644 index 0000000..62e7381 --- /dev/null +++ b/.pycodestyle @@ -0,0 +1,2 @@ +[pycodestyle] +max-line-length = 100 diff --git a/pyproject.toml b/pyproject.toml index cb51cff..c7e4034 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,62 @@ [build-system] requires = [ - "setuptools", + "setuptools>=61.2", "setuptools_scm>=6.2", "wheel", "jinja2>=2.10.3", "numpy>=2.0.0rc1", ] build-backend = 'setuptools.build_meta' + +[project] +name = "pyerfa" +authors = [{name = "The PyERFA Developers"}] +license = {text = "BSD 3-Clause License"} +description = "Python bindings for ERFA" +readme = "README.rst" +keywords = ["astronomy", "astrophysics", "cosmology", "space", "science", "coordinate"] +classifiers = [ + "Intended Audience :: Science/Research", + "License :: OSI Approved :: BSD License", + "Operating System :: OS Independent", + "Programming Language :: C", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: Implementation :: CPython", + "Topic :: Scientific/Engineering :: Astronomy", + "Topic :: Scientific/Engineering :: Physics", +] +urls = {Homepage = "https://github.com/liberfa/pyerfa"} +requires-python = ">=3.9" +dependencies = ["numpy>=1.19.3"] +dynamic = ["version"] + +[project.optional-dependencies] +test = [ + "pytest", + "pytest-doctestplus>=0.7", +] +docs = ["sphinx-astropy>=1.3"] + +[tool.setuptools] +# We set packages to find: to automatically find all sub-packages +zip-safe = false +license-files = ["LICENSE.rst"] +include-package-data = false + +[tool.setuptools.packages.find] +exclude = ["erfa._dev"] +namespaces = false + +[tool.pytest.ini_options] +minversion = "4.6" +testpaths = ["erfa", "docs", "README.rst"] +doctest_plus = "enabled" +doctest_optionflags = """ +NORMALIZE_WHITESPACE +ELLIPSIS +FLOAT_CMP +IGNORE_EXCEPTION_DETAIL""" +text_file_format = "rst" +addopts = "--doctest-rst" +xfail_strict = true +norecursedirs = ["erfa/_dev"] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index b08b565..0000000 --- a/setup.cfg +++ /dev/null @@ -1,58 +0,0 @@ -[metadata] -name = pyerfa -author = The PyERFA Developers -license = BSD 3-Clause License -license_files = LICENSE.rst -url = https://github.com/liberfa/pyerfa -description = Python bindings for ERFA -long_description = file: README.rst -keywords = astronomy, astrophysics, cosmology, space, science, coordinate -classifiers = - Intended Audience :: Science/Research - License :: OSI Approved :: BSD License - Operating System :: OS Independent - Programming Language :: C - Programming Language :: Python :: 3 - Programming Language :: Python :: Implementation :: CPython - Topic :: Scientific/Engineering :: Astronomy - Topic :: Scientific/Engineering :: Physics - -[options] -# We set packages to find: to automatically find all sub-packages -packages = find: -requires = numpy -zip_safe = False -tests_require = pytest-doctestplus -setup_requires = setuptools_scm -install_requires = numpy>=1.19 -python_requires = >=3.9 - -[options.packages.find] -exclude = erfa._dev - -[options.extras_require] -test = - pytest - pytest-doctestplus>=0.7 -docs = - sphinx-astropy>=1.3 - -[tool:pytest] -minversion = 4.6 -testpaths = "erfa" "docs" "README.rst" -doctest_plus = enabled -doctest_optionflags = - NORMALIZE_WHITESPACE - ELLIPSIS - FLOAT_CMP - IGNORE_EXCEPTION_DETAIL -text_file_format = rst -addopts = --doctest-rst -xfail_strict = true -norecursedirs = 'erfa/_dev' - -[flake8] -max-line-length = 100 - -[pycodestyle] -max-line-length = 100