python-path-11.5.0-1

Changelog:
- Update to latest upstream release (rhbz#1206250)
- Use %autosetup, %pypi_name, %pypi_source

Resolves: rhbz#1206250
epel8
Ken Dreyer 6 years ago committed by Miro Hrončok
parent 183ed3cc44
commit 6a6713b603

4
.gitignore vendored

@ -1,4 +1,2 @@
/path.py-3.0.1.zip
/path.py-4.3.zip
/path.py-5.1.zip
/path.py-5.2.zip
/path.py-11.5.0.tar.gz

@ -1,92 +1,71 @@
%if 0%{?fedora} || 0%{?rhel} > 7
%global with_python3 1
%endif
%global pypi_name path.py
%global bname path
%bcond_without tests
Name: python-%{bname}
Version: 5.2
Release: 18%{?dist}
Summary: A python module wrapper for os.path
Name: python-path
Version: 11.5.0
Release: 1%{?dist}
Summary: Python module wrapper for os.path
License: MIT
URL: https://pypi.python.org/pypi/path.py
Source0: https://pypi.python.org/packages/source/p/path.py/%{bname}.py-%{version}.zip
Source0: %pypi_source
BuildArch: noarch
BuildRequires: python2-devel
%if %{with tests}
BuildRequires: python2-pytest
%endif
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%if %{with tests}
BuildRequires: python3-pytest
%endif
%endif
%description
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/.
%package -n python2-%{bname}
Summary: Python 2 module wrapper for os.path
%{?python_provide:%python_provide python2-%{bname}}
%description -n python2-%{bname}
path.py implements a path objects as first-class entities,
allowing common operations on files to be invoked on those path objects directly.
path.py implements 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/.
%if 0%{?with_python3}
%package -n python3-%{bname}
Summary: Python 3 module wrapper for os.path
%package -n python2-path
Summary: Python 2 module wrapper for os.path
BuildRequires: python2-devel
BuildRequires: python2-pytest
BuildRequires: python2-packaging
BuildRequires: python2-setuptools_scm
%{?python_provide:%python_provide python2-path}
%description -n python2-path
path.py implements path objects as first-class entities, allowing common
operations on files to be invoked on those path objects directly.
%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
%package -n python3-path
Summary: Python 3 module wrapper for os.path
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-setuptools_scm
BuildRequires: python3-packaging
BuildRequires: python3-pytest
%{?python_provide:%python_provide python3-path}
%description -n python3-path
path.py implements path objects as first-class entities, allowing common
operations on files to be invoked on those path objects directly.
%prep
%setup -q -n %{bname}.py-%{version}
%autosetup -n %{pypi_name}-%{version} -p1
sed -i 's/\[pytest\]/\[tool:pytest\]/' setup.cfg
sed -i 's/ --flake8//' pytest.ini
%build
%if 0%{?with_python3}
%py3_build
%endif
# We do not have https://pypi.org/project/importlib-metadata/ in python2
# to populate __version__, so we do it statically here:
sed -i "s/__version__ = 'unknown'/__version__ = '%{version}'/" path.py
sed -i "/importlib_metadata/d" setup.py
%build
SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
%py2_build
%py3_build
%if %{with tests}
%check
pushd build/lib
LC_ALL=C.UTF-8 py.test-2 -v
#%{__python} test_path.py
popd
%if 0%{?with_python3}
pushd build/lib
py.test-%{python3_version} -v
popd
%endif
%endif # with tests
%install
%if 0%{?with_python3}
%py2_install
%py3_install
%endif
%py2_install
%check
# There is a Unicode test failure on Python 2.
PYTHONPATH=%{buildroot}%{python2_sitelib} LANG=C.UTF-8 pytest-2 -v -k "not test_listdir_other_encoding"
PYTHONPATH=%{buildroot}%{python3_sitelib} pytest-3 -v
%files -n python2-path
@ -94,18 +73,20 @@ popd
%{python2_sitelib}/path.py
%{python2_sitelib}/path.pyc
%{python2_sitelib}/path.pyo
%{python2_sitelib}/path.py-%{version}-py?.?.egg-info/
%{python2_sitelib}/test_path.py*
%{python2_sitelib}/path.py-%{version}-py%{python2_version}.egg-info/
%exclude %{python2_sitelib}/test_path.py*
%if 0%{?with_python3}
%files -n python3-path
%{python3_sitelib}/__pycache__/*
%{python3_sitelib}/path.py
%{python3_sitelib}/path.py-%{version}-py?.?.egg-info/
%{python3_sitelib}/test_path.py
%endif
%{python3_sitelib}/path.py-%{version}-py%{python3_version}.egg-info/
%exclude %{python3_sitelib}/test_path.py
%changelog
* Tue Aug 20 2019 Ken Dreyer <kdreyer@redhat.com> - 11.5.0-1
- Update to latest upstream release (rhbz#1206250)
* Sat Aug 17 2019 Miro Hrončok <mhroncok@redhat.com> - 5.2-18
- Rebuilt for Python 3.8

@ -1 +1 @@
96fe002b1797b221c269ff2ed1fdbc28 path.py-5.2.zip
SHA512 (path.py-11.5.0.tar.gz) = a2b5a268c5d4850cae1b045543ce9b88fb65c7048d9b3c79eaf097bc9d8295d8e2ea58ee1289678c3dd9626044984e7822698e043fec5a161976dccb6e0d1a7b

Loading…
Cancel
Save