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