Accepting request 1179651 from devel:languages:python
- update to 8.1.0: * correctly handle project config overrides when the version keyword is used together with pyproject.toml * Reword docker usage hint * Updated `entangled-cli` to account for not having `rich` extra * Documenting `SETUPTOOLS_SCM_PRETEND_VERSION_FOR_${NORMALIZED_DIST_NAME}` * Update URL * Fix misspelling found by codespell * Only depend on typing_extensions for Python < 3.10 * fix 1018 allow non normalized semver - drop setuptools-scm-issue1038-git-2-45-0.patch, setuptools-scm-issue953-nowarn.patch: obsolete OBS-URL: https://build.opensuse.org/request/show/1179651 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-setuptools_scm?expand=0&rev=37
This commit is contained in:
commit
f6645f282a
@ -1,3 +1,21 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 10 07:55:55 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 8.1.0:
|
||||
* correctly handle project config overrides when the version
|
||||
keyword is used together with pyproject.toml
|
||||
* Reword docker usage hint
|
||||
* Updated `entangled-cli` to account for not having `rich`
|
||||
extra
|
||||
* Documenting
|
||||
`SETUPTOOLS_SCM_PRETEND_VERSION_FOR_${NORMALIZED_DIST_NAME}`
|
||||
* Update URL
|
||||
* Fix misspelling found by codespell
|
||||
* Only depend on typing_extensions for Python < 3.10
|
||||
* fix 1018 allow non normalized semver
|
||||
- drop setuptools-scm-issue1038-git-2-45-0.patch,
|
||||
setuptools-scm-issue953-nowarn.patch: obsolete
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 3 17:19:17 UTC 2024 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
|
@ -27,16 +27,12 @@
|
||||
%endif
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-setuptools_scm%{psuffix}
|
||||
Version: 8.0.4
|
||||
Version: 8.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-FEATURE-OPENSUSE setuptools-scm-issue953-nowarn.patch gh#pypa/setuptools_scm#953 -- don't warn if setuptools_scm is present but not directly used
|
||||
Patch0: setuptools-scm-issue953-nowarn.patch
|
||||
# PATCH-FIX-UPSTREAM setuptools-scm-issue1038-git-2-45-0.patch gp#pypa/setuptools_scm#1038 -- fix build with git 2.45.0
|
||||
Patch1: setuptools-scm-issue1038-git-2-45-0.patch
|
||||
Source: https://files.pythonhosted.org/packages/source/s/setuptools-scm/setuptools_scm-%{version}.tar.gz
|
||||
BuildRequires: %{python_module base >= 3.8}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools >= 61}
|
||||
@ -46,7 +42,6 @@ BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-packaging >= 20.0
|
||||
Requires: python-setuptools
|
||||
Requires: python-typing-extensions
|
||||
BuildArch: noarch
|
||||
%if 0%{?python_version_nodots} < 311
|
||||
Requires: python-tomli >= 1
|
||||
@ -56,6 +51,7 @@ Requires: python-tomli >= 1
|
||||
BuildRequires: %{python_module build}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools_scm = %{version}}
|
||||
BuildRequires: %{python_module typing-extensions if %python-base < 3.11}
|
||||
BuildRequires: git-core
|
||||
BuildRequires: mercurial
|
||||
%endif
|
||||
@ -69,7 +65,7 @@ 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}
|
||||
%autosetup -p1 -n setuptools_scm-%{version}
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b5f43ff6800669595193fd09891564ee9d1d7dcb196cab4b2506d53a2e1c95c7
|
||||
size 74280
|
@ -1,48 +0,0 @@
|
||||
Index: setuptools-scm-8.0.4/testing/test_git.py
|
||||
===================================================================
|
||||
--- setuptools-scm-8.0.4.orig/testing/test_git.py
|
||||
+++ setuptools-scm-8.0.4/testing/test_git.py
|
||||
@@ -494,6 +494,22 @@ def test_git_getdate_badgit(
|
||||
assert git_wd.get_head_date() is None
|
||||
|
||||
|
||||
+def test_git_getdate_git_2_45_0_plus(
|
||||
+ wd: WorkDir, caplog: pytest.LogCaptureFixture, monkeypatch: pytest.MonkeyPatch
|
||||
+) -> None:
|
||||
+ wd.commit_testfile()
|
||||
+ git_wd = git.GitWorkdir(wd.cwd)
|
||||
+ fake_date_result = CompletedProcess(
|
||||
+ args=[], stdout="2024-04-30T22:33:10Z", stderr="", returncode=0
|
||||
+ )
|
||||
+ with patch.object(
|
||||
+ git,
|
||||
+ "run_git",
|
||||
+ Mock(return_value=fake_date_result),
|
||||
+ ):
|
||||
+ assert git_wd.get_head_date() == date(2024, 4, 30)
|
||||
+
|
||||
+
|
||||
@pytest.fixture()
|
||||
def signed_commit_wd(monkeypatch: pytest.MonkeyPatch, wd: WorkDir) -> WorkDir:
|
||||
if not has_command("gpg", args=["--version"], warn=False):
|
||||
Index: setuptools-scm-8.0.4/src/setuptools_scm/git.py
|
||||
===================================================================
|
||||
--- setuptools-scm-8.0.4.orig/src/setuptools_scm/git.py
|
||||
+++ setuptools-scm-8.0.4/src/setuptools_scm/git.py
|
||||
@@ -5,6 +5,7 @@ import logging
|
||||
import os
|
||||
import re
|
||||
import shlex
|
||||
+import sys
|
||||
import warnings
|
||||
from datetime import date
|
||||
from datetime import datetime
|
||||
@@ -118,6 +119,8 @@ class GitWorkdir(Workdir):
|
||||
if "%c" in timestamp_text:
|
||||
log.warning("git too old -> timestamp is %r", timestamp_text)
|
||||
return None
|
||||
+ if sys.version_info < (3, 11) and timestamp_text.endswith("Z"):
|
||||
+ timestamp_text = timestamp_text[:-1] + "+00:00"
|
||||
return datetime.fromisoformat(timestamp_text).date()
|
||||
|
||||
res = run_git(
|
@ -1,12 +0,0 @@
|
||||
https://github.com/pypa/setuptools_scm/issues/953
|
||||
|
||||
--- setuptools-scm-8.0.4.orig/src/setuptools_scm/_integration/setuptools.py
|
||||
+++ setuptools-scm-8.0.4/src/setuptools_scm/_integration/setuptools.py
|
||||
@@ -116,6 +116,6 @@
|
||||
try:
|
||||
config = _config.Configuration.from_file(dist_name=dist_name)
|
||||
except LookupError as e:
|
||||
- log.warning(e)
|
||||
+ log.info(e)
|
||||
else:
|
||||
_assign_version(dist, config)
|
BIN
setuptools_scm-8.1.0.tar.gz
(Stored with Git LFS)
Normal file
BIN
setuptools_scm-8.1.0.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user