From b19e38b9557b3986a54b019893993ea3c7787d76 Mon Sep 17 00:00:00 2001 From: James Antill Date: Mon, 8 Aug 2022 14:00:10 -0400 Subject: [PATCH] Import rpm: 613aec49c31ebdfae7f4bb52da82cef2383b986e --- .gitignore | 1 + gating.yaml | 6 +++ python-setuptools_scm.spec | 88 ++++++++++++++++++++++++++++++++++++++ sources | 1 + tests/tests.yml | 20 +++++++++ 5 files changed, 116 insertions(+) create mode 100644 .gitignore create mode 100644 gating.yaml create mode 100644 python-setuptools_scm.spec create mode 100644 sources create mode 100644 tests/tests.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0cb7493 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/setuptools_scm-1.15.7.tar.gz diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..648918d --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-9 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/python-setuptools_scm.spec b/python-setuptools_scm.spec new file mode 100644 index 0000000..f9d1874 --- /dev/null +++ b/python-setuptools_scm.spec @@ -0,0 +1,88 @@ +%bcond_without python3 + +%global srcname setuptools_scm + +Name: python-%{srcname} +Version: 1.15.7 +Release: 6%{?dist} +Summary: Blessed package to manage your versions by scm tags + +# https://github.com/pypa/setuptools_scm/issues/211 +License: MIT +URL: https://pypi.python.org/pypi/setuptools_scm +Source0: https://files.pythonhosted.org/packages/source/%(n=%{srcname}; echo ${n:0:1})/%{srcname}/%{srcname}-%{version}.tar.gz + +BuildArch: noarch + +%description +Setuptools_scm handles managing your python package versions in scm metadata. +It also handles file finders for the suppertes scms. + +%package -n python2-%{srcname} +Summary: %{summary} +BuildRequires: python2-devel +BuildRequires: python2-setuptools +%{?python_provide:%python_provide python2-%{srcname}} + +%description -n python2-%{srcname} +Setuptools_scm handles managing your python package versions in scm metadata. +It also handles file finders for the suppertes scms. + +%if %{with python3} +%package -n python3-%{srcname} +Summary: %{summary} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +%{?python_provide:%python_provide python3-%{srcname}} +Obsoletes: platform-python-%{srcname} < %{version}-%{release} + +%description -n python3-%{srcname} +Setuptools_scm handles managing your python package versions in scm metadata. +It also handles file finders for the suppertes scms. + +%endif + +%prep +%autosetup -n %{srcname}-%{version} + +%build +%py2_build +%if %{with python3} +%py3_build +%endif + +%install +%py2_install +%if %{with python3} +%py3_install +%endif + +#%%check +# Tests are not shipped in PyPI tarball and requires git and mercurial +# which means that we'd have to depends on mercurial module which is +# too heavy dependency for tests of one package not included in module API + +%files -n python2-%{srcname} +#license LICENSE +%doc README.rst +%{python2_sitelib}/%{srcname}/ +%{python2_sitelib}/%{srcname}-*.egg-info/ + +%if %{with python3} +%files -n python3-%{srcname} +#license LICENSE +%doc README.rst +%{python3_sitelib}/%{srcname}/ +%{python3_sitelib}/%{srcname}-*.egg-info +%endif + +%changelog +* Thu Apr 25 2019 Tomas Orsava - 1.15.7-6 +- Bumping due to problems with modular RPM upgrade path +- Resolves: rhbz#1695587 + +* Tue Jul 31 2018 Lumír Balhar - 1.15.7-5 +- Make possible to disable python3 subpackage + +* Wed Jul 18 2018 Lumír Balhar - 1.15.7-5 +- First version for python27 module diff --git a/sources b/sources new file mode 100644 index 0000000..dd666e7 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA1 (setuptools_scm-1.15.7.tar.gz) = 7790dd35cfccf871acc1d38336f091c4082a7e7d diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..ca62107 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,20 @@ +--- +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + repositories: + - repo: "https://src.fedoraproject.org/rpms/pyproject-rpm-macros.git" + dest: "pyproject-rpm-macros" + tests: + - pyproject_pytest: + dir: pyproject-rpm-macros/tests + run: ./mocktest.sh python-pytest + - pyproject_pluggy: + dir: pyproject-rpm-macros/tests + run: ./mocktest.sh python-pluggy + required_packages: + - mock + - rpmdevtools + - rpm-build