commit 9b1e6d51f7000d56e019f0e6ac985eedbe4fbc8be014c37ceef18b20996ba859 Author: Matej Cepl Date: Mon Oct 31 20:17:49 2022 +0000 Accepting request 1032569 from home:bnavigator:branches:devel:languages:python:numeric required by bokeh 3 OBS-URL: https://build.opensuse.org/request/show/1032569 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools-git-versioning?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_service b/_service new file mode 100644 index 0000000..f4a643c --- /dev/null +++ b/_service @@ -0,0 +1,19 @@ + + + https://github.com/dolfinus/setuptools-git-versioning.git + git + @PARENT_TAG@ + yes + @PARENT_TAG@ + v(.*) + \1 + + + yes + + + *.tar + xz + + + diff --git a/python-setuptools-git-versioning.changes b/python-setuptools-git-versioning.changes new file mode 100644 index 0000000..0853cd9 --- /dev/null +++ b/python-setuptools-git-versioning.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Mon Oct 31 12:22:11 UTC 2022 - Ben Greiner + +- Initial specfile for v 1.21.1 +- Required to build bokeh 3 diff --git a/python-setuptools-git-versioning.spec b/python-setuptools-git-versioning.spec new file mode 100644 index 0000000..20b1951 --- /dev/null +++ b/python-setuptools-git-versioning.spec @@ -0,0 +1,105 @@ +# +# spec file for package python-setuptools-git-versioning +# +# Copyright (c) 2022 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/ +# + + +Name: python-setuptools-git-versioning +Version: 1.12.1 +Release: 0 +Summary: Use git repo data for building a version number according PEP-440 +License: MIT +URL: https://setuptools-git-versioning.readthedocs.io +# no sdist on PyPI, needs full git metadata for bootstrap, run osc service runall to update +Source: setuptools-git-versioning-%{version}.tar.xz +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: git-core +Requires: python-Deprecated +Requires: python-packaging +Requires: python-setuptools +Requires(post): update-alternatives +Requires(postun):update-alternatives +Provides: python-setuptools_git_versioning = %{version}-%{release} +BuildArch: noarch +%if 0%{python_version_nodots} < 311 +Requires: python-toml +%endif +# SECTION test +BuildRequires: %{python_module Deprecated} +BuildRequires: %{python_module build} +BuildRequires: %{python_module coverage} +BuildRequires: %{python_module packaging} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module toml if %python-base < 3.11} +BuildRequires: git-core +# /SECTION +%python_subpackages + +%description +Use git repo data (latest tag, current commit hash, etc) for building a +version number according PEP440. + + - Can be installed & configured through both `setup.py` and :PEP518's `pyproject.toml` + - Does not require to change source code of the project + - Tag-, file-, and callback-based versioning schemas are supported + - Templates for *tag*, *dev* and *dirty* versions are separated + - Templates support a lot of substitutions including git and environment information + +%prep +%setup -q -n setuptools-git-versioning-%{version} +# avoid dirty version +echo _build* >> .gitignore +echo _current_flavor >> .gitignore +git add .gitignore +git config user.email "abuild@obs.local" +git config user.name "abuild on obs" +git commit -m "stay clean" +git tag --force v%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/setuptools-git-versioning +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +# cannot test isolated: no wheels for setuptools, wheel, coverage. Modify after wheel build +sed -i '/assert get_version(repo, isolated=True)/d' tests/test_integration/test_config.py +# test tries to get a wheel wheel in isolated build env +donttest="test_substitution_env" +# short git hash has only 7 characters on i586 +donttest="$donttest or (test_version_file_count_commits and sha)" +%pytest -k "not ($donttest)" + +%post +%python_install_alternative setuptools-git-versioning + +%postun +%python_uninstall_alternative setuptools-git-versioning + +%files %{python_files} +%python_alternative %{_bindir}/setuptools-git-versioning +%{python_sitelib}/setuptools_git_versioning.py* +%{python_sitelib}/setuptools_git_versioning-%{version}*-info +%pycache_only %{python_sitelib}/__pycache__/setuptools_git_versioning*.pyc + +%changelog diff --git a/setuptools-git-versioning-1.12.1.tar.xz b/setuptools-git-versioning-1.12.1.tar.xz new file mode 100644 index 0000000..cc55d72 --- /dev/null +++ b/setuptools-git-versioning-1.12.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:22f7cc28f43a293ecaf8796b9b9e758a9977b57e115df96952f5421b074ff78c +size 293900