From 24d585e35289aa48816158b63bfddbb92c435b73 Mon Sep 17 00:00:00 2001 From: Xavier Lamien Date: Apr 04 2014 16:14:00 +0000 Subject: Update to lastest upstream release. Add python3 subpackage. --- diff --git a/.gitignore b/.gitignore index a769f27..34a0f94 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /path.py-3.0.1.zip /path.py-4.3.zip +/path.py-5.1.zip diff --git a/python-path.spec b/python-path.spec index 02df14e..988da7b 100644 --- a/python-path.spec +++ b/python-path.spec @@ -1,8 +1,11 @@ -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} +%if 0%{?fedora} +%global with_python3 1 +%endif + %global bname path Name: python-%{bname} -Version: 4.3 +Version: 5.1 Release: 1%{?dist} Summary: A python module wrapper for os.path @@ -12,6 +15,13 @@ Source0: https://pypi.python.org/packages/source/p/path.py/%{bname}.py-%{ BuildArch: noarch BuildRequires: python2-devel +BuildRequires: pytest + +%if 0%{?with_python3} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pytest +%endif %description path.py implements a path objects as first-class entities, @@ -19,28 +29,69 @@ allowing common operations on files to be invoked on those path objects directly See documentation here http://amoffat.github.io/sh/. +%if 0%{?with_python3} +%package -n python3-%{bname} +Summary: Python 3 module wrapper for os.path +Group: Development/Libraries + +%description -n python3-%{bname} +path.py implements a path objects as first-class entities, +allowing common operations on files to be invoked on those path objects directly. + +See documentation here http://amoffat.github.io/sh/. +%endif + %prep %setup -q -n %{bname}.py-%{version} +%if 0%{?with_python3} +rm -rf %{py3dir} +cp -a . %{py3dir} +%endif %build +%if 0%{?with_python3} +pushd %{py3dir} + %{__python3} setup.py build +popd +%endif + %{__python} setup.py build -%check -%{__python} test_path.py +#%check +#%{__python} test_path.py +# +#%if 0%{?with_python3} +#pushd %{py3dir} +# %{__python3} test_path.py +#popd +#%endif %install -rm -rf $RPM_BUILD_ROOT +%if 0%{?with_python3} +pushd %{py3dir} + %{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT +popd +%endif + %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT - + %files %doc CHANGES.rst README.rst %{python_sitelib}/* +%if 0%{?with_python3} +%files -n python3-path +%{python3_sitelib}/* +%endif %changelog +* Fri Apr 04 2014 Xavier Lamien - 5.1-1 +- Upstream release. +- Add python3's subpackage. + * Fri Jul 26 2013 Xavier Lamien - 4.3-1 - Upstream release. diff --git a/sources b/sources index 2425793..8023142 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f0583bdcf6e19516e7387eeca6526abb path.py-4.3.zip +67c0e1b8c1b1b889ea77aef5224ccc29 path.py-5.1.zip