]> git.pld-linux.org Git - packages/python-invoke.git/blob - python-invoke.spec
fab4eb15a50b21e4363de0bbfd2ef49728988073
[packages/python-invoke.git] / python-invoke.spec
1 # Conditional build:
2 %bcond_without  tests   # unit tests
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5
6 %define         module          invoke
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}
11 Version:        1.3.0
12 Release:        2
13 License:        BSD
14 Group:          Libraries/Python
15 # if pypi:
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
21 %if %{with python2}
22 BuildRequires:  python-modules
23 BuildRequires:  python-setuptools
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-modules
27 BuildRequires:  python3-setuptools
28 %endif
29 Requires:       python-modules
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 Invoke is a Python task execution tool & library, drawing inspiration
35 from various sources to arrive at a powerful & clean feature set.
36
37 %package -n python3-%{module}
38 Summary:        Managing shell-oriented subprocesses and organizing executable Python code into CLI-invokable tasks
39 Summary(pl.UTF-8):      -
40 Group:          Libraries/Python
41 Requires:       python3-modules
42
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.
46
47 %prep
48 %setup -q -n %{pypi_name}-%{version}
49
50 %build
51 %if %{with python2}
52 %py_build %{?with_tests:test}
53 %endif
54
55 %if %{with python3}
56 %py3_build %{?with_tests:test}
57 %endif
58
59 %install
60 rm -rf $RPM_BUILD_ROOT
61
62 %if %{with python2}
63 %py_install
64
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}
70
71 %py_postclean
72 %endif
73
74 %if %{with python3}
75 %py3_install
76 %endif
77
78 %clean
79 rm -rf $RPM_BUILD_ROOT
80
81 %if %{with python2}
82 %files
83 %defattr(644,root,root,755)
84 %doc README.rst
85 %{py_sitescriptdir}/%{module}
86 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
87 %endif
88
89 %if %{with python3}
90 %files -n python3-%{module}
91 %defattr(644,root,root,755)
92 %doc README.rst
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
97 %endif
This page took 0.047347 seconds and 2 git commands to generate.