From 6ba2428dd8e297c3c2098f9a795bb76595a4f5e7 Mon Sep 17 00:00:00 2001 From: wakonig_k Date: Wed, 10 Apr 2024 15:29:34 +0200 Subject: [PATCH] build: moved to pyproject.toml --- .gitlab-ci.yml | 2 +- pyproject.toml | 40 ++++++++++++++++++++++++++++++++++++++++ setup.cfg | 24 ------------------------ setup.py | 24 ------------------------ 4 files changed, 41 insertions(+), 49 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 780d097..2791185 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -151,7 +151,7 @@ semver: - export REPOSITORY_PASSWORD=$CI_PYPI_TOKEN - > semantic-release publish -v DEBUG - -D version_variable=./setup.py:__version__ + -D version_toml=./pyproject.toml:project.version -D hvcs=gitlab allow_failure: false diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..3d79b2f --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,40 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "ophyd_devices" +version = "0.29.2" +description = "Custom device implementations based on the ophyd hardware abstraction layer" +requires-python = ">=3.10" +classifiers = [ + "Development Status :: 3 - Alpha", + "Programming Language :: Python :: 3", + "Topic :: Scientific/Engineering", +] +dependencies = [ + "ophyd", + "typeguard", + "prettytable", + "bec_lib", + "numpy", + "pyyaml", + "std_daq_client", + "pyepics", + "pytest", + "h5py", + "hdf5plugin", +] + +[project.optional-dependencies] +dev = ["black", "isort", "coverage", "pylint", "pytest", "pytest-random-order"] + +[project.scripts] +ophyd_test = "ophyd_devices:launch" + +[project.urls] +"Bug Tracker" = "https://gitlab.psi.ch/bec/ophyd_devices/issues" +Homepage = "https://gitlab.psi.ch/bec/ophyd_devices" + +[tool.hatch.build.targets.wheel] +include = ["*"] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index d43162b..0000000 --- a/setup.cfg +++ /dev/null @@ -1,24 +0,0 @@ -[metadata] -name = ophyd_devices -description = Custom device implementations based on the ophyd hardware abstraction layer -long_description = file: README.md -long_description_content_type = text/markdown -url = https://gitlab.psi.ch/bec/ophyd_devices -project_urls = - Bug Tracker = https://gitlab.psi.ch/bec/ophyd_devices/issues -classifiers = - Programming Language :: Python :: 3 - Development Status :: 3 - Alpha - Topic :: Scientific/Engineering - -[options] -package_dir = - = . -packages = find: -python_requires = >=3.10 - -[options.packages.find] -where = . - -[semantic_release] -version_variable = setup.py:__version__ diff --git a/setup.py b/setup.py deleted file mode 100644 index 949544b..0000000 --- a/setup.py +++ /dev/null @@ -1,24 +0,0 @@ -from setuptools import setup - -__version__ = "0.29.2" - -if __name__ == "__main__": - setup( - install_requires=[ - "ophyd", - "typeguard", - "prettytable", - "bec_lib", - "numpy", - "pyyaml", - "std_daq_client", - "pyepics", - "pytest", - "h5py", - "hdf5plugin", - ], - extras_require={"dev": ["pytest", "pytest-random-order", "black", "coverage"]}, - package_data={"ophyd_devices.smaract": ["smaract_sensors.json"]}, - entry_points={"console_scripts": ["ophyd_test = ophyd_devices:launch"]}, - version=__version__, - )