From 751e0957325db6dc6c489c0c93816d0e6421da5c Mon Sep 17 00:00:00 2001 From: Petr Šplíchal Date: Nov 13 2019 07:59:31 +0000 Subject: Import python-nitrate-1.5 --- diff --git a/.gitignore b/.gitignore index cb4f881..9f64576 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /python-nitrate-1.0.tar.bz2 /python-nitrate-1.3.tar.bz2 /python-nitrate-1.4.tar.bz2 +/python-nitrate-1.5.tar.bz2 diff --git a/python-nitrate.spec b/python-nitrate.spec index 38231fb..74ee910 100644 --- a/python-nitrate.spec +++ b/python-nitrate.spec @@ -1,59 +1,90 @@ Name: python-nitrate -Version: 1.4 -Release: 3%{?dist} +Version: 1.5 +Release: 2%{?dist} Summary: Python API for the Nitrate test case management system -License: LGPLv2 +License: LGPLv2+ URL: https://github.com/psss/python-nitrate -Source0: https://github.com/psss/python-nitrate/releases/download/%{version}/python-nitrate-%{version}.tar.bz2 +Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.bz2 + +# Depending on the distro, we set some defaults. +# Note that the bcond macros are named for the CLI option they create. +# "%%bcond_without" means "ENABLE by default and create a --without option" + +# Fedora or RHEL 8+ +%if 0%{?fedora} || 0%{?rhel} > 7 +%bcond_with oldreqs +%bcond_with englocale +%else +# The automatic runtime dependency generator doesn't exist yet +%bcond_without oldreqs +# The C.UTF-8 locale doesn't exist, Python defaults to C (ASCII) +%bcond_without englocale +%endif BuildArch: noarch -BuildRequires: git -BuildRequires: python2-devel +BuildRequires: git-core +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools +BuildRequires: python%{python3_pkgversion}-six -%global _description\ -python-nitrate is a Python interface to the Nitrate test case\ -management system. The package consists of a high-level Python\ -module (provides natural object interface), a low-level driver\ -(allows to directly access Nitrate's XMLRPC API) and a command\ -line interpreter (useful for fast debugging and experimenting). +%global _description %{expand: +A Python interface to the Nitrate test case management system. +The package consists of a high-level Python module (provides +natural object interface), a low-level driver (allows to directly +access Nitrate's XMLRPC API) and a command line interpreter +(useful for fast debugging and experimenting).} %description %_description -%package -n python2-nitrate + +%package -n python3-nitrate Summary: %summary -Requires: python2-psycopg2 -Requires: python2-gssapi -%{?python_provide:%python_provide python2-nitrate} +%{?python_provide:%python_provide python3-nitrate} +%if %{with oldreqs} +Requires: python%{python3_pkgversion}-gssapi +Requires: python%{python3_pkgversion}-psycopg2 +Requires: python%{python3_pkgversion}-six +%endif -%description -n python2-nitrate %_description +%description -n python3-nitrate %_description %prep %autosetup -S git %build +%if %{with englocale} +export LANG=en_US.utf-8 +%endif +%py3_build %install -mkdir -p %{buildroot}%{_bindir} +%if %{with englocale} +export LANG=en_US.utf-8 +%endif +%py3_install mkdir -p %{buildroot}%{_mandir}/man1 -mkdir -p %{buildroot}%{python2_sitelib}/nitrate -install -pm 755 source/nitrate %{buildroot}%{_bindir} -install -pm 644 source/*.py %{buildroot}%{python2_sitelib}/nitrate install -pm 644 docs/*.1.gz %{buildroot}%{_mandir}/man1 +# Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1335203 +pathfix.py -pni "%{__python3} %{py3_shbang_opts}i" %{buildroot}%{_bindir}/nitrate -%files -n python2-nitrate +%files -n python3-nitrate +%{python3_sitelib}/nitrate/ +%{python3_sitelib}/nitrate-*.egg-info/ %{_mandir}/man1/* %{_bindir}/nitrate -%{python2_sitelib}/* -%doc COPYING README examples +%doc README examples +%license LICENSE %changelog -* Fri Jul 26 2019 Fedora Release Engineering - 1.4-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild +* Mon Nov 11 2019 Petr Šplíchal - 1.5-2 +- Use py3_build and py3_install to simplify spec +- Rename and explicitly list the license file +- Remove group, fix license, add missing requires -* Sat Feb 02 2019 Fedora Release Engineering - 1.4-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild +* Mon Nov 04 2019 Martin Zeleny 1.5-0 +- Ported to Python 3 * Mon Nov 05 2018 Petr Šplíchal 1.4-1 - Update specfile to new python packaging standards diff --git a/sources b/sources index db97473..941c615 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (python-nitrate-1.4.tar.bz2) = a9e2102d75cf591eaaa90d58a464f73519bf422760eee0cd1880f856d5840b6624d1b3cd2dc03d8d3e22be02d0f7d05abc3cfb171899b761d01a786f4fc27329 +SHA512 (python-nitrate-1.5.tar.bz2) = bace75b0ac14f9295f7d9f9426df62da1a50e0666c4dec8b393c9fe5379a10f0bcf72f08e51a796f8f0bc2ddf77c3b4ef77c20ad7c31291f9085bb194bb5037d