#4 python-path-11.5.0-1
Closed 3 years ago by churchyard. Opened 3 years ago by radez.
rpms/ radez/python-path python-path-11.5.0  into  master

file modified
+1 -3
@@ -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

file modified
+37 -34
@@ -2,76 +2,76 @@ 

  %global with_python3 1

  %endif

  

- %global bname path

+ %global pypi_name path.py

  

- %bcond_without tests

- 

- Name:           python-%{bname}

- Version:        5.2

- Release:        18%{?dist}

+ Name:           python-path

+ Version:        11.5.0

+ Release:        1%{?dist}

  Summary:        A 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

+ BuildRequires:  python2-packaging

+ BuildRequires:  python2-setuptools_scm

  

  %if 0%{?with_python3}

  BuildRequires:  python3-devel

+ BuildRequires:  python3-importlib-metadata

  BuildRequires:  python3-setuptools

- %if %{with tests}

+ BuildRequires:  python3-setuptools_scm

+ BuildRequires:  python3-packaging

  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.

+ 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/.

- 

- %package    -n python2-%{bname}

+ %package    -n python2-path

  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.

- 

- See documentation here http://amoffat.github.io/sh/.

+ %{?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.

  

  %if 0%{?with_python3}

- %package    -n python3-%{bname}

+ %package    -n python3-path

  Summary:    Python 3 module wrapper for os.path

- 

- %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/.

+ %{?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.

  %endif

  

  

  %prep

- %setup -q -n %{bname}.py-%{version}

+ %autosetup -n %{pypi_name}-%{version}

  sed -i 's/\[pytest\]/\[tool:pytest\]/' setup.cfg

  

+ sed -i 's/ --flake8//' pytest.ini

+ 

+ # 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

+ 

  %build

+ SETUPTOOLS_SCM_PRETEND_VERSION=%{version}

  %if 0%{?with_python3}

  %py3_build

  %endif

  

  %py2_build

  

- %if %{with tests}

  %check

+ 

  pushd build/lib

-     LC_ALL=C.UTF-8 py.test-2 -v

- #%{__python} test_path.py

+     # There is a Unicode test failure on Python 2.

+     LC_ALL=C.UTF-8 py.test-2 -v -k "not test_listdir_other_encoding"

  popd

  

  %if 0%{?with_python3}
@@ -79,7 +79,6 @@ 

      py.test-%{python3_version} -v

  popd

  %endif

- %endif # with tests

  

  %install

  %if 0%{?with_python3}
@@ -106,6 +105,10 @@ 

  %endif

  

  %changelog

+ * Tue Aug 20 2019 Ken Dreyer <kdreyer@redhat.com> - 11.5.0-1

+ - Update to latest upstream release (rhbz#1206250)

+ - Use %%autosetup, %%pypi_name, %%pypi_source

+ 

  * Sat Aug 17 2019 Miro Hrončok <mhroncok@redhat.com> - 5.2-18

  - Rebuilt for Python 3.8

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- 96fe002b1797b221c269ff2ed1fdbc28  path.py-5.2.zip

+ SHA512 (path.py-11.5.0.tar.gz) = a2b5a268c5d4850cae1b045543ce9b88fb65c7048d9b3c79eaf097bc9d8295d8e2ea58ee1289678c3dd9626044984e7822698e043fec5a161976dccb6e0d1a7b

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

Resolves: rhbz#1206250

*Note: replacing https://src.fedoraproject.org/rpms/python-path/pull-request/2 to get Ken Dreyer's patch merged

we do have importlib-metadata

  • %python_provide is missing.
  • python-Pyped still requires python2-path

rebased onto 0ea4cbc

3 years ago

we do have importlib-metadata

In python3 but not python2. I removed this stanza but left the static version substitution below for py2.

%python_provide is missing.
python-Pyped still requires python2-path

fixed

Note that the package has this in install_requires:

        'backports.os; python_version=="2.7" and sys_platform=="linux2"',

But the failed import of backports.os won't make it crash. and the dependency generator won't put that in.

Pull-Request has been closed by churchyard

3 years ago