| |
@@ -0,0 +1,116 @@
|
| |
+ %global srcname setuptools_scm_git_archive
|
| |
+
|
| |
+ Name: python-%{srcname}
|
| |
+ Version: 1.1
|
| |
+ Release: 4%{?dist}
|
| |
+ Summary: A setuptools_scm plugin that adds support for git archives
|
| |
+
|
| |
+ License: MIT
|
| |
+ URL: https://pypi.python.org/pypi/%{srcname}
|
| |
+ Source0: https://github.com/Changaco/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz
|
| |
+
|
| |
+ BuildArch: noarch
|
| |
+
|
| |
+ %description
|
| |
+ This is a setuptools_scm plugin that adds support for git archives (for example
|
| |
+ the ones GitHub automatically generates).
|
| |
+
|
| |
+ %package -n python3-%{srcname}
|
| |
+ Summary: %{summary}
|
| |
+ %{?python_provide:%python_provide python3-%{srcname}}
|
| |
+
|
| |
+ BuildRequires: python3-devel
|
| |
+ BuildRequires: python3-setuptools
|
| |
+ BuildRequires: python3-setuptools_scm
|
| |
+ BuildRequires: python3-pytest
|
| |
+ Requires: python3-setuptools_scm
|
| |
+
|
| |
+ %description -n python3-%{srcname}
|
| |
+ This is a setuptools_scm plugin that adds support for git archives (for example
|
| |
+ the ones GitHub automatically generates).
|
| |
+
|
| |
+
|
| |
+ %prep
|
| |
+ %autosetup -n %{srcname}-%{version}
|
| |
+
|
| |
+ %build
|
| |
+ # Here we set upstream version based on setuptools_scm documentation
|
| |
+ # this is done to avoid the following error:
|
| |
+ # LookupError: setuptools-scm was unable to detect version
|
| |
+ # since we are not importing a .git repository in the tarball
|
| |
+ export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
|
| |
+ %py3_build
|
| |
+
|
| |
+ %install
|
| |
+ # Here we set upstream version based on setuptools_scm documentation
|
| |
+ # this is done to avoid the following error:
|
| |
+ # LookupError: setuptools-scm was unable to detect version
|
| |
+ # since we are not importing a .git repository in the tarball
|
| |
+ export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
|
| |
+ %py3_install
|
| |
+ # Removing egg-info duplicated files
|
| |
+ rm -rf %{buildroot}/%{python3_sitelib}/%{srcname}-0-*.egg-info
|
| |
+
|
| |
+ %check
|
| |
+ %{python3} - <<EOF
|
| |
+ import pytest
|
| |
+ from pkg_resources import get_distribution, parse_version
|
| |
+ args = ['tests.py']
|
| |
+ if parse_version(get_distribution('setuptools_scm').version) < parse_version('1.16.0'):
|
| |
+ # the first test fails with setuptools_scm < 1.16.0
|
| |
+ args += ['-k', 'not test_archival_to_version[1.0-']
|
| |
+ pytest.main(args)
|
| |
+ EOF
|
| |
+
|
| |
+ %files -n python3-%{srcname}
|
| |
+ %license LICENSE
|
| |
+ %doc README.rst
|
| |
+ %{python3_sitelib}/%{srcname}-*.egg-info
|
| |
+ %{python3_sitelib}/%{srcname}
|
| |
+
|
| |
+ %changelog
|
| |
+ * Tue Dec 01 2020 Nikola Forró <nforro@redhat.com> - 1.1-4
|
| |
+ - Skip failing test on EPEL 8
|
| |
+
|
| |
+ * Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-3
|
| |
+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
| |
+
|
| |
+ * Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.1-2
|
| |
+ - Rebuilt for Python 3.9
|
| |
+
|
| |
+ * Sat Feb 29 2020 Athos Ribeiro <athoscr@fedoraproject.org> - 1.1-1
|
| |
+ - Update version
|
| |
+
|
| |
+ * Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-11
|
| |
+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
| |
+
|
| |
+ * Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0-10
|
| |
+ - Rebuilt for Python 3.8.0rc1 (#1748018)
|
| |
+
|
| |
+ * Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0-9
|
| |
+ - Rebuilt for Python 3.8
|
| |
+
|
| |
+ * Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-8
|
| |
+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
| |
+
|
| |
+ * Mon Feb 25 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0-7
|
| |
+ - Subpackage python2-setuptools_scm_git_archive has been removed
|
| |
+ See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
|
| |
+
|
| |
+ * Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-6
|
| |
+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
| |
+
|
| |
+ * Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-5
|
| |
+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
| |
+
|
| |
+ * Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.0-4
|
| |
+ - Rebuilt for Python 3.7
|
| |
+
|
| |
+ * Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-3
|
| |
+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
| |
+
|
| |
+ * Wed Sep 06 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 1.0-2
|
| |
+ - Add missing Requires on pythonX-setuptools_scm
|
| |
+
|
| |
+ * Mon Apr 10 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 1.0-1
|
| |
+ - Initial package
|
| |
Hello,
I intend to package rebase-helper for EPEL 8, and
python-setuptools_scm_git_archive
is one of its dependencies. If you are not interested in maintaining it in EPEL, I can take care of it.I had to introduce one change, because
setuptools_scm
in EPEL 8 is in version1.15.7
and handles certain things a bit differently, so one of the test cases ofsetuptools_scm_git_archive
fails. It doesn't seem to have any impact on the functionality though.