From e3202c044264a3e2412b48db53ec3f5fbcf8ad16 Mon Sep 17 00:00:00 2001 From: yimli Date: Mon, 7 Aug 2023 20:42:56 +0200 Subject: [PATCH] Clean up and use setuptools-scm --- MANIFEST.in | 4 ++++ pyproject.toml | 10 ++++++++++ setup.py | 9 ++------- 3 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 MANIFEST.in create mode 100644 pyproject.toml diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..b6c5925 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,4 @@ +# setuptools-scm automatically adds all files managed by git +# Remove the tests directory +prune test +prune examples \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..1bbfda4 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,10 @@ +[build-system] +requires = [ + "setuptools>=45", + "wheel", + "setuptools_scm>=6.2" +] +build-backend = "setuptools.build_meta" + +[tool.setuptools_scm] +write_to = "sardana_adlink/_version.py" \ No newline at end of file diff --git a/setup.py b/setup.py index 6dd8187..c01b35c 100644 --- a/setup.py +++ b/setup.py @@ -3,17 +3,11 @@ from setuptools import setup, find_packages -# The version is updated automatically with bumpversion -# Do not update manually -__version = '2.0.0' - def main(): """Main method collecting all the parameters to setup.""" name = "sardana-adlink" - version = __version - description = "AdlinkAICoTi Sardana Controller" author = "ALBA" @@ -31,7 +25,8 @@ def main(): setup( name=name, - version=version, + use_scm_version=True, + setup_requires=["setuptools_scm"], description=description, author=author, author_email=author_email,