]> git.pld-linux.org Git - packages/python-cliff.git/blame - python-cliff.spec
- release 4 (by relup.sh)
[packages/python-cliff.git] / python-cliff.spec
CommitLineData
166e2be6
JK
1#
2# Conditional build:
3%bcond_with tests # do perform "make test"
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7Summary: Command Line Interface Formulation Framework
8Name: python-cliff
9Version: 2.8.0
fe38ad01 10Release: 4
166e2be6
JK
11License: Apache
12Group: Libraries/Python
13Source0: https://pypi.python.org/packages/9e/26/7db86b6fb7bcf335e691a274b8f5141006ea87e7783e43d7ef5a498a09da/cliff-%{version}.tar.gz
14# Source0-md5: 6f1fcd6deb8068984f3f0e594f02f2b7
15URL: https://pypi.python.org/pypi/cliff
16BuildRequires: rpm-pythonprov
17BuildRequires: rpmbuild(macros) >= 1.714
18%if %{with python2}
19BuildRequires: python-pbr >= 2.0.0
20BuildRequires: python-setuptools
21%if %{with tests}
22BuildRequires: python-PyYAML >= 3.10.0
23BuildRequires: python-cmd2 >= 0.6.7
24BuildRequires: python-coverage >= 4.0
25BuildRequires: python-mock >= 2.0
26BuildRequires: python-openstackdocstheme >= 1.11.0
27BuildRequires: python-prettytable >= 0.7.1
28BuildRequires: python-pyparsing >= 2.1.0
29BuildRequires: python-six >= 1.9.0
30BuildRequires: python-stevedore >= 1.20.0
31BuildRequires: python-subunit >= 0.0.18
32BuildRequires: python-testrepository >= 0.0.18
33BuildRequires: python-testscenarios >= 0.4
34BuildRequires: python-testtools >= 1.4.0
35BuildRequires: python-unicodecsv >= 0.8.0
36BuildRequires: sphinx-pdg-2 >= 1.6.2
37%endif
38%endif
39%if %{with python3}
40BuildRequires: python3-modules
41BuildRequires: python3-pbr >= 2.0.0
42%if %{with tests}
43BuildRequires: python3-PyYAML >= 3.10.0
44BuildRequires: python3-cmd2 >= 0.6.7
45BuildRequires: python3-coverage >= 4.0
46BuildRequires: python3-mock >= 2.0
47BuildRequires: python3-openstackdocstheme >= 1.11.0
48BuildRequires: python3-prettytable >= 0.7.1
49BuildRequires: python3-pyparsing >= 2.1.0
50BuildRequires: python3-six >= 1.9.0
51BuildRequires: python3-stevedore >= 1.20.0
52BuildRequires: python3-subunit >= 0.0.18
53BuildRequires: python3-testrepository >= 0.0.18
54BuildRequires: python3-testscenarios >= 0.4
55BuildRequires: python3-testtools >= 1.4.0
56BuildRequires: sphinx-pdg-3 >= 1.6.2
57%endif
58%endif
59BuildRequires: sed >= 4.0
60Requires: python-PyYAML >= 3.10.0
61Requires: python-cmd2 >= 0.6.7
62Requires: python-prettytable >= 0.7.1
63Requires: python-pyparsing >= 2.1.0
64Requires: python-six >= 1.9.0
65Requires: python-stevedore >= 1.20.0
66Requires: python-unicodecsv >= 0.8.0
67BuildArch: noarch
68BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
69
70%description
71cliff is a framework for building command line programs. It uses
72setuptools entry points to provide subcommands, output formatters, and
73other extensions.
74
75%package -n python3-cliff
76Summary: Command Line Interface Formulation Framework
77Group: Libraries/Python
78Requires: python3-PyYAML >= 3.10.0
79Requires: python3-cmd2 >= 0.6.7
80Requires: python3-prettytable >= 0.7.1
81Requires: python3-pyparsing >= 2.1.0
82Requires: python3-six >= 1.9.0
83Requires: python3-stevedore >= 1.20.0
84
85%description -n python3-cliff
86cliff is a framework for building command line programs. It uses
87setuptools entry points to provide subcommands, output formatters, and
88other extensions.
89
90%prep
91%setup -q -n cliff-%{version}
92
93%build
94%if %{with python2}
95%py_build %{?with_tests:test}
96%endif
97
98%if %{with python3}
99%py3_build %{?with_tests:test}
100%endif
101
102%install
103rm -rf $RPM_BUILD_ROOT
104
105%if %{with python2}
106%py_install
107
108%py_postclean
109%endif
110
111%if %{with python3}
112%py3_install
113
114# python dependency generator does not support conditionals
115# remove python2-only dependencies here
116sed -i -e"/python_version<'3.0'/,+1 d" $RPM_BUILD_ROOT%{py3_sitescriptdir}/cliff-%{version}-py*.egg-info/requires.txt
117%endif
118
119%if %{with python2}
120install -d $RPM_BUILD_ROOT%{_examplesdir}/python-cliff-%{version}
121cp -a demoapp/* $RPM_BUILD_ROOT%{_examplesdir}/python-cliff-%{version}
122find $RPM_BUILD_ROOT%{_examplesdir}/python-cliff-%{version} -name '*.py' \
123 | xargs sed -i '1s|^#!.*python\b|#!%{__python}|'
124%endif
125%if %{with python3}
126install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-cliff-%{version}
127cp -a demoapp/* $RPM_BUILD_ROOT%{_examplesdir}/python3-cliff-%{version}
128find $RPM_BUILD_ROOT%{_examplesdir}/python3-cliff-%{version} -name '*.py' \
129 | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
130%endif
131
132%clean
133rm -rf $RPM_BUILD_ROOT
134
135%if %{with python2}
136%files
137%defattr(644,root,root,755)
138%doc AUTHORS ChangeLog README.rst
139%{py_sitescriptdir}/cliff
140%{py_sitescriptdir}/cliff-%{version}-py*.egg-info
141%{_examplesdir}/python-cliff-%{version}
142%endif
143
144%if %{with python3}
145%files -n python3-cliff
146%defattr(644,root,root,755)
147%doc AUTHORS ChangeLog README.rst
148%{py3_sitescriptdir}/cliff
149%{py3_sitescriptdir}/cliff-%{version}-py*.egg-info
150%{_examplesdir}/python3-cliff-%{version}
151%endif
This page took 0.071557 seconds and 4 git commands to generate.