]> git.pld-linux.org Git - packages/python-backports.os.git/blame - python-backports.os.spec
- release 3 (by relup.sh)
[packages/python-backports.os.git] / python-backports.os.spec
CommitLineData
056bb2a0
JB
1#
2# Conditional build:
3%bcond_without tests # unit tests
4%bcond_without python2 # CPython 2.x module
5%bcond_with python3 # CPython 3.x module (not needed for 3.5+)
6
7Summary: Backport of new features in Python's os module
8Summary(pl.UTF-8): Backport nowych funkcji z modułu Pythona os
9Name: python-backports.os
10Version: 0.1.1
87c24a7a 11Release: 3
056bb2a0
JB
12License: PSF v2
13Group: Libraries/Python
14#Source0Download: https://pypi.org/simple/backports-os/
15Source0: https://files.pythonhosted.org/packages/source/b/backports.os/backports.os-%{version}.tar.gz
16# Source0-md5: 39286340acee2f2999b6da13c89bdd67
17URL: https://pypi.org/project/backports.os/
18BuildRequires: rpm-pythonprov
19BuildRequires: rpmbuild(macros) >= 1.714
20%if %{with python2}
21BuildRequires: python-modules >= 1:2.7
22BuildRequires: python-setuptools
23BuildRequires: python-setuptools_scm
24%if %{with tests}
25BuildRequires: python-future
26%endif
27%endif
28%if %{with python3}
29BuildRequires: python3-modules >= 1:3.4
30BuildRequires: python3-setuptools
31BuildRequires: python3-setuptools_scm
32%endif
33Requires: python-backports
34Requires: python-modules >= 1:2.7
35BuildArch: noarch
36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38%description
39This package provides backports of new features in Python's os module
40under the backports namespace.
41
42%description -l pl.UTF-8
43Ten pakiet zawiera backport nowych funkcji z modułu Pythona os
44umieszczony w przestrzeni nazw backports.
45
46%package -n python3-backports.os
47Summary: Backport of new features in Python's os module
48Summary(pl.UTF-8): Backport nowych funkcji z modułu Pythona os
49Group: Libraries/Python
50Requires: python3-modules >= 1:3.4
51
52%description -n python3-backports.os
53This package provides backports of new features in Python's os module
54under the backports namespace.
55
56%description -n python3-backports.os -l pl.UTF-8
57Ten pakiet zawiera backport nowych funkcji z modułu Pythona os
58umieszczony w przestrzeni nazw backports.
59
60%prep
61%setup -q -n backports.os-%{version}
62
63%build
64%if %{with python2}
65%py_build
66
67%if %{with tests}
68PYTHONPATH=$(pwd)/build-2/lib \
69%{__python} -m unittest discover -s tests
70%endif
71%endif
72
73%if %{with python3}
74%py3_build
75
76%if %{with tests}
77PYTHONPATH=$(pwd)/build-3/lib \
78%{__python3} -m unittest discover -s tests
79%endif
80%endif
81
82%install
83rm -rf $RPM_BUILD_ROOT
84
85%if %{with python2}
86%py_install
87
88%py_postclean
89# packaged in python-backports package
90%{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/backports/__init__.py*
91%endif
92
93%if %{with python3}
94%py3_install
95
96# not needed for python3 (PEP-420)?
97%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/backports/{__init__.py,__pycache__/__init__.*}
98%endif
99
100%clean
101rm -rf $RPM_BUILD_ROOT
102
103%if %{with python2}
104%files
105%defattr(644,root,root,755)
106%doc README.rst
107%{py_sitescriptdir}/backports/os.py[co]
108%{py_sitescriptdir}/backports.os-%{version}-py*.egg-info
109%endif
110
111%if %{with python3}
112%files -n python3-backports.os
113%defattr(644,root,root,755)
114%doc README.rst
115%{py3_sitescriptdir}/backports/os.py
116%{py3_sitescriptdir}/backports/__pycache__/os.cpython-*.py[co]
117%{py3_sitescriptdir}/backports.os-%{version}-py*.egg-info
118%endif
This page took 0.056598 seconds and 4 git commands to generate.