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