]> git.pld-linux.org Git - packages/python3-path.git/blame - python3-path.spec
rebuild with tests and docs
[packages/python3-path.git] / python3-path.spec
CommitLineData
ef7bdd8f
JB
1#
2# Conditional build:
3%bcond_without doc # Sphinx documentation
4%bcond_without tests # py.test unit tests
5
6Summary: Python 2 module wrapper for os.path
7Summary(pl.UTF-8): Moduł Pythona 2 obudowujący os.path
8Name: python3-path
b98409c9 9Version: 16.4.0
acc999da 10Release: 3
ef7bdd8f
JB
11License: MIT
12Group: Libraries/Python
13#Source0Download: https://pypi.python.org/simple/path/
14Source0: https://files.pythonhosted.org/packages/source/p/path/path-%{version}.tar.gz
b98409c9 15# Source0-md5: a5b935b554ffa3889bb88fd19fc2669b
ef7bdd8f
JB
16URL: https://github.com/jaraco/path
17BuildRequires: python3 >= 1:3.6
18BuildRequires: python3-modules >= 1:3.6
19BuildRequires: python3-setuptools >= 1:31.0.1
20BuildRequires: python3-setuptools_scm >= 3.4.1
21BuildRequires: python3-toml
22%if %{with tests}
23BuildRequires: python3-appdirs
24BuildRequires: python3-packaging
25BuildRequires: python3-pygments
26BuildRequires: python3-pytest >= 3.5
27BuildRequires: python3-pytest-black >= 0.3.7
28BuildRequires: python3-pytest-cov
29BuildRequires: python3-pytest-flake8
30%endif
31BuildRequires: rpm-pythonprov
32BuildRequires: rpmbuild(macros) >= 1.714
33%if %{with doc}
34BuildRequires: sphinx-pdg-3
ef7bdd8f 35BuildRequires: python3-jaraco.packaging >= 8.2
b98409c9
JB
36#BuildRequires: python3-jaraco.packaging >= 9 # when available
37BuildRequires: python3-jaraco.tidelift >= 1.4
ef7bdd8f
JB
38BuildRequires: python3-rst.linker >= 1.9
39%endif
40Requires: python3-modules >= 1:3.6
41BuildArch: noarch
42BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44%description
45path implements a path objects as first-class entities, allowing
46common operations on files to be invoked on those path objects
47directly.
48
49%description -l pl.UTF-8
50path implementuje obiekty ścieżek jako instancje pierwszoklasowe,
51pozwalające na wykonywanie ogólnych operacji na plikach bezpośrednio
52na tych ścieżkach.
53
54%package apidocs
55Summary: Documentation for Python path module
56Summary(pl.UTF-8): Dokumentacja modułu Pythona path
57Group: Documentation
58
59%description apidocs
60Documentation for Python path module.
61
62%description apidocs -l pl.UTF-8
63Dokumentacja modułu Pythona path.
64
65%prep
66%setup -q -n path-%{version}
67
b98409c9
JB
68# stub for setuptools
69cat >setup.py <<EOF
70from setuptools import setup
71setup()
72EOF
73
ef7bdd8f
JB
74%build
75%py3_build
76
77%if %{with tests}
78PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
79PYTEST_PLUGINS="pytest_black,pytest_cov.plugin,pytest_flake8" \
80%{__python3} -m pytest test_path.py
81%endif
82
83%if %{with doc}
84# disable warnings (-W in SPHINXOPTS) to ignore objects.inv fetching error on builders
b98409c9 85PYTHONPATH=$(pwd) \
ef7bdd8f
JB
86%{__make} -C docs html \
87 SPHINXBUILD=sphinx-build-3 \
88 SPHINXOPTS=
89%endif
90
91%install
92rm -rf $RPM_BUILD_ROOT
93
94%py3_install
95
96%clean
97rm -rf $RPM_BUILD_ROOT
98
99%files
100%defattr(644,root,root,755)
101%doc CHANGES.rst LICENSE README.rst
102%{py3_sitescriptdir}/path
103%{py3_sitescriptdir}/path-%{version}-py*.egg-info
104
105%if %{with doc}
106%files apidocs
107%defattr(644,root,root,755)
108%doc docs/_build/html/{_static,*.html,*.js}
109%endif
This page took 0.109847 seconds and 4 git commands to generate.