]> git.pld-linux.org Git - packages/python-vine.git/blame - python-vine.spec
- release 4 (by relup.sh)
[packages/python-vine.git] / python-vine.spec
CommitLineData
7502a825 1# NOTE: for versions >= 5.0.0 (for python 3.6+) see python3-vine.spec
13d9e668
JK
2#
3# Conditional build:
1d367226
JB
4%bcond_without doc # Sphinx documentation
5%bcond_without tests # unit tests
13d9e668 6%bcond_without python2 # CPython 2.x module
7502a825 7%bcond_with python3 # CPython 3.x module (built from python3-vine.spec)
13d9e668 8
ff60636c
ER
9%define module vine
10%define egg_name vine
11%define pypi_name vine
13d9e668 12Summary: Python promises
1d367226 13Summary(pl.UTF-8): Obietnice dla Pythona
13d9e668 14Name: python-%{module}
1d367226 15# keep 1.x here for python2 support
e385424c 16Version: 1.3.0
90752b8b 17Release: 4
13d9e668
JK
18License: BSD
19Group: Libraries/Python
1d367226 20Source0: https://files.pythonhosted.org/packages/source/v/vine/%{pypi_name}-%{version}.tar.gz
e385424c 21# Source0-md5: 5d125e0b4d759b39e03d11902dede8c9
1d367226 22URL: https://vine.readthedocs.io/
13d9e668
JK
23BuildRequires: rpm-pythonprov
24BuildRequires: rpmbuild(macros) >= 1.714
25%if %{with python2}
1d367226
JB
26BuildRequires: python-modules >= 1:2.7
27BuildRequires: python-setuptools >= 20.6.7
28%if %{with tests}
29BuildRequires: python-case >= 1.3.1
30BuildRequires: python-pytest >= 3.0
31%endif
13d9e668
JK
32%endif
33%if %{with python3}
1d367226
JB
34BuildRequires: python3-modules >= 1:3.4
35BuildRequires: python3-setuptools >= 20.6.7
36%if %{with tests}
37BuildRequires: python3-case >= 1.3.1
38BuildRequires: python3-pytest >= 3.0
39%endif
40%endif
41%if %{with doc}
42BuildRequires: sphinx-pdg-3
43BuildRequires: python3-sphinx_celery >= 1.1
13d9e668 44%endif
1d367226 45Requires: python-modules >= 1:2.7
13d9e668
JK
46BuildArch: noarch
47BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
49%description
50Python promises.
51
1d367226
JB
52%description -l pl.UTF-8
53Obietnice (promise) dla Pythona.
54
13d9e668
JK
55%package -n python3-%{module}
56Summary: Python promises
1d367226 57Summary(pl.UTF-8): Obietnice dla Pythona
13d9e668 58Group: Libraries/Python
1d367226 59Requires: python3-modules >= 1:3.4
13d9e668
JK
60
61%description -n python3-%{module}
62Python promises.
63
1d367226
JB
64%description -n python3-%{module} -l pl.UTF-8
65Obietnice (promise) dla Pythona.
66
13d9e668 67%package apidocs
1d367226
JB
68Summary: API documentation for vine module
69Summary(pl.UTF-8): Dokumentacja API modułu vine
13d9e668
JK
70Group: Documentation
71
72%description apidocs
1d367226 73API documentation for vine module.
13d9e668
JK
74
75%description apidocs -l pl.UTF-8
1d367226 76Dokumentacja API modułu vine.
13d9e668
JK
77
78%prep
ff60636c 79%setup -q -n %{pypi_name}-%{version}
13d9e668
JK
80
81%build
82%if %{with python2}
1d367226
JB
83%py_build
84
85%if %{with tests}
86PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
87PYTEST_PLUGINS="case.pytest" \
88%{__python} -m pytest t/unit
89%endif
13d9e668
JK
90%endif
91
92%if %{with python3}
1d367226
JB
93%py3_build
94
95%if %{with tests}
96PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
97PYTEST_PLUGINS="case.pytest" \
98%{__python3} -m pytest t/unit
99%endif
13d9e668
JK
100%endif
101
102%if %{with doc}
1d367226
JB
103%{__make} -C docs html \
104 SPHINXBUILD=sphinx-build-3
13d9e668
JK
105%endif
106
107%install
108rm -rf $RPM_BUILD_ROOT
1d367226 109
13d9e668
JK
110%if %{with python2}
111%py_install
1d367226
JB
112
113%py_postclean
13d9e668
JK
114%endif
115
116%if %{with python3}
117%py3_install
118%endif
119
120%clean
121rm -rf $RPM_BUILD_ROOT
122
123%if %{with python2}
124%files
125%defattr(644,root,root,755)
1d367226 126%doc Changelog LICENSE README.rst
13d9e668 127%{py_sitescriptdir}/%{module}
ff60636c 128%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
13d9e668
JK
129%endif
130
131%if %{with python3}
132%files -n python3-%{module}
133%defattr(644,root,root,755)
1d367226 134%doc Changelog LICENSE README.rst
13d9e668 135%{py3_sitescriptdir}/%{module}
ff60636c 136%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
13d9e668
JK
137%endif
138
139%if %{with doc}
140%files apidocs
141%defattr(644,root,root,755)
1d367226 142%doc docs/_build/html/{_modules,_static,reference,*.html,*.js}
13d9e668 143%endif
This page took 0.046365 seconds and 4 git commands to generate.