3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
5 %bcond_without doc # Sphinx documentation
6 %bcond_without tests # py.test unit tests
8 Summary: Python 2 module wrapper for os.path
9 Summary(pl.UTF-8): Moduł Pythona 2 obudowujący os.path
14 Group: Libraries/Python
15 #Source0Download: https://pypi.python.org/simple/path-py/
16 Source0: https://files.pythonhosted.org/packages/source/p/path.py/path.py-%{version}.tar.gz
17 # Source0-md5: de65181c0efc12efc34d1ff1a0b1edfe
18 Patch0: %{name}-sphinx.patch
19 URL: https://github.com/jaraco/path.py
20 %if %{with tests} && %(locale -a | grep -q '^C\.utf8$'; echo $?)
21 BuildRequires: glibc-localedb-all
24 BuildRequires: python >= 1:2.7
25 BuildRequires: python-modules >= 1:2.7
26 BuildRequires: python-setuptools
27 BuildRequires: python-setuptools_scm >= 1.15.0
29 BuildRequires: python-appdirs
30 BuildRequires: python-pytest >= 2.8
31 BuildRequires: python-pytest-flake8
35 BuildRequires: python3 >= 1:3.4
36 BuildRequires: python3-modules >= 1:3.4
37 BuildRequires: python3-setuptools
38 BuildRequires: python3-setuptools_scm >= 1.15.0
40 BuildRequires: python3-appdirs
41 BuildRequires: python3-pytest >= 2.8
42 BuildRequires: python3-pytest-flake8
45 BuildRequires: rpm-pythonprov
46 BuildRequires: rpmbuild(macros) >= 1.714
48 BuildRequires: sphinx-pdg-3
49 BuildRequires: python3-jaraco.packaging >= 3.2
50 BuildRequires: python3-rst.linker >= 1.9
52 Requires: python-modules >= 1:2.7
54 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57 path.py implements a path objects as first-class entities, allowing
58 common operations on files to be invoked on those path objects
61 %description -l pl.UTF-8
62 path.py implementuje obiekty ścieżek jako instancje pierwszoklasowe,
63 pozwalające na wykonywanie ogólnych operacji na plikach bezpośrednio
66 %package -n python3-path
67 Summary: Python 3 module wrapper for os.path
68 Summary(pl.UTF-8): Moduł Pythona 3 obudowujący os.path
69 Group: Libraries/Python
70 Requires: python3-modules >= 1:3.4
72 %description -n python3-path
73 path.py implements a path objects as first-class entities, allowing
74 common operations on files to be invoked on those path objects
77 %description -n python3-path -l pl.UTF-8
78 path.py implementuje obiekty ścieżek jako instancje pierwszoklasowe,
79 pozwalające na wykonywanie ogólnych operacji na plikach bezpośrednio
83 Summary: Documentation for Python path.py module
84 Summary(pl.UTF-8): Dokumentacja modułu Pythona path.py
88 Documentation for Python path.py module.
90 %description apidocs -l pl.UTF-8
91 Dokumentacja modułu Pythona path.py.
94 %setup -q -n path.py-%{version}
103 %{__python} -m pytest test_path.py
112 %{__python3} -m pytest test_path.py
117 # disable warnings (-W in SPHINXOPTS) to ignore objects.inv fetching error on builders
118 %{__make} -C docs html \
119 SPHINXBUILD=sphinx-build-3 \
124 rm -rf $RPM_BUILD_ROOT
130 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/test_path.py*
136 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/test_path.py
137 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/__pycache__/test_path.*
141 rm -rf $RPM_BUILD_ROOT
145 %defattr(644,root,root,755)
146 %doc CHANGES.rst README.rst
147 %{py_sitescriptdir}/path.py[co]
148 %{py_sitescriptdir}/path.py-%{version}-py*.egg-info
152 %files -n python3-path
153 %defattr(644,root,root,755)
154 %doc CHANGES.rst README.rst
155 %{py3_sitescriptdir}/path.py
156 %{py3_sitescriptdir}/__pycache__/path.cpython-*.py[co]
157 %{py3_sitescriptdir}/path.py-%{version}-py*.egg-info
162 %defattr(644,root,root,755)
163 %doc docs/_build/html/{_static,*.html,*.js}