From 0b71a4042fc3f1a6e79ba004d503e13923407778 Mon Sep 17 00:00:00 2001 From: Matthias Runge Date: Aug 31 2016 12:32:07 +0000 Subject: add python/python2 package --- diff --git a/python-XStatic.spec b/python-XStatic.spec index 15188b8..2726b89 100644 --- a/python-XStatic.spec +++ b/python-XStatic.spec @@ -12,7 +12,7 @@ Name: python-%{pypi_name} Version: 1.0.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: XStatic base package with minimal support code License: MIT @@ -32,15 +32,33 @@ dependencies you don't want. XStatic has some minimal support code for working with the XStatic-* packages. +%package -n python2-%{pypi_name} +Summary: XStatic base package with minimal support code +BuildRequires: python2-devel +BuildRequires: python2-setuptools +%{?python_provide:%python_provide python2-%{pypi_name}} + +%description -n python2-%{pypi_name} + +The goal of XStatic family of packages is to provide static +file packages with minimal overhead - without selling you some +dependencies you don't want. + +XStatic has some minimal support code for working with the +XStatic-* packages. + + + %if 0%{?with_python3} %package -n python3-%{pypi_name} Summary: XStatic base package with minimal support code BuildRequires: python3-devel BuildRequires: python3-setuptools +%{?python_provide:%python_provide python3-%{pypi_name}} %description -n python3-%{pypi_name} The goal of XStatic family of packages is to provide static -file packages with minimal overhead - without selling you some +file packages with minimal overhead - without selling you some dependencies you don't want. XStatic has some minimal support code for working with the @@ -50,40 +68,28 @@ XStatic-* packages. %endif %prep -%setup -q -n %{pypi_name}-%{version} -# Remove bundled egg-info -rm -rf %{pypi_name}.egg-info - -%if 0%{?with_python3} -rm -rf %{py3dir} -cp -a . %{py3dir} -%endif +%autosetup -n %{pypi_name}-%{version} %build %if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py build -popd +%py3_build %endif # with_python3 - -%{__python2} setup.py build +%py2_build %install %if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py install --skip-build --root %{buildroot} -popd +%py3_install mkdir %{buildroot}/%{python3_sitelib}/xstatic/pkg %endif # with_python3 -%{__python2} setup.py install --skip-build --root %{buildroot} +%py2_install mkdir %{buildroot}/%{python2_sitelib}/xstatic/pkg -%files +%files -n python2-%{pypi_name} %doc README.txt %{python2_sitelib}/xstatic %{python2_sitelib}/XStatic-%{version}-py%{python2_version}.egg-info @@ -100,6 +106,10 @@ mkdir %{buildroot}/%{python2_sitelib}/xstatic/pkg %changelog +* Wed Aug 31 2016 Matthias Runge - 1.0.1-3 +- provide python/python2 +- spec cleanup + * Fri Oct 10 2014 Matthias Runge - 1.0.1-2 - include xstatic/pkg