diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..679960ee --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,73 @@ +[build-system] +requires = ["setuptools>=78.0.2", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "nixio" +version = "1.5.4" +description = "Python reimplementation of NIXIO (http://g-node.github.io/nix/)" +readme = "README.rst" +license-files = ["LICENSE"] +authors = [ + { name = "Christian Kellner" }, + { name = "Adrian Stoewer" }, + { name = "Andrey Sobolev" }, + { name = "Jan Grewe" }, + { name = "Balint Morvai" }, + { name = "Achilleas Koutsou" } +] +maintainers = [ + { name = "Christian Kellner", email = "dev@g-node.org" }, + { name = "Adrian Stoewer", email = "dev@g-node.org" }, + { name = "Andrey Sobolev", email = "dev@g-node.org" }, + { name = "Jan Grewe", email = "dev@g-node.org" }, + { name = "Balint Morvai", email = "dev@g-node.org" }, + { name = "Achilleas Koutsou", email = "dev@g-node.org" } +] +requires-python = ">=3.9" +dependencies = [ + "numpy >= 1.26.0", + "h5py>= 2.0.0" +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Scientific/Engineering" +] + +[project.urls] +Homepage = "https://github.com/G-Node/nixpy" +Documentation= "https://nixpy.readthedocs.io/en/latest/install.html" + +[project.optional-dependencies] +dev = [ + "coveralls", + "pytest", + "pytest-cov", + "pillow", + "matplotlib", + "scipy", + "sphinx", + "sphinx_rtd_theme" +] + +[tool.setuptools] +include-package-data = true +zip-safe = false + +[tool.setuptools.packages.find] +where = ["."] +include = [ + "nixio", + "nixio.hdf5", + "nixio.util", + "nixio.exceptions", + "nixio.cmd" +] + +[project.scripts] +nixio = "nixio.cmd.main:main" diff --git a/setup.cfg b/setup.cfg index 94c44805..2b4b225b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -9,9 +9,6 @@ all_files = 1 [upload_sphinx] upload-dir = build/docs -[metadata] -description_file = README.rst - [aliases] test=pytest diff --git a/setup.py b/setup.py deleted file mode 100644 index 63c58640..00000000 --- a/setup.py +++ /dev/null @@ -1,94 +0,0 @@ -#!/usr/bin/env python -import sys -import os -import json -from setuptools import setup - -__author__ = 'Christian Kellner, Achilleas Koutsou' - -if sys.version_info.major < 3 or (sys.version_info.major > 2 and sys.version_info.minor < 6): - sys.exit('Sorry, nixio requires python >= 3.6!') - -with open('README.rst') as f: - description_text = f.read() - -with open('LICENSE') as f: - license_text = f.read() - - -is_win = os.name == 'nt' - -# load info from nixio/info.json -with open(os.path.join("nixio", "info.json")) as infofile: - infodict = json.load(infofile) - -VERSION = infodict["VERSION"] -AUTHOR = infodict["AUTHOR"] -CONTACT = infodict["CONTACT"] -BRIEF = infodict["BRIEF"] -HOMEPAGE = infodict["HOMEPAGE"] - - -if "dev" in VERSION: - if is_win: - colorcodes = ("", "") - else: - colorcodes = ("\033[93m", "\033[0m") - sys.stderr.write("{}WARNING: You are building a development version " - "of nixpy.{}\n".format(*colorcodes)) - - -def get_wheel_data(): - data = [] - bin = os.environ.get('NIXPY_WHEEL_BINARIES', '') - if bin and os.path.isdir(bin): - data.append( - ('share/nixio/bin', - [os.path.join(bin, f) for f in os.listdir(bin)])) - return data - - -classifiers = [ - 'Development Status :: 5 - Production/Stable', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: 3.12', - 'Topic :: Scientific/Engineering' -] - -packages = ['nixio', - 'nixio.hdf5', - 'nixio.util', - 'nixio.exceptions', - 'nixio.cmd'] - -setup( - name='nixio', - version=VERSION, - author=AUTHOR, - author_email=CONTACT, - url=HOMEPAGE, - description=BRIEF, - long_description=description_text, - classifiers=classifiers, - license='BSD', - packages=packages, - scripts=[], - python_requires=">=3.6", - tests_require=['pytest', 'scipy', 'pillow', 'matplotlib'], - test_suite='pytest', - setup_requires=['pytest-runner'], - install_requires=['numpy', 'h5py'], - package_data={'nixio': [license_text, description_text]}, - include_package_data=True, - zip_safe=False, - data_files=get_wheel_data(), - entry_points={'console_scripts': [ - 'nixio=nixio.cmd.main:main' - ]} -)