3 %bcond_without tests # do not perform "make test"
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 %define module pathlib2
8 Summary: Object-oriented filesystem paths
9 Summary(pl.UTF-8): Zorientowane obiektowo ścieżki systemu plików
10 Name: python-%{module}
14 Group: Libraries/Python
15 #Source0Download: https://pypi.org/simple/pathlib2/
16 Source0: https://files.pythonhosted.org/packages/source/p/pathlib2/pathlib2-%{version}.tar.gz
17 # Source0-md5: f2bd0a363eb0f8fa0556f35c1d9e66fb
18 URL: https://pypi.org/project/pathlib2/
19 BuildRequires: rpm-pythonprov
20 BuildRequires: rpmbuild(macros) >= 1.714
22 BuildRequires: python-modules >= 1:2.6
23 BuildRequires: python-setuptools
25 BuildRequires: python-mock
26 BuildRequires: python-scandir
27 BuildRequires: python-six
28 BuildRequires: python-test >= 1:2.6
29 %if "%{py_ver}" < "2.7"
30 BuildRequires: python-unittest2
35 BuildRequires: python3-modules >= 1:3.4
36 BuildRequires: python3-setuptools
38 %if "%{py3_ver}" < "3.5"
39 BuildRequires: python3-scandir
41 BuildRequires: python3-six
42 BuildRequires: python3-test >= 1:3.4
45 Requires: python-modules >= 1:2.6
47 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50 The goal of pathlib2 is to provide a backport of standard pathlib
51 module which tracks the standard library module, so all the newest
52 features of the standard pathlib can be used also on older Python
55 %description -l pl.UTF-8
56 Celem pathlib2 jest udostępnienie backportu modułu standardowego
57 pathlib podążającego za modułem biblioteki standardowej, aby
58 wszystkie najnowsze możliwości standardowego pathlib mogły być
59 używane także ze starszymi wersjami Pythona.
61 %package -n python3-%{module}
62 Summary: Object-oriented filesystem paths
63 Summary(pl.UTF-8): Zorientowane obiektowo ścieżki systemu plików
64 Group: Libraries/Python
65 Requires: python3-modules >= 1:3.4
67 %description -n python3-%{module}
68 The goal of pathlib2 is to provide a backport of standard pathlib
69 module which tracks the standard library module, so all the newest
70 features of the standard pathlib can be used also on older Python
73 %description -n python3-%{module} -l pl.UTF-8
74 Celem pathlib2 jest udostępnienie backportu modułu standardowego
75 pathlib podążającego za modułem biblioteki standardowej, aby
76 wszystkie najnowsze możliwości standardowego pathlib mogły być
77 używane także ze starszymi wersjami Pythona.
80 %setup -q -n %{module}-%{version}
87 %{__python} -m unittest discover -s tests
95 %{__python3} -m unittest discover -s tests
100 rm -rf $RPM_BUILD_ROOT
113 rm -rf $RPM_BUILD_ROOT
117 %defattr(644,root,root,755)
118 %doc CHANGELOG.rst LICENSE.rst README.rst
119 %{py_sitescriptdir}/pathlib2
120 %{py_sitescriptdir}/pathlib2-%{version}-py*.egg-info
124 %files -n python3-%{module}
125 %defattr(644,root,root,755)
126 %doc CHANGELOG.rst LICENSE.rst README.rst
127 %{py3_sitescriptdir}/pathlib2
128 %{py3_sitescriptdir}/pathlib2-%{version}-py*.egg-info