diff --git a/pyproject.toml b/pyproject.toml index 113da5d..5ceb0fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,67 @@ +[project] +name = "costools" +description = "Tools for COS (Cosmic Origins Spectrograph)" +authors = [ + { name = "Warren Hack" }, + { name = "Nadezhda Dencheva" }, + { name = "Phil Hodge" }, +] +license-files = ["LICENSE.txt"] +classifiers = [ + "Intended Audience :: Science/Research", + "License :: OSI Approved :: BSD License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Topic :: Scientific/Engineering :: Astronomy", + "Topic :: Software Development :: Libraries :: Python Modules", +] +dependencies = [ + "astropy", + "calcos", + "numpy", + "stsci.tools", +] +dynamic = [ + "version", +] + +[project.readme] +file = "README.md" +content-type = "text/markdown" + +[project.scripts] +timefilter = "costools.timefilter:main" +add_cos_s_region = "costools.add_cos_s_region:call_main" + +[project.optional-dependencies] +docs = [ + "sphinx", + "numpydoc", + "sphinx-rtd-theme", +] +test = [ + "pytest", + "pytest-cov", +] + [build-system] requires = [ - "setuptools>=38.2.5", + "setuptools>=61.2", "setuptools_scm", "wheel", ] +build-backend = "setuptools.build_meta" + +[tool.setuptools] +include-package-data = false + +[tool.setuptools.packages.find] + +[tool.setuptools.package-data] +costools = [ + "pars/*", + "*.help", +] + +[tool.setuptools_scm] +version_file = "costools/version.py" diff --git a/setup.py b/setup.py deleted file mode 100755 index 7db4573..0000000 --- a/setup.py +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env python -from setuptools import find_packages -from setuptools import setup - - -PACKAGENAME = 'costools' - -setup( - name=PACKAGENAME, - use_scm_version={'write_to': 'costools/version.py'}, - setup_requires=['setuptools_scm'], - install_requires=[ - 'astropy', - 'calcos', - 'numpy', - 'stsci.tools', - ], - extras_require={ - 'docs': [ - 'sphinx', - 'numpydoc', - ], - 'test': [ - 'pytest', - 'pytest-cov', - ], - }, - packages=find_packages(), - package_data={ - PACKAGENAME: [ - 'pars/*', - '*.help', - ], - }, - entry_points={ - 'console_scripts': [ - 'timefilter = {0}.timefilter:main'.format(PACKAGENAME), - 'add_cos_s_region = {}.add_cos_s_region:call_main'.format(PACKAGENAME), - ], - }, - scripts=[ - 'costools/add_cos_s_region.py', - ], - author='Warren Hack, Nadezhda Dencheva, Phil Hodge', - description='Tools for COS (Cosmic Origins Spectrograph)', - long_description='README.md', - long_description_content_type='text/x-rst', - url='https://github.com/spacetelescope/costools', - license='BSD', - classifiers=[ - 'Intended Audience :: Science/Research', - 'License :: OSI Approved :: BSD License', - 'Operating System :: OS Independent', - 'Programming Language :: Python', - 'Topic :: Scientific/Engineering :: Astronomy', - 'Topic :: Software Development :: Libraries :: Python Modules', - ], -)