24d585e
%if 0%{?fedora}
24d585e
%global with_python3 1
24d585e
%endif
24d585e
ee5dce0
%global bname path
ee5dce0
ee5dce0
Name:           python-%{bname}
Thomas Spura d99a5cd
Version:        5.2
eec7e0e
Release:        9%{?dist}
ee5dce0
Summary:        A python module wrapper for os.path
ee5dce0
ee5dce0
License:        MIT
ee5dce0
URL:            https://pypi.python.org/pypi/path.py
ee5dce0
Source0:        https://pypi.python.org/packages/source/p/path.py/%{bname}.py-%{version}.zip
ee5dce0
ee5dce0
BuildArch:      noarch
ee5dce0
BuildRequires:  python2-devel
24d585e
BuildRequires:  pytest
24d585e
24d585e
%if 0%{?with_python3}
24d585e
BuildRequires:  python3-devel
24d585e
BuildRequires:  python3-setuptools
24d585e
BuildRequires:  python3-pytest
24d585e
%endif
ee5dce0
ee5dce0
%description
Thomas Spura 0359e55
path.py implements a path objects as first-class entities,
Thomas Spura 0359e55
allowing common operations on files to be invoked on those path objects directly.
Thomas Spura 0359e55
Thomas Spura 0359e55
See documentation here http://amoffat.github.io/sh/.
Thomas Spura 0359e55
Thomas Spura 0359e55
%package    -n python2-%{bname}
Thomas Spura 0359e55
Summary:    Python 2 module wrapper for os.path
Thomas Spura 0359e55
%{?python_provide:%python_provide python2-%{bname}}
Thomas Spura 0359e55
%description -n python2-%{bname}
Thomas Spura 0359e55
path.py implements a path objects as first-class entities,
ee5dce0
allowing common operations on files to be invoked on those path objects directly.
ee5dce0
ee5dce0
See documentation here http://amoffat.github.io/sh/.
ee5dce0
24d585e
%if 0%{?with_python3}
24d585e
%package    -n python3-%{bname}
24d585e
Summary:    Python 3 module wrapper for os.path
24d585e
Group:      Development/Libraries
24d585e
24d585e
%description -n python3-%{bname}
24d585e
path.py implements a path objects as first-class entities,
24d585e
allowing common operations on files to be invoked on those path objects directly.
24d585e
24d585e
See documentation here http://amoffat.github.io/sh/.
24d585e
%endif
24d585e
ee5dce0
ee5dce0
%prep
ee5dce0
%setup -q -n %{bname}.py-%{version}
ee5dce0
ee5dce0
%build
24d585e
%if 0%{?with_python3}
Thomas Spura 6ae9c13
%py3_build
24d585e
%endif
24d585e
Thomas Spura 6ae9c13
%py2_build
ee5dce0
Thomas Spura 78b89cd
%check
Thomas Spura 6ae9c13
pushd build/lib
Thomas Spura 6ae9c13
    LC_ALL=en_US.UTF-8 py.test-2 -v
24d585e
#%{__python} test_path.py
Thomas Spura 6ae9c13
popd
Thomas Spura 78b89cd
Thomas Spura 78b89cd
%if 0%{?with_python3}
Thomas Spura 6ae9c13
pushd build/lib
Thomas Spura 6ae9c13
    LC_ALL=en_US.UTF-8 %{_bindir}/py.test-%{python3_version} -v
Thomas Spura 78b89cd
popd
Thomas Spura 78b89cd
%endif
ee5dce0
ee5dce0
%install
24d585e
%if 0%{?with_python3}
Thomas Spura 6ae9c13
%py3_install
24d585e
%endif
24d585e
Thomas Spura 6ae9c13
%py2_install
ee5dce0
24d585e
Thomas Spura 0359e55
%files -n python2-path
ee5dce0
%doc CHANGES.rst README.rst
Thomas Spura 6ae9c13
%{python2_sitelib}/path.py
Thomas Spura 6ae9c13
%{python2_sitelib}/path.pyc
Thomas Spura 6ae9c13
%{python2_sitelib}/path.pyo
Thomas Spura 0359e55
%{python2_sitelib}/path.py-%{version}-py?.?.egg-info/
Thomas Spura 0359e55
%{python2_sitelib}/test_path.py*
ee5dce0
24d585e
%if 0%{?with_python3}
24d585e
%files -n python3-path
Thomas Spura 0359e55
%{python3_sitelib}/__pycache__/*
Thomas Spura 0359e55
%{python3_sitelib}/path.py
Thomas Spura 0359e55
%{python3_sitelib}/path.py-%{version}-py?.?.egg-info/
Thomas Spura 0359e55
%{python3_sitelib}/test_path.py
24d585e
%endif
ee5dce0
ee5dce0
%changelog
eec7e0e
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.2-9
eec7e0e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
eec7e0e
Thomas Spura 6ae9c13
* Mon Jan 02 2017 Thomas Spura <tomspur@fedoraproject.org> - 5.2-8
Thomas Spura 0359e55
- rename python-* to python2-*
Thomas Spura 0359e55
- expand %%files
Thomas Spura 6ae9c13
- use py_build/install macros
Thomas Spura 0359e55
4286864
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 5.2-7
4286864
- Rebuild for Python 3.6
4286864
1e13915
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.2-6
1e13915
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
1e13915
49d0a88
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 5.2-5
49d0a88
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
49d0a88
Orion Poplawski bf4f4ca
* Wed Nov 11 2015 Orion Poplawski <orion@cora.nwra.com> - 5.2-4
Orion Poplawski 833545d
- Fix py.test call for python3
Orion Poplawski 833545d
95b41c9
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.2-4
95b41c9
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
95b41c9
a2f657c
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.2-3
a2f657c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
a2f657c
Thomas Spura 78b89cd
* Wed Sep  3 2014 Thomas Spura <tomspur@fedoraproject.org> - 5.2-2
Thomas Spura 78b89cd
- enable testsuite
Thomas Spura 78b89cd
Thomas Spura d99a5cd
* Wed Sep  3 2014 Thomas Spura <tomspur@fedoraproject.org> - 5.2-1
Thomas Spura d99a5cd
- update to 5.2
Thomas Spura d99a5cd
f43c29d
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1-3
f43c29d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
f43c29d
3037e4b
* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 5.1-2
3037e4b
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
3037e4b
24d585e
* Fri Apr 04 2014 Xavier Lamien <laxathom@fedoraproject.org> - 5.1-1
24d585e
- Upstream release.
24d585e
- Add python3's subpackage.
24d585e
cbb25d8
* Fri Jul 26 2013 Xavier Lamien <laxathom@fedoraproject.org> - 4.3-1
cbb25d8
- Upstream release.
cbb25d8
ee5dce0
* Wed Apr 10 2013 Xavier Lamien <laxathom@fedoraproject.org> - 3.0.1-2
ee5dce0
- Add %%check stage.
ee5dce0
- Update BuildRequire.
ee5dce0
- Add missing %%docs.
ee5dce0
ee5dce0
* Wed Apr 10 2013 Xavier Lamien <laxathom@fedoraproject.org> - 3.0.1-1
ee5dce0
- Initial RPM release.