From 397829d1bc0c593509d93dadaca9a06c09616b54 Mon Sep 17 00:00:00 2001 From: Tyler Sutterley Date: Fri, 8 Aug 2025 16:37:34 -0700 Subject: [PATCH] refactor: drop `setuptools-scm` dependency --- README.rst | 1 - doc/environment.yml | 1 - doc/source/conf.py | 3 +-- doc/source/project/Citations.rst | 1 - environment.yml | 1 - pyproject.toml | 6 ++---- setup.py | 19 ------------------- timescale/__init__.py | 2 +- timescale/version.py | 2 +- version.txt | 1 - 10 files changed, 5 insertions(+), 32 deletions(-) delete mode 100644 setup.py delete mode 100644 version.txt diff --git a/README.rst b/README.rst index 767d107..9389b3c 100644 --- a/README.rst +++ b/README.rst @@ -64,7 +64,6 @@ Dependencies - `lxml: processing XML and HTML in Python `_ - `numpy: Scientific Computing Tools For Python `_ - `scipy: Scientific Tools for Python `_ -- `setuptools_scm: manager for python package versions using scm metadata `_ References ########## diff --git a/doc/environment.yml b/doc/environment.yml index 96d1c98..314ee50 100644 --- a/doc/environment.yml +++ b/doc/environment.yml @@ -13,7 +13,6 @@ dependencies: - python>=3.6 - python-dateutil - scipy - - setuptools_scm - sphinx - sphinx-argparse>=0.4 - sphinxcontrib-bibtex diff --git a/doc/source/conf.py b/doc/source/conf.py index f5748b2..8223998 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -26,8 +26,7 @@ copyright = f"2023\u2013{year}, Tyler C. Sutterley" author = 'Tyler C. Sutterley' -# The full version, including alpha/beta/rc tags -# get semantic version from setuptools-scm +# software version version = metadata["version"] # append "v" before the version release = f"v{version}" diff --git a/doc/source/project/Citations.rst b/doc/source/project/Citations.rst index 14a5e3e..c182b5c 100644 --- a/doc/source/project/Citations.rst +++ b/doc/source/project/Citations.rst @@ -25,7 +25,6 @@ This software is also dependent on other commonly used Python packages: - `lxml: processing XML and HTML in Python `_ - `numpy: Scientific Computing Tools For Python `_ - `scipy: Scientific Tools for Python `_ -- `setuptools_scm: manager for python package versions using scm metadata `_ Data Citations ############## diff --git a/environment.yml b/environment.yml index a75de8e..a4756c3 100644 --- a/environment.yml +++ b/environment.yml @@ -8,4 +8,3 @@ dependencies: - python>=3.6 - python-dateutil - scipy - - setuptools_scm diff --git a/pyproject.toml b/pyproject.toml index 93e06ee..2485cc9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,10 @@ [build-system] -requires = ["setuptools>=64", "setuptools_scm>=8"] +requires = ["setuptools>=64"] build-backend = "setuptools.build_meta" [project] name = "timescale" +version = "0.0.9" description = "Python tools for time and astronomical calculations" keywords = [ "Time", @@ -33,11 +34,8 @@ dependencies = [ "numpy", "python-dateutil", "scipy>=1.10.1", - "setuptools_scm", ] -dynamic = ["version"] - classifiers=[ "Development Status :: 3 - Alpha", "Intended Audience :: Science/Research", diff --git a/setup.py b/setup.py deleted file mode 100644 index 67fd1ae..0000000 --- a/setup.py +++ /dev/null @@ -1,19 +0,0 @@ -from setuptools import setup - -# get version -with open('version.txt', mode='r', encoding='utf8') as fh: - fallback_version = fh.read() - -# semantic version configuration for setuptools-scm -setup_requires = ["setuptools_scm"] -use_scm_version = { - "relative_to": __file__, - "local_scheme": "node-and-date", - "version_scheme": "python-simplified-semver", - "fallback_version":fallback_version, -} - -setup( - name='timescale', - use_scm_version=use_scm_version, -) diff --git a/timescale/__init__.py b/timescale/__init__.py index 0d26f5d..3fe0077 100644 --- a/timescale/__init__.py +++ b/timescale/__init__.py @@ -49,5 +49,5 @@ def from_list(*args, **kwargs): """ return timescale.time.Timescale().from_list(*args, **kwargs) -# get semantic version from setuptools-scm +# get version information __version__ = timescale.version.version diff --git a/timescale/version.py b/timescale/version.py index 9e27d16..c4a6143 100644 --- a/timescale/version.py +++ b/timescale/version.py @@ -1,7 +1,7 @@ #!/usr/bin/env python u""" version.py (11/2023) -Gets semantic version number and commit hash from setuptools-scm +Gets version number with importlib.metadata """ import importlib.metadata diff --git a/version.txt b/version.txt deleted file mode 100644 index c5d54ec..0000000 --- a/version.txt +++ /dev/null @@ -1 +0,0 @@ -0.0.9