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