]> git.pld-linux.org Git - packages/python-pathlib2.git/blob - python-pathlib2.spec
Version 2.2.1. Rel. 1. Initial.
[packages/python-pathlib2.git] / python-pathlib2.spec
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
5
6 %define         module  pathlib2
7 Summary:        Object-oriented filesystem paths
8 Summary(pl.UTF-8):      Zorientowane obiektowo ścieżki systemu plików
9 Name:           python-%{module}
10 Version:        2.2.1
11 Release:        1
12 License:        MIT
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
19 %if %{with python2}
20 BuildRequires:  python-modules
21 BuildRequires:  python-scandir
22 BuildRequires:  python-setuptools
23 BuildRequires:  python-test
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-modules
27 BuildRequires:  python3-scandir
28 BuildRequires:  python3-setuptools
29 BuildRequires:  python3-test
30 %endif
31 Requires:       python-modules
32 Requires:       python-scandir
33 BuildArch:      noarch
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
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
40 versions.
41
42 # %%description -l pl.UTF-8
43
44 %package -n python3-%{module}
45 Summary:        -
46 Summary(pl.UTF-8):      -
47 Group:          Libraries/Python
48 Requires:       python3-modules
49 Requires:       python3-scandir
50
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
55 versions.
56
57 # %%description -n python3-%{module} -l pl.UTF-8
58
59 %package apidocs
60 Summary:        %{module} API documentation
61 Summary(pl.UTF-8):      Dokumentacja API %{module}
62 Group:          Documentation
63
64 %description apidocs
65 API documentation for %{module}.
66
67 %description apidocs -l pl.UTF-8
68 Dokumentacja API %{module}.
69
70 %prep
71 %setup -q -n %{module}-%{version}
72
73
74 %build
75 %if %{with python2}
76 %py_build %{?with_tests:test}
77 %endif
78
79 %if %{with python3}
80 %py3_build %{?with_tests:test}
81 %endif
82
83 %if %{with doc}
84 cd docs
85 %{__make} -j1 html
86 rm -rf _build/html/_sources
87 %endif
88
89 %install
90 rm -rf $RPM_BUILD_ROOT
91
92 %if %{with python2}
93 %py_install
94
95 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
96 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
97
98 %py_postclean
99 %endif
100
101 %if %{with python3}
102 %py3_install
103 %endif
104
105 %clean
106 rm -rf $RPM_BUILD_ROOT
107
108 %if %{with python2}
109 %files
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
114 %endif
115
116 %if %{with python3}
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
123
124 %endif
125
126 %if %{with doc}
127 %files apidocs
128 %defattr(644,root,root,755)
129 %doc docs/_build/html/*
130 %endif
This page took 0.0705789999999999 seconds and 3 git commands to generate.