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