2 %bcond_without tests # unit tests
3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
7 %define egg_name invoke
8 %define pypi_name invoke
9 Summary: Managing shell-oriented subprocesses and organizing executable Python code into CLI-invokable tasks
10 Name: python-%{module}
14 Group: Libraries/Python
16 Source0: https://pypi.debian.net/invoke/%{pypi_name}-%{version}.tar.gz
17 # Source0-md5: 4404e8aa4e3f5c5b511f79e428f17dc9
18 URL: https://www.pyinvoke.org/
19 BuildRequires: rpm-pythonprov
20 BuildRequires: rpmbuild(macros) >= 1.714
22 BuildRequires: python-modules
23 BuildRequires: python-setuptools
26 BuildRequires: python3-modules
27 BuildRequires: python3-setuptools
29 Requires: python-modules
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 Invoke is a Python task execution tool & library, drawing inspiration
35 from various sources to arrive at a powerful & clean feature set.
37 %package -n python3-%{module}
38 Summary: Managing shell-oriented subprocesses and organizing executable Python code into CLI-invokable tasks
40 Group: Libraries/Python
41 Requires: python3-modules
43 %description -n python3-%{module}
44 Invoke is a Python task execution tool & library, drawing inspiration
45 from various sources to arrive at a powerful & clean feature set.
48 %setup -q -n %{pypi_name}-%{version}
52 %py_build %{?with_tests:test}
56 %py3_build %{?with_tests:test}
60 rm -rf $RPM_BUILD_ROOT
65 # when files are installed in other way that standard 'setup.py
66 # they need to be (re-)compiled
67 # change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
68 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
69 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
79 rm -rf $RPM_BUILD_ROOT
83 %defattr(644,root,root,755)
85 %{py_sitescriptdir}/%{module}
86 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
90 %files -n python3-%{module}
91 %defattr(644,root,root,755)
93 %attr(755,root,root) %{_bindir}/inv
94 %attr(755,root,root) %{_bindir}/invoke
95 %{py3_sitescriptdir}/%{module}
96 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info