diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..38443c1d --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,56 @@ +[build-system] +requires = ["setuptools>=64",] +build-backend = "setuptools.build_meta" + +[project] +name = "oda_api" +dynamic = ["version"] +description = "API plugin for CDCI online data analysis" +authors = [ + {name = "Andrea Tramacere", email = "contact@odahub.io"}, + {name = "Volodymyr Savchenko", email = "contact@odahub.io"} +] +maintainers = [ + {name = "Gabriele Barni", email = "contact@odahub.io"}, + {name = "Denys Savchenko", email = "contact@odahub.io"} +] +readme = "README.md" +requires-python = ">=2.7" + +dependencies = [ + "requests", + "future", + "astropy>=3.2", + "json_tricks", + "matplotlib", + "numpy", + "jsonschema", + "pyjwt", + "astroquery", + "scipy", + "rdflib", + "black" +] + +[project.optional-dependencies] +test = [ + "pytest-xdist[psutil]", + "astroquery>=0.4.4", + "sentry_sdk" +] +extra-test = [ + "pytest-xdist[psutil]", + "astroquery>=0.4.4" +] +gw = [ + "gwpy", + "ligo.skymap" +] +ontology = [ + "rdflib" +] + +[project.scripts] +oda-api = "oda_api.cli:main" + +[tool.setuptools_scm] \ No newline at end of file diff --git a/setup.py b/setup.py index b764852a..609b3de5 100644 --- a/setup.py +++ b/setup.py @@ -1,15 +1,4 @@ -#!/usr/bin/env python - -from __future__ import absolute_import, division, print_function - -from builtins import (bytes, str, open, super, range, - zip, round, input, int, pow, object, map, zip) - -__author__ = 'andrea tramacere' - - -from distutils.core import setup -import glob +from setuptools import setup import json with open('oda_api/pkg_info.json') as fp: @@ -17,56 +6,7 @@ __version__ = _info['version'] - -include_package_data=True - -setup(name='oda_api', - version=__version__, - description='API plugin for CDCI online data analysis', - author='Andrea Tramacere, Volodymyr Savchenko', - author_email='contact@odahub.io', - packages=['oda_api'], - package_data={'oda_api': ['config_dir/*']}, - include_package_data=True, - install_requires=[ - "requests", - "future", - "astropy>=3.2", - "json_tricks", - "matplotlib", - "numpy", - "jsonschema", - "pyjwt", - "astroquery", - "scipy", - "rdflib", - "black" - ], - extras_require={ - 'test': [ - "pytest-xdist[psutil]", - "astroquery>=0.4.4", - "sentry_sdk" - ], - 'extra-test': [ - "pytest-xdist[psutil]", - "astroquery>=0.4.4", - ], - 'gw': [ - "gwpy", - "ligo.skymap" - ], - 'ontology': [ - "rdflib" - ] - }, - entry_points={ - "console_scripts": [ - "oda-api = oda_api.cli:main" - ] - }, - python_requires='>=2.7', - ) - - - +setup( + version=__version__, + setup_requires=['setuptools'], +)