]> git.pld-linux.org Git - packages/python-pathlib2.git/blame - python-pathlib2.spec
- updated to 2.3.2
[packages/python-pathlib2.git] / python-pathlib2.spec
CommitLineData
b2714b2c
JB
1#
2# Conditional build:
14b7d696
MK
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
6
7%define module pathlib2
8Summary: Object-oriented filesystem paths
9Summary(pl.UTF-8): Zorientowane obiektowo ścieżki systemu plików
10Name: python-%{module}
b2714b2c
JB
11Version: 2.3.2
12Release: 1
14b7d696
MK
13License: MIT
14Group: Libraries/Python
b2714b2c
JB
15#Source0Download: https://pypi.org/simple/pathlib2/
16Source0: https://files.pythonhosted.org/packages/source/p/pathlib2/pathlib2-%{version}.tar.gz
17# Source0-md5: fd76fb5d0baa798bfe12fb7965da97f8
18URL: https://pypi.org/project/pathlib2/
14b7d696
MK
19BuildRequires: rpm-pythonprov
20BuildRequires: rpmbuild(macros) >= 1.714
21%if %{with python2}
b2714b2c 22BuildRequires: python-modules >= 1:2.6
14b7d696 23BuildRequires: python-setuptools
b2714b2c
JB
24%if %{with tests}
25BuildRequires: python-mock
26BuildRequires: python-scandir
27BuildRequires: python-six
28BuildRequires: python-test >= 1:2.6
29%if "%{py_ver}" < "2.7"
30BuildRequires: python-unittest2
31%endif
32%endif
14b7d696
MK
33%endif
34%if %{with python3}
b2714b2c 35BuildRequires: python3-modules >= 1:3.3
14b7d696 36BuildRequires: python3-setuptools
b2714b2c
JB
37%if %{with tests}
38%if "%{py3_ver}" < "3.3"
39BuildRequires: python3-mock
40%endif
41%if "%{py3_ver}" < "3.5"
42BuildRequires: python3-scandir
43%endif
44BuildRequires: python3-six
45BuildRequires: python3-test >= 1:2.6
46%endif
14b7d696 47%endif
b2714b2c 48Requires: python-modules >= 1:2.6
14b7d696
MK
49BuildArch: noarch
50BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52%description
53The goal of pathlib2 is to provide a backport of standard pathlib
54module which tracks the standard library module, so all the newest
55features of the standard pathlib can be used also on older Python
56versions.
57
b2714b2c
JB
58%description -l pl.UTF-8
59Celem pathlib2 jest udostępnienie backportu modułu standardowego
60pathlib podążającego za modułem biblioteki standardowej, aby
61wszystkie najnowsze możliwości standardowego pathlib mogły być
62używane także ze starszymi wersjami Pythona.
14b7d696
MK
63
64%package -n python3-%{module}
b2714b2c
JB
65Summary: Object-oriented filesystem paths
66Summary(pl.UTF-8): Zorientowane obiektowo ścieżki systemu plików
14b7d696 67Group: Libraries/Python
b2714b2c 68Requires: python3-modules >= 1:3.3
14b7d696
MK
69
70%description -n python3-%{module}
71The goal of pathlib2 is to provide a backport of standard pathlib
72module which tracks the standard library module, so all the newest
73features of the standard pathlib can be used also on older Python
74versions.
75
b2714b2c
JB
76%description -n python3-%{module} -l pl.UTF-8
77Celem pathlib2 jest udostępnienie backportu modułu standardowego
78pathlib podążającego za modułem biblioteki standardowej, aby
79wszystkie najnowsze możliwości standardowego pathlib mogły być
80używane także ze starszymi wersjami Pythona.
14b7d696
MK
81
82%prep
83%setup -q -n %{module}-%{version}
84
85
86%build
87%if %{with python2}
b2714b2c
JB
88%py_build
89
90%if %{with tests}
91%{__python} -m unittest discover -s tests
92%endif
14b7d696
MK
93%endif
94
95%if %{with python3}
b2714b2c 96%py3_build
14b7d696 97
b2714b2c
JB
98%if %{with tests}
99%{__python3} -m unittest discover -s tests
100%endif
14b7d696
MK
101%endif
102
103%install
104rm -rf $RPM_BUILD_ROOT
105
106%if %{with python2}
107%py_install
108
14b7d696
MK
109%py_postclean
110%endif
111
112%if %{with python3}
113%py3_install
114%endif
115
116%clean
117rm -rf $RPM_BUILD_ROOT
118
119%if %{with python2}
120%files
121%defattr(644,root,root,755)
b2714b2c
JB
122%doc CHANGELOG.rst LICENSE.rst README.rst
123%{py_sitescriptdir}/pathlib2
124%{py_sitescriptdir}/pathlib2-%{version}-py*.egg-info
14b7d696
MK
125%endif
126
127%if %{with python3}
128%files -n python3-%{module}
129%defattr(644,root,root,755)
b2714b2c
JB
130%doc CHANGELOG.rst LICENSE.rst README.rst
131%{py3_sitescriptdir}/pathlib2
132%{py3_sitescriptdir}/pathlib2-%{version}-py*.egg-info
14b7d696 133%endif
This page took 0.086737 seconds and 4 git commands to generate.