|
|
862f5a7 |
%if 0%{?rhel} && 0%{?rhel} <= 7
|
|
|
862f5a7 |
%bcond_with python3
|
|
|
862f5a7 |
%else
|
|
|
862f5a7 |
%bcond_without python3
|
|
|
862f5a7 |
%endif
|
|
|
862f5a7 |
|
|
|
862f5a7 |
# python2-backports-csv not in Fedora yet, disable Python 2 version
|
|
|
862f5a7 |
%global with_python2 0
|
|
|
862f5a7 |
|
|
|
862f5a7 |
%global pypi_name cli_helpers
|
|
|
862f5a7 |
|
|
|
862f5a7 |
Summary: Python helpers for common CLI tasks
|
|
|
862f5a7 |
Name: python-cli-helpers
|
|
|
1eb946f |
Version: 1.2.1
|
|
|
1eb946f |
Release: 1%{?dist}
|
|
|
862f5a7 |
License: BSD
|
|
|
862f5a7 |
URL: https://github.com/dbcli/cli_helpers
|
|
|
862f5a7 |
Source0: https://files.pythonhosted.org/packages/source/c/cli_helpers/cli_helpers-%{version}.tar.gz
|
|
|
862f5a7 |
BuildArch: noarch
|
|
|
862f5a7 |
%if 0%{?with_python2}
|
|
|
862f5a7 |
BuildRequires: python2-backports-csv
|
|
|
8ba1b76 |
BuildRequires: python2-configobj
|
|
|
862f5a7 |
BuildRequires: python2-devel
|
|
|
66986bf |
BuildRequires: python2-pytest
|
|
|
862f5a7 |
BuildRequires: python-setuptools
|
|
|
66986bf |
BuildRequires: python2-tabulate
|
|
|
862f5a7 |
BuildRequires: python2-terminaltables
|
|
|
3a44ad7 |
BuildRequires: python2-wcwidth
|
|
|
862f5a7 |
%endif
|
|
|
862f5a7 |
%if %{with python3}
|
|
|
8ba1b76 |
BuildRequires: python3-configobj
|
|
|
862f5a7 |
BuildRequires: python3-devel
|
|
|
456ba47 |
BuildRequires: python3-mock
|
|
|
66986bf |
BuildRequires: python3-pytest
|
|
|
862f5a7 |
BuildRequires: python3-setuptools
|
|
|
66986bf |
BuildRequires: python3-tabulate
|
|
|
862f5a7 |
BuildRequires: python3-terminaltables
|
|
|
3a44ad7 |
BuildRequires: python3-wcwidth
|
|
|
862f5a7 |
%endif
|
|
|
8b54938 |
%global _description\
|
|
|
8b54938 |
CLI Helpers is a Python package that makes it easy to perform common\
|
|
|
8b54938 |
tasks when building command-line apps. Its a helper library for\
|
|
|
862f5a7 |
command-line interfaces.
|
|
|
8b54938 |
%description %_description
|
|
|
862f5a7 |
|
|
|
862f5a7 |
%if 0%{?with_python2}
|
|
|
862f5a7 |
%package -n python2-cli-helpers
|
|
|
862f5a7 |
Summary: %{summary}
|
|
|
862f5a7 |
%{?python_provide:%python_provide python2-cli-helpers}
|
|
|
862f5a7 |
%{?el6:Provides: python-cli-helpers}
|
|
|
8ba1b76 |
Requires: python2-configobj >= 5.0.5
|
|
|
862f5a7 |
Requires: python2-pygments >= 1.6
|
|
|
8ba1b76 |
Requires: python2-tabulate >= 0.8.2
|
|
|
862f5a7 |
Requires: python2-terminaltables >= 3.0.0
|
|
|
3a44ad7 |
Requires: python2-wcwidth
|
|
|
8b54938 |
%description -n python2-cli-helpers %_description
|
|
|
862f5a7 |
%endif
|
|
|
862f5a7 |
|
|
|
862f5a7 |
%if %{with python3}
|
|
|
862f5a7 |
%package -n python3-cli-helpers
|
|
|
862f5a7 |
Summary: %{summary}
|
|
|
862f5a7 |
%{?python_provide:%python_provide python3-cli-helpers}
|
|
|
8ba1b76 |
Requires: python3-configobj >= 5.0.5
|
|
|
862f5a7 |
Requires: python3-pygments >= 1.6
|
|
|
8ba1b76 |
Requires: python3-tabulate >= 0.8.2
|
|
|
862f5a7 |
Requires: python3-terminaltables >= 3.0.0
|
|
|
3a44ad7 |
Requires: python3-wcwidth
|
|
|
8b54938 |
%description -n python3-cli-helpers %_description
|
|
|
862f5a7 |
%endif
|
|
|
862f5a7 |
|
|
|
862f5a7 |
%prep
|
|
|
862f5a7 |
%setup -q -n %{pypi_name}-%{version}
|
|
|
862f5a7 |
rm -rf %{pypi_name}.egg-info
|
|
|
862f5a7 |
|
|
|
862f5a7 |
%build
|
|
|
862f5a7 |
%if 0%{?with_python2}
|
|
|
862f5a7 |
%py2_build
|
|
|
862f5a7 |
%endif
|
|
|
862f5a7 |
%if %{with python3}
|
|
|
862f5a7 |
%py3_build
|
|
|
862f5a7 |
%endif
|
|
|
862f5a7 |
|
|
|
862f5a7 |
%install
|
|
|
862f5a7 |
%if %{with python3}
|
|
|
862f5a7 |
%py3_install
|
|
|
862f5a7 |
%endif
|
|
|
862f5a7 |
%if 0%{?with_python2}
|
|
|
862f5a7 |
%py2_install
|
|
|
862f5a7 |
%endif
|
|
|
862f5a7 |
|
|
|
862f5a7 |
%check
|
|
|
862f5a7 |
%if 0%{?with_python2}
|
|
|
1eb946f |
PYTHONPATH=build/lib/ py.test-2 || :
|
|
|
862f5a7 |
%endif
|
|
|
862f5a7 |
%if %{with python3}
|
|
|
1eb946f |
PYTHONPATH=build/lib/ py.test-3 || :
|
|
|
862f5a7 |
%endif
|
|
|
862f5a7 |
|
|
|
862f5a7 |
%if 0%{?with_python2}
|
|
|
862f5a7 |
%files -n python2-cli-helpers
|
|
|
862f5a7 |
%license LICENSE
|
|
|
862f5a7 |
%doc AUTHORS CHANGELOG README.rst
|
|
|
862f5a7 |
%{python2_sitelib}/%{pypi_name}
|
|
|
862f5a7 |
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
|
|
|
862f5a7 |
%endif
|
|
|
862f5a7 |
|
|
|
862f5a7 |
%if %{with python3}
|
|
|
862f5a7 |
%files -n python3-cli-helpers
|
|
|
862f5a7 |
%license LICENSE
|
|
|
862f5a7 |
%doc AUTHORS CHANGELOG README.rst
|
|
|
862f5a7 |
%{python3_sitelib}/%{pypi_name}
|
|
|
862f5a7 |
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
|
|
|
862f5a7 |
%endif
|
|
|
862f5a7 |
|
|
|
862f5a7 |
%changelog
|
|
|
1eb946f |
* Sun Aug 18 2019 Terje Rosten <terje.rosten@ntnu.no> - 1.2.1-1
|
|
|
1eb946f |
- 1.2.1
|
|
|
1eb946f |
|
|
|
748b3dd |
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-2
|
|
|
748b3dd |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
748b3dd |
|
|
|
8ba1b76 |
* Tue May 14 2019 Terje Rosten <terje.rosten@ntnu.no> - 1.2.0-1
|
|
|
8ba1b76 |
- 1.2.0
|
|
|
8ba1b76 |
|
|
|
7b33d62 |
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-5
|
|
|
7b33d62 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
7b33d62 |
|
|
|
d056f11 |
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-4
|
|
|
d056f11 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
d056f11 |
|
|
|
5f46f22 |
* Tue Jun 19 2018 Miro HronĨok <mhroncok@redhat.com> - 1.0.2-3
|
|
|
5f46f22 |
- Rebuilt for Python 3.7
|
|
|
5f46f22 |
|
|
|
8b54938 |
* Mon May 21 2018 Terje Rosten <terje.rosten@ntnu.no> - 1.0.2-2
|
|
|
8b54938 |
- Fix description, (rhzb#1580109), thanks to Dick Marinus!
|
|
|
8b54938 |
|
|
|
3a44ad7 |
* Sun Apr 08 2018 Terje Rosten <terje.rosten@ntnu.no> - 1.0.2-1
|
|
|
3a44ad7 |
- 1.0.2
|
|
|
3a44ad7 |
|
|
|
66f118f |
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-3
|
|
|
66f118f |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
66f118f |
|
|
|
46636d4 |
* Tue Jan 09 2018 Terje Rosten <terje.rosten@ntnu.no> - 1.0.1-2
|
|
|
46636d4 |
- Fix reqs.
|
|
|
46636d4 |
|
|
|
b03f20d |
* Thu Jan 04 2018 Terje Rosten <terje.rosten@ntnu.no> - 1.0.1-1
|
|
|
b03f20d |
- 1.0.1
|
|
|
b03f20d |
|
|
|
66986bf |
* Tue Oct 24 2017 Terje Rosten <terje.rosten@ntnu.no> - 1.0.0-1
|
|
|
66986bf |
- 1.0.0
|
|
|
66986bf |
|
|
|
862f5a7 |
* Wed Aug 16 2017 Terje Rosten <terje.rosten@ntnu.no> - 0.2.3-1
|
|
|
862f5a7 |
- 0.2.3
|
|
|
862f5a7 |
- Rename
|
|
|
862f5a7 |
- Use summary and desc macros
|
|
|
862f5a7 |
- Drop Python 2 sub package for now, backports.csv not available
|
|
|
862f5a7 |
- Add patch to remove Python 2 specific reqs into Python 3 package
|
|
|
862f5a7 |
|
|
|
862f5a7 |
* Mon Jun 26 2017 Terje Rosten <terje.rosten@ntnu.no> - 0.2.0-1
|
|
|
862f5a7 |
- 0.2.0
|
|
|
862f5a7 |
- Rename
|
|
|
862f5a7 |
|
|
|
862f5a7 |
* Mon May 15 2017 Terje Rosten <terje.rosten@ntnu.no> - 0.1.0-2
|
|
|
862f5a7 |
- Minor tweaks
|
|
|
862f5a7 |
|
|
|
862f5a7 |
* Sat May 13 2017 Dick Marinus <dick@mrns.nl> - 0.1.0-1
|
|
|
862f5a7 |
- Initial package
|