diff --git a/.gitignore b/.gitignore index ef2931b..fe3b417 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /python-gzipstream-1.10.2.tar.gz /python-gzipstream-2.3.3.tar.gz /python-gzipstream-2.7.1.tar.gz +/python-gzipstream-2.8.6.tar.gz diff --git a/python-gzipstream.spec b/python-gzipstream.spec index ef985b4..d539e5d 100644 --- a/python-gzipstream.spec +++ b/python-gzipstream.spec @@ -2,16 +2,23 @@ %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %endif +%if 0%{?fedora} || 0%{?suse_version} > 1320 +%global build_py3 1 +%endif + Summary: Streaming zlib (gzip) support for python Name: python-gzipstream -Version: 2.7.1 -Release: 4%{?dist} +Version: 2.8.6 +Release: 1%{?dist} URL: https://github.com/spacewalkproject/spacewalk/wiki/Projects_python-gzipstream Source0: https://github.com/spacewalkproject/spacewalk/archive/python-gzipstream-%{version}.tar.gz License: GPLv2 -Group: Development/Libraries BuildArch: noarch +%if (0%{?fedora} > 27 || 0%{?rhel} > 7) BuildRequires: python2-devel +%else +BuildRequires: python-devel +%endif %global _description\ @@ -28,28 +35,77 @@ Summary: %summary %description -n python2-gzipstream %_description +%if 0%{?build_py3} +%package -n python3-gzipstream +Summary: %summary +BuildRequires: python3-devel + +%description -n python3-gzipstream %_description + +%endif + %prep %setup -q +mkdir ../py3 +cp -a . ../py3 %build %{__python} setup.py build +%if 0%{?build_py3} +cd ../py3 +%{__python3} setup.py build + +%endif %install -rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT +%if 0%{?build_py3} +cd ../py3 +%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT --prefix %{_usr} + +%endif %files -n python2-gzipstream %{python_sitelib}/* %doc html -%doc LICENSE +%license LICENSE + +%if 0%{?build_py3} +%files -n python3-gzipstream +%{python3_sitelib}/* +%doc html +%license LICENSE + +%endif %changelog -* Mon Feb 12 2018 Iryna Shcherbina - 2.7.1-4 +* Mon Feb 12 2018 Tomas Kasparek 2.8.6-1 +- mark license for python3 subpackage +- remove empty section - Update Python 2 dependency declarations to new packaging standards - (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) -* Fri Feb 09 2018 Fedora Release Engineering - 2.7.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild +* Fri Feb 09 2018 Michael Mraka 2.8.5-1 +- removed %%%%defattr from specfile +- removed Group from specfile + +* Wed Nov 08 2017 Jan Dobes 2.8.4-1 +- raise exception instead of returning +- fix syntax for python3 +- build python3 subpackage + +* Wed Sep 06 2017 Michael Mraka 2.8.3-1 +- purged changelog entries for Spacewalk 2.0 and older + +* Fri Sep 01 2017 Jan Dobes 2.8.2-1 +- rebuild package in Koji (rhel 7 buildroot was missing macros and python-gzipstream obsolete wasn't added) + +* Thu Aug 31 2017 Jan Dobes 2.8.1-1 +- in master we are on 2.8 already + +* Mon Aug 21 2017 Miroslav Suchý 2.7.2-1 +- modernize spec +- rename python-gzipstream to python2-gzipstream +- Bumping package versions for 2.8. * Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 2.7.1-2 - Python 2 binary package renamed to python2-gzipstream @@ -74,35 +130,3 @@ rm -rf $RPM_BUILD_ROOT - Bumping package versions for 2.3. - Bumping package versions for 2.2. -* Wed Jul 17 2013 Tomas Kasparek 1.10.2-1 -- updating copyright years - -* Mon Jun 17 2013 Michael Mraka 1.10.1-1 -- removed old CVS/SVN version ids -- Purging %%changelog entries preceding Spacewalk 1.0, in active packages. -- %%defattr is not needed since rpm 4.4 - -* Thu Feb 23 2012 Michael Mraka 1.7.1-1 -- we are now just GPL - -* Mon Oct 31 2011 Miroslav Suchý 1.6.2-1 -- point to python-gzipstream specific URL -- add documentation - -* Fri Jul 22 2011 Jan Pazdziora 1.6.1-1 -- We only support version 14 and newer of Fedora, removing conditions for old - versions. - -* Tue Nov 30 2010 Miroslav Suchý 1.4.3-1 -- 657531 - correct condition for defining the python_sitelib macro - (msuchy@redhat.com) - -* Fri Nov 26 2010 Miroslav Suchý 1.4.2-1 -- put license into doc section (msuchy@redhat.com) -- make setup quiet (msuchy@redhat.com) -- correct buildroot (msuchy@redhat.com) -- correct url and source url to point to fedorahosted (msuchy@redhat.com) - -* Fri Nov 26 2010 Miroslav Suchý 1.4.1-1 -- new package built with tito - diff --git a/sources b/sources index be75b6c..7bd2bc6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (python-gzipstream-2.7.1.tar.gz) = dc730087949b653ab4d08dfc34f6e708ab0f375d646893c543d8afcc102b52b96eae595d580722036d5776f1839ed0606f3818d3f9f51a189944760dc956f5f6 +SHA512 (python-gzipstream-2.8.6.tar.gz) = 469884045b932fde29da27ea83b9342af936725495f0864a395b3f7e3431a96c275571427cface4f8ec0c9866c74d185a7d60828d8abb6bc99dc2ba2ef0df962