]> git.pld-linux.org Git - packages/python-path.git/blame - python-path.spec
- rebuild with python 3.8
[packages/python-path.git] / python-path.spec
CommitLineData
b3ea5b35
JB
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
5%bcond_without doc # Sphinx documentation
6%bcond_without tests # py.test unit tests
bd259503 7
b3ea5b35
JB
8Summary: Python 2 module wrapper for os.path
9Summary(pl.UTF-8): Moduł Pythona 2 obudowujący os.path
bd259503 10Name: python-path
bdd88fba 11Version: 11.0.1
d3ee32f5 12Release: 2
b3ea5b35 13License: MIT
bd259503 14Group: Libraries/Python
bdd88fba
JB
15#Source0Download: https://pypi.python.org/simple/path-py/
16Source0: https://files.pythonhosted.org/packages/source/p/path.py/path.py-%{version}.tar.gz
17# Source0-md5: de65181c0efc12efc34d1ff1a0b1edfe
b3ea5b35
JB
18Patch0: %{name}-sphinx.patch
19URL: https://github.com/jaraco/path.py
bdd88fba 20%if %{with tests} && %(locale -a | grep -q '^C\.utf8$'; echo $?)
b3ea5b35
JB
21BuildRequires: glibc-localedb-all
22%endif
23%if %{with python2}
24BuildRequires: python >= 1:2.7
25BuildRequires: python-modules >= 1:2.7
26BuildRequires: python-setuptools
27BuildRequires: python-setuptools_scm >= 1.15.0
28%if %{with tests}
29BuildRequires: python-appdirs
30BuildRequires: python-pytest >= 2.8
bdd88fba 31BuildRequires: python-pytest-flake8
b3ea5b35
JB
32%endif
33%endif
34%if %{with python3}
bdd88fba
JB
35BuildRequires: python3 >= 1:3.4
36BuildRequires: python3-modules >= 1:3.4
b3ea5b35
JB
37BuildRequires: python3-setuptools
38BuildRequires: python3-setuptools_scm >= 1.15.0
39%if %{with tests}
40BuildRequires: python3-appdirs
41BuildRequires: python3-pytest >= 2.8
bdd88fba 42BuildRequires: python3-pytest-flake8
b3ea5b35
JB
43%endif
44%endif
49131dd8 45BuildRequires: rpm-pythonprov
b3ea5b35
JB
46BuildRequires: rpmbuild(macros) >= 1.714
47%if %{with doc}
bdd88fba
JB
48BuildRequires: sphinx-pdg-3
49BuildRequires: python3-jaraco.packaging >= 3.2
50BuildRequires: python3-rst.linker >= 1.9
b3ea5b35
JB
51%endif
52Requires: python-modules >= 1:2.7
bd259503 53BuildArch: noarch
10ccf03a 54BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
bd259503
JB
55
56%description
b3ea5b35
JB
57path.py implements a path objects as first-class entities, allowing
58common operations on files to be invoked on those path objects
59directly.
bd259503 60
170d9002 61%description -l pl.UTF-8
b3ea5b35
JB
62path.py implementuje obiekty ścieżek jako instancje pierwszoklasowe,
63pozwalające na wykonywanie ogólnych operacji na plikach bezpośrednio
64na tych ścieżkach.
65
66%package -n python3-path
67Summary: Python 3 module wrapper for os.path
68Summary(pl.UTF-8): Moduł Pythona 3 obudowujący os.path
69Group: Libraries/Python
bdd88fba 70Requires: python3-modules >= 1:3.4
b3ea5b35
JB
71
72%description -n python3-path
73path.py implements a path objects as first-class entities, allowing
74common operations on files to be invoked on those path objects
75directly.
76
77%description -n python3-path -l pl.UTF-8
78path.py implementuje obiekty ścieżek jako instancje pierwszoklasowe,
79pozwalające na wykonywanie ogólnych operacji na plikach bezpośrednio
80na tych ścieżkach.
81
82%package apidocs
83Summary: Documentation for Python path.py module
84Summary(pl.UTF-8): Dokumentacja modułu Pythona path.py
85Group: Documentation
86
87%description apidocs
88Documentation for Python path.py module.
89
90%description apidocs -l pl.UTF-8
91Dokumentacja modułu Pythona path.py.
bd259503
JB
92
93%prep
b3ea5b35
JB
94%setup -q -n path.py-%{version}
95%patch0 -p1
96
97%build
98%if %{with python2}
99%py_build
100
101%if %{with tests}
bdd88fba
JB
102LC_ALL=C.UTF-8 \
103%{__python} -m pytest test_path.py
b3ea5b35
JB
104%endif
105%endif
106
107%if %{with python3}
108%py3_build
109
110%if %{with tests}
bdd88fba
JB
111LC_ALL=C.UTF-8 \
112%{__python3} -m pytest test_path.py
b3ea5b35
JB
113%endif
114%endif
115
116%if %{with doc}
69bf8988
JB
117# disable warnings (-W in SPHINXOPTS) to ignore objects.inv fetching error on builders
118%{__make} -C docs html \
bdd88fba 119 SPHINXBUILD=sphinx-build-3 \
69bf8988 120 SPHINXOPTS=
b3ea5b35 121%endif
bd259503
JB
122
123%install
124rm -rf $RPM_BUILD_ROOT
125
b3ea5b35
JB
126%if %{with python2}
127%py_install
128
129%py_postclean
130%{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/test_path.py*
131%endif
bd259503 132
b3ea5b35
JB
133%if %{with python3}
134%py3_install
bd259503 135
b3ea5b35
JB
136%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/test_path.py
137%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/__pycache__/test_path.*
138%endif
bd259503
JB
139
140%clean
141rm -rf $RPM_BUILD_ROOT
142
b3ea5b35 143%if %{with python2}
bd259503
JB
144%files
145%defattr(644,root,root,755)
b3ea5b35
JB
146%doc CHANGES.rst README.rst
147%{py_sitescriptdir}/path.py[co]
148%{py_sitescriptdir}/path.py-%{version}-py*.egg-info
149%endif
150
151%if %{with python3}
152%files -n python3-path
153%defattr(644,root,root,755)
154%doc CHANGES.rst README.rst
155%{py3_sitescriptdir}/path.py
156%{py3_sitescriptdir}/__pycache__/path.cpython-*.py[co]
157%{py3_sitescriptdir}/path.py-%{version}-py*.egg-info
158%endif
159
160%if %{with doc}
161%files apidocs
162%defattr(644,root,root,755)
163%doc docs/_build/html/{_static,*.html,*.js}
164%endif
This page took 0.17792 seconds and 4 git commands to generate.