Sync from SUSE:ALP:Source:Standard:1.0 python-setuptools_scm revision 8fd86b3359b791a0dc44f4060171e9aa

This commit is contained in:
Adrian Schröter 2024-01-05 10:08:09 +01:00
commit 0d0c53048c
6 changed files with 764 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

View File

@ -0,0 +1,599 @@
-------------------------------------------------------------------
Mon Sep 4 22:23:27 UTC 2023 - Dirk Müller <dmueller@suse.com>
- add setuptools-68.patch to fix tests with newer setuptools
-------------------------------------------------------------------
Wed May 10 23:05:26 UTC 2023 - Ben Greiner <code@bnavigator.de>
- Reinstate tomli requirement for Python < 3.11
-------------------------------------------------------------------
Wed May 10 06:24:15 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 7.1.0:
* use tomllib from stdlib
* handle non-ascii in setup.cfg
* implement fallback file finders for archives
* removed coding header in python template
* declared Python 3.11 support
* update .git_archival.txt templates match
* git-describe invocation
* fix handling of .git-archival.txt from tagged
commit
-------------------------------------------------------------------
Fri Apr 21 12:33:55 UTC 2023 - Dirk Müller <dmueller@suse.com>
- add sle15_python_module_pythons (jsc#PED-68)
-------------------------------------------------------------------
Thu Apr 13 22:44:47 UTC 2023 - Matej Cepl <mcepl@suse.com>
- Make calling of %{sle15modernpython} optional.
-------------------------------------------------------------------
Wed Nov 9 22:32:35 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Update to 7.0.5
* fixes #742 , #745: correctly hande accidentally released
archival files
- Release v7.0.4
* fix #727: correctly handle incomplete archivals from
setuptools_scm_git_archival
* fix #691: correctly handle specifying root in pyproject.toml
* correct root override check condition (to ensure absolute path
matching)
* allow root by the cli to be considered relative to the cli
(using abspath)
- Release v7.0.3
* fix mercurial usage when pip primes a isolated environment
* fix regression for branch names on git + add a test
- Release v7.0.2
* fix #723 and #722: remove bootstrap dependencies
* bugfix: ensure we read the distribution name from setup.cfg if
needed even for pyproject
- Release v7.0.1
* fix #718: Avoid `ModuleNotFoundError` by requiring
importlib_metadata in python < 3.8
- Release v7.0.0
* drop python 3.6 support
* include git archival support
* fix #707: support git version detection even when git protects
against mistmatched owners (common with misconfigured
containers, thanks @chrisburr )
- Release v6.4.3
* fix #548: correctly handle parsing the commit timestamp of HEAD
when ``log.showSignature`` is set
-------------------------------------------------------------------
Wed Feb 23 11:02:50 UTC 2022 - pgajdos@suse.com
- fix integration tests
-------------------------------------------------------------------
Sat Feb 5 20:29:24 UTC 2022 - Dirk Müller <dmueller@suse.com>
- update to 6.4.2:
* fix #671 : NoReturn is not avaliable in painfully dead python 3.6
* fix regression #669: restore get_version signature
* fix #668: harden the selftest for distribution extras
* compatibility adjustments for setuptools >58
* only put minimal setuptools version into toml extra to warn people with old strict pins
* coorectly handle hg-git self-use
* better mercurial detection
* modernize packaging setup
* python 3.10 support
* better handling of setuptools install command deprecation
* consider ``pyproject.tomls`` when running as command
* use list in git describe command to avoid shell expansions while supporting both windows and posix
* add ``--strip-dev`` flag to ``python -m setuptools_scm`` to print the next guessed version cleanly
* ensure no-guess-dev will fail on bad tags instead of generating invalid versions
* ensure we use utc everywhere to avoid confusion
-------------------------------------------------------------------
Sun Oct 3 21:10:32 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Drop add-rpmfail-pytest-markers.patch
-------------------------------------------------------------------
Sun Oct 3 19:23:29 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Update to 6.3.3
* only put minimal setuptools version into toml extra to warn
people with old strict pins
- Release 6.3.2
* fix #629: correctly convert Version data in tags_to_version
parser to avoid errors
- Release 6.3.1
* fix #625: restore tomli in install_requires after the
regression changes in took it out and some users never added
it even tho they have pyproject.toml files
- Release 6.3.0
* Warning
This release explicitly warns on unsupported setuptools. This
unfortunately has to happen as the legacy setup_requires
mechanism incorrectly configures the setuptools working-set
when a more recent setuptools version than available is
required.
As all releases of setuptools are affected as the historic
mechanism for ensuring a working setuptools setup was shipping
a ez_setup file next to setup.py, which would install the
required version of setuptools.
This mechanism has long since been deprecated and removed as
most people haven't been using it
* fix #612: depend on packaging to ensure version parsing parts
* fix #611: correct the typo that hid away the toml extra and
add it in setup.py as well
* fix #615: restore support for the git_archive plugin which
doesn't pass over the config
* restore the ability to run on old setuptools while to avoid
breaking pipelines
- Release 6.2.0
* fix #608: resolve tomli dependency issue by making it a hard
dependency as all intended/supported install options use pip/
wheel this is only a feature release
* ensure python 3.10 works
- Release 6.1.1
* fix #605: completely disallow bdist_egg - modern enough
setuptools>=45 uses pip
* fix #606: re-integrate and harden toml parsing
* fix #597: harden and expand support for figuring the current
distribution name from pyproject.toml (project.name or tool.
setuptools_scm.dist_name) section or setup.cfg (metadata.name)
- Release 6.1.0
* fix #587: don't fail file finders when distribution is not
given
* fix #524: new parameters normalize and version_cls to
customize the version normalization class.
* fix #585: switch from toml to tomli for toml 1.0 support
* fix #591: allow to opt in for searching parent directories in
the api
* fix #589: handle yaml encoding using the expected defaults
* fix #575: recommend storing the version_module inside of mypkg/
_version.py
* fix #571: accept branches starting with v as release branches
* fix #557: Use packaging.version for version_tuple
* fix #544: enhance errors on unsupported python/setuptools
versions
- Release v6.0.1
* fix #537: drop node_date on old git to avoid errors on missing
%cI
* v6.0.0
* fix #517: drop dead python support >3.6 required
* drop dead setuptools support > 45 required (can install wheels)
* drop egg building (use wheels)
* add git node_date metadata to get the commit time-stamp of HEAD
* allow version schemes to be priority ordered lists of version
schemes
* support for calendar versioning (calver) by date
- Release v5.0.2
* fix #415: use git for matching prefixes to support the windows
situation
- Release v5.0.1
* fix #509: support
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_${DISTRIBUTION_NAME} for
pyproject.toml
- Release 5.0.0
* fix #339: strict errors on missing scms when parsing a scm dir
to avoid false version lookups
* fix #337: if relative_to is a directory instead of a file,
consider it as direct target instead of the containing folder
and print a warning
* fix #352: add support for generally ignoring specific vcs roots
* fix #471: better error for version bump failing on complex but
accepted tag
* fix #479: raise indicative error when tags carry non-parsable
information
* Add no-guess-dev which does no next version guessing, just
adds .post1.devN in case there are new commits after the tag
* add python3.9
* enhance documentation
* consider SOURCE_DATE_EPOCH for versioning
* add a version_tuple to write_to templates
* fix #321: add support for the
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_${DISTRIBUTION_NAME} env
var to target the pretend key
* fix #142: clearly list supported scm
* fix #213: better error message for non-zero dev numbers in tags
* fix #356: add git branch to version on describe failure
-------------------------------------------------------------------
Tue Jan 12 10:07:27 UTC 2021 - Markéta Machová <mmachova@suse.com>
- Workaround pytest 6.2 failures
-------------------------------------------------------------------
Wed Jul 29 14:13:46 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
- update to 4.1.2
* include python 3.9 via the deadsnakes action
* fix handling of missing git/hg on python2.7 (python 3 exceptions where used)
* Add ``parentdir_project_version`` to support installs from GitHub release
tarballs.
* switch to declarative metadata
* select git tags based on the presence of numbers instead of dots
* enable getting a version form a parent folder prefix
* add release-branch-semver version scheme
* make global configuration available to version metadata
* drop official support for python 3.4
-------------------------------------------------------------------
Wed Mar 18 12:04:39 UTC 2020 - pgajdos@suse.com
- version update to 3.5.0
* add ``no-local-version`` local scheme and improve documentation for schemes
* fix #403: also sort out resource warnings when dealing with git file finding
-------------------------------------------------------------------
Fri Jan 31 10:24:46 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
- update to 3.4.3
* ensure the git file finder closes file descriptor after reading archive
* correctly transfer tag regex in the Configuration constructor
* correctly set up the default version scheme for pyproject usage.
* add support for projects built under setuptools declarative config
* ensure the git file finder closes filedescriptors even when errors happen
* clean out env vars from the git hook system to ensure correct function from within
-------------------------------------------------------------------
Fri Nov 1 08:54:02 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Update the add-rpmfail-pytest-markers.patch to not have
pin on old pytest
-------------------------------------------------------------------
Thu Jul 18 09:21:17 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Pin pytest3 for now, pytest4 and 5 work fine in upstream git
and will be solved with next release
-------------------------------------------------------------------
Tue May 14 11:26:42 UTC 2019 - Marketa Calabkova <mcalabkova@suse.com>
- update to 3.3.3
* adding the fallback_version option, which sets the version to
be used when everything else fails.
* use a specific fallback root when calling fallbacks.
* fix python3.8 support and add builds for up to python3.8
-------------------------------------------------------------------
Fri Apr 12 08:33:01 UTC 2019 - Dirk Mueller <dmueller@suse.com>
- fix add-rpmfail-pytest-markers.patch to build for older distros
-------------------------------------------------------------------
Tue Apr 2 14:47:52 CEST 2019 - Matej Cepl <mcepl@suse.com>
- Original patch by John Vandenberg, modified:
- Move pytest -k test exclusions into add-rpmfail-pytest-markers.patch
to clarify the reason for those failures
- Refine runtime Recommends from git to git-core
-------------------------------------------------------------------
Fri Mar 1 12:37:15 UTC 2019 - Ondřej Súkup <mimi.vx@gmail.com>
- Update to 3.2.0:
* adding the option git_describe_command to allow the user to control the
way that git describe is called.
-------------------------------------------------------------------
Thu Jan 24 15:37:06 UTC 2019 - Matěj Cepl <mcepl@suse.com>
- Remove BR for mercurial.
-------------------------------------------------------------------
Mon Sep 17 15:20:50 UTC 2018 - Ondřej Súkup <mimi.vx@gmail.com>
- remove tox.ini - it breaks tests with pytest-3.8.0
-------------------------------------------------------------------
Wed Aug 29 08:02:35 UTC 2018 - tchvatal@suse.com
- Fix Leap 42.3 build by moving Name above lua code expansion
-------------------------------------------------------------------
Sat Aug 11 16:28:16 UTC 2018 - arun@gmx.de
- update to version 3.1.0:
* fix #297 - correct the invocation in version_from_scm and
deprecate it as its exposed by accident
* fix #298 - handle git file listing on empty repositories
* fix #268 - deprecate ScmVersion.extra
-------------------------------------------------------------------
Wed Aug 8 15:54:22 UTC 2018 - jengelh@inai.de
- Use noun phrase in summary.
-------------------------------------------------------------------
Tue Aug 7 07:19:37 UTC 2018 - tchvatal@suse.com
- Fix the multibuild code
-------------------------------------------------------------------
Wed Aug 1 07:27:53 UTC 2018 - tchvatal@suse.com
- Update to 3.0.6:
* Solves issue with wrong version in egg-info
-------------------------------------------------------------------
Tue Jul 31 10:03:17 UTC 2018 - tchvatal@suse.com
- Add multibuild to run tests in -test package
-------------------------------------------------------------------
Tue Jul 31 09:12:41 UTC 2018 - tchvatal@suse.com
- Version update to 3.0.5:
* fix readme
* correct the deploy sections
-------------------------------------------------------------------
Tue Jul 24 04:53:44 UTC 2018 - arun@gmx.de
- update to version 3.0.2:
* fix a regression from tag parsing - support for multi-dashed
prefixes - #284
- changes from version 3.0.1:
* fix a regression in setuptools_scm.git.parse - reorder arguments
so the positional invocation from before works as expected #281
- changes from version 3.0.0:
* introduce pre-commit and use black
* print the origin module to help testing
* switch to src layout (breaking change)
* no longer alias tag and parsed_version in order to support
understanding a version parse failure
* require parse results to be ScmVersion or None (breaking change)
* fix #266 by requiring the prefix word to be a word again (breaking
change as the bug allowed arbitrary prefixes while the original
feature only allowed words")
* introduce a internal config object to allow the configruation fo
tag parsing and prefixes (thanks to @punkadiddle for introducing
it and passing it trough)
-------------------------------------------------------------------
Tue May 15 05:50:53 UTC 2018 - arun@gmx.de
- update to version 2.1.0:
* enhance docs for sphinx usage
* add symlink support to file finder for git #247 (thanks Stéphane
Bidoul)
* enhance tests handling win32 (thanks Stéphane Bidoul)
-------------------------------------------------------------------
Thu Apr 12 20:42:08 UTC 2018 - arun@gmx.de
- update to version 2.0.0:
* fix #237 - correct imports in code examples
* improve mercurial commit detection (thanks Aaron)
* breaking change: remove support for setuptools before parsed
versions
* reintroduce manifest as the travis deploy cant use the file finder
* reconfigure flake8 for future compatibility with black
* introduce support for branch name in version metadata and support
a opt-in simplified semver version scheme
-------------------------------------------------------------------
Fri Mar 23 23:59:40 UTC 2018 - arun@gmx.de
- update to version 1.17.0:
* fix regression in git support - use a function to ensure it works
in egg isntalled mode
* actually fail if file finding fails in order to see broken setups
instead of generating broken dists (thanks Mehdi ABAAKOUK for both)
- changes from version 1.16.2:
* fix regression in handling git export ignores (thanks Mehdi
ABAAKOUK)
- changes from version 1.16.1:
* fix regression in support for old setuptools versions (thanks
Marco Clemencic)
- changes from version 1.16.0:
* drop support for eol python versions
* #214 - fix missuse in surogate-escape api
* add the node-and-timestamp local version sheme
* respect git export ignores
* avoid shlex.split on windows
* fix #218 - better handling of mercurial edge-cases with tag
commits being considered as the tagged commit
* fix #223 - remove the dependency on the interal SetupttoolsVersion
as it was removed after long-standing deprecation
-------------------------------------------------------------------
Wed Mar 7 14:44:30 UTC 2018 - aplanas@suse.com
- Allows Recommends and Suggest in Fedora
-------------------------------------------------------------------
Tue Feb 27 18:15:58 UTC 2018 - aplanas@suse.com
- Recommends only for SUSE
-------------------------------------------------------------------
Sun Jan 28 18:50:36 UTC 2018 - arun@gmx.de
- specfile:
* update copyright year
- update to version 1.15.7:
* Fix #174 with #207: Re-use samefile backport as developed in
jaraco.windows, and only use the backport where samefile is not
available.
-------------------------------------------------------------------
Sun Sep 24 21:52:54 UTC 2017 - arun@gmx.de
- specfile:
* removed no-generic-python.patch, included upstream
- update to version 1.15.6:
* fix #174 by normalizing windows path using windows apis
- changes from version 1.15.6:
* fix #171 by unpinning the py version to allow a fixed one to get
installed
- changes from version 1.15.5:
* fix #167 by correctly respecting preformatted version metadata
from PKG-INFO/EGG-INFO
- changes from version 1.15.4:
* fix issue #164: iterate all found entry points to avoid erros when
pip remakes egg-info
* enhance self-use to enable pip install from github again
- changes from version 1.15.3:
* bring back correctly getting our version in the own sdist,
finalizes #114
* fix issue #150: strip local components of tags
- changes from version 1.15.2:
* fix issue #128: return None when a scm specific parse fails in a
worktree to ease parse reuse
- changes from version 1.15.1:
* fix issue #126: the local part of any tags is discarded when
guessing new versions
* minor performance optimization by doing fewer git calls in the
usual cases
-------------------------------------------------------------------
Mon Jun 26 14:09:51 UTC 2017 - jmatejek@suse.com
- also do not buildrequire mercurial unless specified
- bcond_with test to run the test suite
-------------------------------------------------------------------
Wed May 17 22:32:38 UTC 2017 - dimstar@opensuse.org
- Do not buildrequire git: having git in the build root causes a
build cycle over curl -> nghttp2 -> python-setuptoos_scm -> git.
- Do not run the tests relying on git's presence.
-------------------------------------------------------------------
Fri Mar 3 15:24:56 UTC 2017 - jmatejek@suse.com
- fix singlespec build
- no-generic-python.patch - run tests with the right python executable
to prevent stray pyc files where they don't belong
-------------------------------------------------------------------
Thu Mar 2 15:06:07 UTC 2017 - tbechtold@suse.com
- Fix Source url
-------------------------------------------------------------------
Thu Mar 2 14:48:44 UTC 2017 - tbechtold@suse.com
- Fix python_module macro definition
-------------------------------------------------------------------
Wed Jan 18 14:19:15 UTC 2017 - michael@stroeder.com
- updated source project URL (now github)
- source link without hash
-------------------------------------------------------------------
Sat Jan 14 18:44:19 UTC 2017 - hpj@urpla.net
- Update to v1.15.0
- more sophisticated ignoring of mercurial tag commits when considering
distance in commits (thanks Petre Mierlutiu)
- fix issue #114: stop trying to be smart for the sdist and ensure its always
correctly usign itself
- update trove classifiers
- fix issue #84: document using the installed package metadata for sphinx
- fix issue #81: fail more gracious when git/hg are missing
- address issue #93: provide an experimental api to customize behaviour on
shallow git repos a custom parse function may pick pre parse actions to do
when using git
- Update to v1.14.1
- fix #109: when detecting a dirty git workdir
- don't consider untracked file (this was a regression due to #86 in v1.13.1)
- consider the distance 0 when the git node is unknown (happens when you
haven't commited anything)
- Update to v1.14.0
- publish bdist_egg for python 2.6, 2.7 and 3.3-3.5
- fix issue #107 - dont use node if it is None
- Update to v1.13.1
- fix issue #86 - detect dirty git workdir without tags
- Update to v1.13.0
- fix regression caused by the fix of #101 * assert types for version dumping
* strictly pass all versions trough parsed version metadata
- Update to v1.12.0
- fix issue #97 - add support for mercurial plugins
- fix issue #101 - write version cache even for pretend version (thanks
anarcat for reporting and fixing)
-------------------------------------------------------------------
Tue Dec 6 12:18:07 UTC 2016 - buschmann23@opensuse.org
- changes source file URL
-------------------------------------------------------------------
Mon Dec 5 20:18:07 UTC 2016 - buschmann23@opensuse.org
- Update to 1.11.1:
* fix issue #88 - better docs for sphinx usage (thanks Jason)
* fix issue #89 - use normpath to deal with windows (thanks Te-jé
Rodgers for reporting and fixing)
- Update to 1.11.0:
* always run tag_to_version so in order to handle prefixes on old
setuptools (thanks to Brian May)
* drop support for python 3.2
* extend the error message on missing scm metadata (thanks Markus
Unterwaditzer)
* fix bug when using callable version_scheme (thanks Esben Haabendal)
-------------------------------------------------------------------
Tue Jan 12 17:07:35 UTC 2016 - michael@stroeder.com
- Update to 1.10.1:
v1.10.1
* fix issue #73 - in hg pre commit merge, consider parent1 instead of failing
v1.10.0
* add support for overriding the version number via the
environment variable SETUPTOOLS_SCM_PRETEND_VERSION
* fix isssue #63 by adding the --match parameter to the git describe call
and prepare the possibility of passing more options to scm backends
* fix issue #70 and #71 by introducing the parse keyword
to specify custom scm parsing, its an expert feature,
use with caution
this change also introduces the setuptools_scm.parse_scm_fallback
entrypoint which can be used to register custom archive fallbacks
v1.9.0
* Add :code:`relative_to` parameter to :code:`get_version` function;
fixes #44 per #45.
-------------------------------------------------------------------
Mon Nov 9 11:50:22 UTC 2015 - mcihar@suse.cz
- Update to 1.8.0:
* fix issue with setuptools wrong version warnings being printed to standard
out. User is informed now by distutils-warnings.
* restructure root finding, we now reliably ignore outer scm
and prefer PKG-INFO over scm, fixes #43 and #45
* correct the url to github
thanks David Szotten
* enhance scm not found errors with a note on git tarballs
thanks Markus
* add support for :code:`write_to_template`
-------------------------------------------------------------------
Wed Aug 12 14:53:54 UTC 2015 - toddrme2178@gmail.com
- Initial version

102
python-setuptools_scm.spec Normal file
View File

@ -0,0 +1,102 @@
#
# spec file
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%{?sle15_python_module_pythons}
Name: python-setuptools_scm%{psuffix}
Version: 7.1.0
Release: 0
Summary: Python setuptools handler for SCM tags
License: MIT
URL: https://github.com/pypa/setuptools_scm
Source: https://files.pythonhosted.org/packages/source/s/setuptools_scm/setuptools_scm-%{version}.tar.gz
# PATCH-FIX-UPSTREAM: https://github.com/pypa/setuptools_scm/pull/867
Patch1: setuptools-68.patch
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module packaging >= 20.0}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools >= 45}
BuildRequires: %{python_module typing-extensions}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-packaging >= 20.0
Requires: python-setuptools
Requires: python-typing-extensions
%if 0%{?python_version_nodots} < 38
Requires: python-importlib-metadata
%endif
%if 0%{?python_version_nodots} < 311
Requires: python-tomli >= 1
%endif
BuildArch: noarch
%if %{with test}
# Testing requirements
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools_scm = %{version}}
BuildRequires: %{python_module virtualenv > 20}
BuildRequires: git-core
BuildRequires: mercurial
%endif
%if 0%{?suse_version} || 0%{?fedora_version} >= 24
Recommends: git-core
%endif
%python_subpackages
%description
The setuptools_scm package handles managing one's Python package versions
in SCM metadata. It also handles file finders for the supperted SCMs.
%prep
%autosetup -p1 -n setuptools_scm-%{version}
%build
%pyproject_wheel
%install
%if !%{with test}
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%if %{with test}
%check
# pip download needs network
donttest="test_pip_download"
# tested file not installed into sitelib. Yes the test is named that way.
donttest+=" or test_git_archhival_from_unfiltered"
%pytest -k "not ($donttest)"
%endif
%if !%{with test}
%files %{python_files}
%license LICENSE
%doc README.rst CHANGELOG.rst
%{python_sitelib}/setuptools_scm
%{python_sitelib}/setuptools_scm-%{version}*-info
%endif
%changelog

34
setuptools-68.patch Normal file
View File

@ -0,0 +1,34 @@
From acb8a720bd6a74152bcd34401552221cc63e3817 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <slev@altlinux.org>
Date: Thu, 22 Jun 2023 15:36:48 +0300
Subject: [PATCH] tests: Specify version for test PEP621 metadata
According to today's specification
https://packaging.python.org/en/latest/specifications/declaring-project-metadata/#specification
> The only keys required to be statically defined are:
- name
The keys which are required but may be specified either
statically or listed as dynamic are:
- version
Fixes: https://github.com/pypa/setuptools_scm/issues/866
Signed-off-by: Stanislav Levin <slev@altlinux.org>
---
testing/test_integration.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/testing/test_integration.py b/testing/test_integration.py
index 98442724..c8bfc150 100644
--- a/testing/test_integration.py
+++ b/testing/test_integration.py
@@ -56,7 +56,8 @@ def test_pyproject_support(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> N
"[tool.setuptools_scm]\ndist_name='setuptools_scm_example'"
),
"pyproject.project": (
- "[project]\nname='setuptools_scm_example'\n[tool.setuptools_scm]"
+ "[project]\nname='setuptools_scm_example'\n"
+ "dynamic=['version']\n[tool.setuptools_scm]"
),
}

BIN
setuptools_scm-7.1.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.