%global namedreltag rc4 %global namedversion %{version}%{?namedreltag} %global with_python3 0%{?fedora} Name: python-docker-squash Version: 1.0.0 Release: 0.5.%{namedreltag}%{?dist} Summary: Docker layer squashing tool Group: Development/Tools License: MIT URL: https://github.com/goldmann/docker-squash Source0: https://github.com/goldmann/docker-squash/archive/%{namedversion}.tar.gz BuildArch: noarch BuildRequires: python-devel BuildRequires: python-setuptools BuildRequires: python-six BuildRequires: pytest BuildRequires: python-mock BuildRequires: python-docker-py %global _description \ Tool to squash layers in Docker images. %description %_description %package -n python2-docker-squash Summary: %{summary} Requires: python-setuptools Requires: python-six Requires: python-docker-py Provides: python-docker-scripts = %{version}-%{release} Obsoletes: python-docker-scripts <= 1.0.0-0.2.rc2 %{?python_provide:%python_provide python2-docker-squash} %description -n python2-docker-squash %_description %if 0%{?with_python3} %package -n python3-docker-squash Summary: %{summary} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-six BuildRequires: python3-pytest BuildRequires: python3-mock BuildRequires: python3-docker-py Requires: python3-setuptools Requires: python3-six Requires: python3-docker-py Provides: python3-docker-scripts = %{version}-%{release} Obsoletes: python3-docker-scripts <= 1.0.0-0.2.rc2 %{?python_provide:%python_provide python3-docker-squash} %description -n python3-docker-squash %_description %endif %prep %setup -qn docker-squash-%{namedversion} %build %py2_build %if 0%{?with_python3} %py3_build %endif %check py.test-%{python2_version} -v tests/test_unit*.py %if 0%{?with_python3} py.test-%{python3_version} -v tests/test_unit*.py %endif %install %py2_install %if 0%{?with_python3} %py3_install # make sure that our executable has proper version grep -q '#!/usr/bin/python3' %{buildroot}%{_bindir}/docker-squash %endif %files -n python2-docker-squash %doc README.rst %license LICENSE %{python2_sitelib}/docker_squash/ %{python2_sitelib}/docker_squash-%{namedversion}-py2.*.egg-info %if 0%{?with_python3} %files -n python3-docker-squash %doc README.rst %license LICENSE %{python3_sitelib}/docker_squash/ %{python3_sitelib}/docker_squash-%{namedversion}-py3.*.egg-info %endif # This file ends up in py3 subpackage if enabled, otherwise in py2 %{_bindir}/docker-squash %changelog * Wed Apr 13 2016 Marek Goldmann - 1.0.0-0.5.rc4 - Adapt to current guidelines thanks to Zbigniew Jędrzejewski-Szmek * Fri Apr 08 2016 Marek Goldmann - 1.0.0-0.4.rc4 - Upstream release 1.0.0rc4 * Fri Apr 01 2016 Marek Goldmann - 1.0.0-0.3.rc3 - Project rename and new 1.0.0rc3 release * Fri Apr 01 2016 Marek Goldmann - 1.0.0-0.2.rc2 - Someone forgot to upload sources... * Fri Apr 01 2016 Marek Goldmann - 1.0.0-0.1.rc2 - Upstream release 1.0.0rc2 * Thu Feb 04 2016 Fedora Release Engineering - 0.4.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Mon Jan 18 2016 Martin Milata - 0.4.4-1 - Upstream release 0.4.4 * Tue Nov 10 2015 Fedora Release Engineering - 0.4.2-3 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 * Thu Jun 18 2015 Fedora Release Engineering - 0.4.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Thu Jun 11 2015 Marek Goldmann - 0.4.2-1 - Upstream release 0.4.2 * Tue Jun 02 2015 Marek Goldmann - 0.4.1-1 - Upstream release 0.4.1 * Wed May 27 2015 Marek Goldmann - 0.4.0-1 - Upstream release 0.4.0 - Run unit tests at build time * Mon May 18 2015 Marek Goldmann - 0.3.8-1 - Upstream release 0.3.8 * Fri May 15 2015 Marek Goldmann - 0.3.7-1 - Upstream release 0.3.7 - Make sure the /usr/lib/python2.7/site-packages/docker_scripts is owned by this package * Thu May 14 2015 Marek Goldmann - 0.3.6-1 - Upstream release 0.3.6 * Tue May 12 2015 Marek Goldmann - 0.3.4-1 - Initial packaging