1 %bcond_with doc # don't build doc
2 %bcond_without tests # do not perform "make test"
3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
6 %define module pathlib2
7 Summary: Object-oriented filesystem paths
8 Summary(pl.UTF-8): Zorientowane obiektowo ścieżki systemu plików
13 Group: Libraries/Python
14 Source0: https://pypi.python.org/packages/ab/d8/ac7489d50146f29d0a14f65545698f4545d8a6b739b24b05859942048b56/pathlib2-%{version}.tar.gz
15 # Source0-md5: 6c75bfde898b6c88627621a48ee8de14
16 URL: https://pypi.python.org/pypi/pathlib2/
17 BuildRequires: rpm-pythonprov
18 BuildRequires: rpmbuild(macros) >= 1.714
20 BuildRequires: python-modules
21 BuildRequires: python-scandir
22 BuildRequires: python-setuptools
23 BuildRequires: python-test
26 BuildRequires: python3-modules
27 BuildRequires: python3-scandir
28 BuildRequires: python3-setuptools
29 BuildRequires: python3-test
31 Requires: python-modules
32 Requires: python-scandir
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 The goal of pathlib2 is to provide a backport of standard pathlib
38 module which tracks the standard library module, so all the newest
39 features of the standard pathlib can be used also on older Python
42 # %%description -l pl.UTF-8
44 %package -n python3-%{module}
47 Group: Libraries/Python
48 Requires: python3-modules
49 Requires: python3-scandir
51 %description -n python3-%{module}
52 The goal of pathlib2 is to provide a backport of standard pathlib
53 module which tracks the standard library module, so all the newest
54 features of the standard pathlib can be used also on older Python
57 # %%description -n python3-%{module} -l pl.UTF-8
60 Summary: %{module} API documentation
61 Summary(pl.UTF-8): Dokumentacja API %{module}
65 API documentation for %{module}.
67 %description apidocs -l pl.UTF-8
68 Dokumentacja API %{module}.
71 %setup -q -n %{module}-%{version}
76 %py_build %{?with_tests:test}
80 %py3_build %{?with_tests:test}
86 rm -rf _build/html/_sources
90 rm -rf $RPM_BUILD_ROOT
95 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
96 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
106 rm -rf $RPM_BUILD_ROOT
110 %defattr(644,root,root,755)
111 %doc README.rst CHANGELOG.rst
112 %{py_sitescriptdir}/%{module}.py*
113 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
117 %files -n python3-%{module}
118 %defattr(644,root,root,755)
119 %doc README.rst CHANGELOG.rst
120 %{py3_sitescriptdir}/%{module}.py
121 %{py3_sitescriptdir}/__pycache__/%{module}.*.py*
122 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
128 %defattr(644,root,root,755)
129 %doc docs/_build/html/*