]> git.pld-linux.org Git - SPECS.git/blob - python-pathlib.spec
SPECS updated Sat 31 Jul 20:26:02 CEST 2021
[SPECS.git] / python-pathlib.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  tests   # unit tests
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_with     python3 # CPython 3.x module [module included in Python 3.4+]
7
8 Summary:        Object-oriented filesystem paths
9 Summary(pl.UTF-8):      Zorientowane obiektowo ścieżki w systemie plików
10 Name:           python-pathlib
11 Version:        1.0.1
12 Release:        1
13 License:        MIT
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/pathlib/
16 Source0:        https://files.pythonhosted.org/packages/source/p/pathlib/pathlib-%{version}.tar.gz
17 # Source0-md5:  5099ed48be9b1ee29b31c82819240537
18 URL:            https://pathlib.readthedocs.org/
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.6
21 %if "%{py_ver}" < "2.7"
22 BuildRequires:  python-unittest2
23 %endif
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-modules >= 1:3.2
27 %endif
28 BuildRequires:  rpm-pythonprov
29 BuildRequires:  rpmbuild(macros) >= 1.714
30 Requires:       python-modules >= 1:2.6
31 BuildArch:      noarch
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 pathlib offers a set of classes to handle filesystem paths.
36
37 %description -l pl.UTF-8
38 pathlib oferuje zbiór klas do obsługi ścieżek w systemie plików.
39
40 %package -n python3-pathlib
41 Summary:        Object-oriented filesystem paths
42 Summary(pl.UTF-8):      Zorientowane obiektowo ścieżki w systemie plików
43 Group:          Libraries/Python
44 Requires:       python3-modules
45
46 %description -n python3-pathlib
47 pathlib offers a set of classes to handle filesystem paths.
48
49 %description -n python3-pathlib -l pl.UTF-8
50 pathlib oferuje zbiór klas do obsługi ścieżek w systemie plików.
51
52 %package apidocs
53 Summary:        API documentation for Python %{module} module
54 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona %{module}
55 Group:          Documentation
56
57 %description apidocs
58 API documentation for Python %{module} module.
59
60 %description apidocs -l pl.UTF-8
61 Dokumentacja API modułu Pythona %{module}.
62
63 %prep
64 %setup -q -n pathlib-%{version}
65
66 %build
67 %if %{with python2}
68 %py_build
69
70 %{__python} test_pathlib.py
71 %endif
72
73 %if %{with python3}
74 %py3_build
75
76 %{__python3} test_pathlib.py
77 %endif
78
79 %if %{with doc}
80 %{__make} -C docs html
81 %endif
82
83 %install
84 rm -rf $RPM_BUILD_ROOT
85
86 %if %{with python2}
87 %py_install
88
89 %py_postclean
90 %endif
91
92 %if %{with python3}
93 %py3_install
94 %endif
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99 %if %{with python2}
100 %files
101 %defattr(644,root,root,755)
102 %doc LICENSE.txt README.txt
103 %{py_sitescriptdir}/pathlib.py[co]
104 %{py_sitescriptdir}/pathlib-%{version}-py*.egg-info
105 %endif
106
107 %if %{with python3}
108 %files -n python3-pathlib
109 %defattr(644,root,root,755)
110 %doc LICENSE.txt README.txt
111 %{py3_sitescriptdir}/pathlib.py
112 %{py3_sitescriptdir}/__pycache__/pathlib.cpython-*.py[co]
113 %{py3_sitescriptdir}/pathlib-%{version}-py*.egg-info
114 %endif
115
116 %if %{with doc}
117 %files apidocs
118 %defattr(644,root,root,755)
119 %doc docs/_build/html/{_images,_static,*.html,*.js}
120 %endif
This page took 0.470771 seconds and 3 git commands to generate.