From 6e439ee89ec52df76130614d87ca47a5c8aa129c Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Mon, 4 Jul 2022 02:19:31 -0700 Subject: [PATCH] Modernize setuptools usage and setuptools_scm --- .git_archival.txt | 5 ++++- pyproject.toml | 8 +++----- setup.py | 9 +-------- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/.git_archival.txt b/.git_archival.txt index 082d6c25..3994ec0a 100644 --- a/.git_archival.txt +++ b/.git_archival.txt @@ -1 +1,4 @@ -ref-names: $Format:%D$ \ No newline at end of file +node: $Format:%H$ +node-date: $Format:%cI$ +describe-name: $Format:%(describe:tags=true)$ +ref-names: $Format:%D$ diff --git a/pyproject.toml b/pyproject.toml index a933a4fc..0ee491cd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,14 +1,12 @@ [build-system] requires = [ - "setuptools >= 30.3.0", - "wheel", - "setuptools_scm[toml] >= 3.4", - "setuptools_scm_git_archive" + "setuptools >= 52", + "setuptools_scm[toml] >= 7.0.3", + "wheel" ] build-backend = "setuptools.build_meta" [tool.setuptools_scm] -version_scheme = "post-release" [tool.black] line-length = 88 diff --git a/setup.py b/setup.py index 772b4bfa..20777974 100644 --- a/setup.py +++ b/setup.py @@ -8,11 +8,4 @@ from setuptools import setup -# Minimal setup to support older setuptools/setuptools_scm -setup( - setup_requires=[ # can be removed whenever we can drop pip 9 support - 'setuptools_scm', # so that version will work - 'setuptools_scm_git_archive', # enable version from github tarballs - ], - use_scm_version={'version_scheme': 'post-release'}, -) +setup()