From 014e0bd4b46e0a9db54fefc4ef92295ee25b9f87 Mon Sep 17 00:00:00 2001 From: Charles Stern <62192187+cisaacstern@users.noreply.github.com> Date: Fri, 25 Aug 2023 14:36:47 -0700 Subject: [PATCH] dynamic versioning with setuptools_scm --- .gitignore | 1 + pyproject.toml | 11 +++++++++++ setup.py | 2 -- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b6e47617..babaf104 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,7 @@ share/python-wheels/ .installed.cfg *.egg MANIFEST +_version.py # PyInstaller # Usually these files are written by a python script from a template diff --git a/pyproject.toml b/pyproject.toml index 669ca4fe..c53624c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,14 @@ +[build-system] +requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"] + +[project] +name = "pangeo-forge-runner" +dynamic = ["version"] + +[tool.setuptools_scm] +write_to = "pangeo_forge_runner/_version.py" +write_to_template = "__version__ = '{version}'" + [tool.isort] # Prevent isort & black from fighting each otherd profile = "black" diff --git a/setup.py b/setup.py index 7dbe2377..8045847a 100644 --- a/setup.py +++ b/setup.py @@ -4,13 +4,11 @@ readme = f.read() setup( - name="pangeo-forge-runner", description="Commandline tool to manage pangeo-forge feedstocks", long_description=readme, long_description_content_type="text/markdown", author="Yuvi Panda", author_email="yuvipanda@gmail.com", - version="0.7.2", packages=find_packages(), python_requires=">=3.9", install_requires=[