]> git.pld-linux.org Git - packages/python-pluginbase.git/blame - python-pluginbase.spec
rebuild with python 3.10
[packages/python-pluginbase.git] / python-pluginbase.spec
CommitLineData
9b444434
JB
1#
2# Conditional build:
3%bcond_without doc # Sphinx documentation
4%bcond_without tests # unit tests
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
8Summary: Python 2 module for development of flexible plugin systems in Python
9Summary(pl.UTF-8): Moduł Pythona 2 do tworzenia elastycznych systemów wtyczek w Pythonie
10Name: python-pluginbase
11Version: 1.0.0
87ee4d1b 12Release: 4
9b444434
JB
13License: BSD
14Group: Libraries/Python
15#Source0Download: https://pypi.org/simple/pluginbase/
16Source0: https://files.pythonhosted.org/packages/source/p/pluginbase/pluginbase-%{version}.tar.gz
17# Source0-md5: f85d8c9cb4d30e90da157a22d11dc727
18URL: https://pypi.org/project/pluginbase/
19%if %{with python2}
20BuildRequires: python-modules >= 1:2.6
21BuildRequires: python-setuptools
22%if %{with tests}
23BuildRequires: python-pytest
24%endif
25%endif
26%if %{with python3}
27BuildRequires: python3-modules >= 1:3.3
28BuildRequires: python3-setuptools
29%if %{with tests}
30BuildRequires: python3-pytest
31%endif
32%endif
33BuildRequires: rpm-pythonprov
34BuildRequires: rpmbuild(macros) >= 1.714
35%if %{with doc}
36BuildRequires: sphinx-pdg
37%endif
38Requires: python-modules >= 1:2.6
39BuildArch: noarch
40BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42%description
43PluginBase is a module for Python that enables the development of
44flexible plugin systems in Python.
45
46%description -l pl.UTF-8
47PluginBase to moduł Pythona pozwalający na tworzenie elastycznych
48systemów wtyczek w Pythonie.
49
50%package -n python3-pluginbase
51Summary: Python 3 module for development of flexible plugin systems in Python
52Summary(pl.UTF-8): Moduł Pythona 3 do tworzenia elastycznych systemów wtyczek w Pythonie
53Group: Libraries/Python
54Requires: python3-modules >= 1:3.3
55
56%description -n python3-pluginbase
57PluginBase is a module for Python that enables the development of
58flexible plugin systems in Python.
59
60%description -n python3-pluginbase -l pl.UTF-8
61PluginBase to moduł Pythona pozwalający na tworzenie elastycznych
62systemów wtyczek w Pythonie.
63
64%package apidocs
65Summary: API documentation for Python pluginbase module
66Summary(pl.UTF-8): Dokumentacja API modułu Pythona pluginbase
67Group: Documentation
68
69%description apidocs
70API documentation for Python pluginbase module.
71
72%description apidocs -l pl.UTF-8
73Dokumentacja API modułu Pythona pluginbase.
74
75%prep
76%setup -q -n pluginbase-%{version}
77
78%build
79%if %{with python2}
80%py_build
81
82%if %{with tests}
83cd tests
84PYTHONPATH=.. \
85%{__python} -m pytest
86cd ..
87%endif
88%endif
89
90%if %{with python3}
91%py3_build
92
93%if %{with tests}
94cd tests
95PYTHONPATH=.. \
96%{__python3} -m pytest
97cd ..
98%endif
99%endif
100
101%if %{with doc}
102%{__make} -C docs html
103%endif
104
105%install
106rm -rf $RPM_BUILD_ROOT
107
108%if %{with python2}
109%py_install
110
111%py_postclean
112%endif
113
114%if %{with python3}
115%py3_install
116%endif
117
118%clean
119rm -rf $RPM_BUILD_ROOT
120
121%if %{with python2}
122%files
123%defattr(644,root,root,755)
124%doc LICENSE README.md
125%{py_sitescriptdir}/pluginbase.py[co]
126%{py_sitescriptdir}/pluginbase-%{version}-py*.egg-info
127%endif
128
129%if %{with python3}
130%files -n python3-pluginbase
131%defattr(644,root,root,755)
132%doc LICENSE README.md
133%{py3_sitescriptdir}/pluginbase.py
134%{py3_sitescriptdir}/__pycache__/pluginbase.cpython-*.py[co]
135%{py3_sitescriptdir}/pluginbase-%{version}-py*.egg-info
136%endif
137
138%if %{with doc}
139%files apidocs
140%defattr(644,root,root,755)
141%doc docs/_build/html/{_static,*.html,*.js}
142%endif
This page took 0.106333 seconds and 4 git commands to generate.