diff options
author | CoprDistGit <infra@openeuler.org> | 2025-02-20 01:22:08 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2025-02-20 01:22:08 +0000 |
commit | fbb3ba99aa8400fba5d0a7052becd1a0b7d937fe (patch) | |
tree | 0f8ad3d9edae77b32ce3ffbd84451c9655ad7027 | |
parent | cf604be686ac5e3b318159506c96f937446a81f4 (diff) |
automatic import of python-copr-common
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-copr-common.spec | 91 | ||||
-rw-r--r-- | sources | 2 |
3 files changed, 60 insertions, 34 deletions
@@ -1 +1,2 @@ /python-copr-common-1.0.tar.gz +/python-copr-common-0.19.tar.gz diff --git a/python-copr-common.spec b/python-copr-common.spec index 75c4631..3d134bd 100644 --- a/python-copr-common.spec +++ b/python-copr-common.spec @@ -1,7 +1,22 @@ %global srcname copr-common +%if 0%{?rhel} && 0%{?rhel} <= 6 +%{!?_licensedir:%global license %%doc} +%global _pkgdocdir %{_docdir}/%{name}-%{version} +%endif + +%if 0%{?fedora} || 0%{?rhel} > 7 || 0%{?openEuler} +%global with_python3 1 +%global __python %_bindir/python3 +%endif + +%if 0%{?fedora} && 0%{?fedora} < 28 || 0%{?rhel} && 0%{?rhel} <= 7 +%global with_python2 1 +%global __python %_bindir/python2 +%endif + Name: python-copr-common -Version: 1.0 +Version: 0.19 Release: 1%{?dist} Summary: Python code used by Copr @@ -15,12 +30,20 @@ Source0: %name-%version.tar.gz BuildArch: noarch +%if %{with python2} +BuildRequires: python2-devel +BuildRequires: python-setuptools +BuildRequires: python-pytest +BuildRequires: python-mock +BuildRequires: python-requests +%endif + +%if %{with python3} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pytest BuildRequires: python3-requests -BuildRequires: python3-filelock -BuildRequires: python3-setproctitle +%endif %global _description\ COPR is lightweight build system. It allows you to create new project in WebUI,\ @@ -33,63 +56,65 @@ useful for developers only.\ %description %_description +%if %{with python2} +%package -n python2-%{srcname} +Summary: %{summary} +%{?python_provide:%python_provide python2-%{srcname}} +%description -n python2-%{srcname} %_description +%endif + + +%if %{with python3} %package -n python3-%{srcname} Summary: %{summary} %{?python_provide:%python_provide python3-%{srcname}} %description -n python3-%{srcname} %_description +%endif %prep %setup -q -# Check that setup.py version matches our version -grep '"%version"' setup.py %build +%if %{with python3} version="%version" %py3_build +%endif + +%if %{with python2} +version="%version" %py2_build +%endif %install +%if %{with python3} version=%version %py3_install +%endif + +%if %{with python2} +version=%version %py2_install +%endif + %check -%{_bindir}/python3 -m pytest -vv tests +%{__python} -m pytest -vv tests +%if %{with python3} %files -n python3-%{srcname} %license LICENSE %{python3_sitelib}/* +%endif +%if %{with python2} +%files -n python2-%{srcname} +%license LICENSE +%{python2_sitelib}/* +%endif -%changelog -* Wed Oct 02 2024 Jiri Kyjovsky <j1.kyjovsky@gmail.com> 1.0-1 -- Drop support for rhel7 and rhel6 - -* Thu Aug 01 2024 Miroslav Suchý <msuchy@redhat.com> 0.25-1 -- frontend, backend, common: don't limit the storage to pulp only - -* Tue May 21 2024 Jakub Kadlcik <frostyx@email.cz> 0.24-1 -- Fix chroot_to_branch default - -* Fri Mar 15 2024 Pavel Raiskup <praiskup@redhat.com> 0.23-1 -- make get_redis_connection to accept dict-like 'opts' argument - -* Fri Mar 01 2024 Pavel Raiskup <praiskup@redhat.com> 0.22-1 -- fix misleading warning for non-copr library consumers -- add `contextlib.nullcontext` function as EL8 compat -- limit stdout/stderr of ssh.run_expensive() commands -- use 'copr-common/<version>' as http user agent identifier -- changes needed to allow user SSH to builders - -* Thu Nov 23 2023 Pavel Raiskup <praiskup@redhat.com> 0.21-1 -- rename GroupWorkerLimit to HashWorkerLimit -- explicitly build-depend on python-six - -* Tue Aug 15 2023 Pavel Raiskup <praiskup@redhat.com> 0.20-1 -- move chroot_to_branch from frontend to copr-common -- redis authentication support added +%changelog * Tue May 23 2023 Jakub Kadlcik <frostyx@email.cz> 0.19-1 - Specfile compatibility with OpenEuler @@ -1 +1 @@ -37124e92d176c1051ef9bee308f4d1f6 python-copr-common-1.0.tar.gz +756a0e6b221c7b9afa58bd5539ccdd4c python-copr-common-0.19.tar.gz |