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