Blame SPECS/python-click.spec

092fd0
%global pypi_name click
092fd0
092fd0
%if 0%{?rhel} > 7
092fd0
# Disable python2 build by default
092fd0
%bcond_with python2
092fd0
%else
092fd0
%bcond_without python2
092fd0
%endif
092fd0
092fd0
Name:           python-%{pypi_name}
092fd0
Version:        6.7
092fd0
Release:        8%{?dist}
092fd0
Summary:        Simple wrapper around optparse for powerful command line utilities
092fd0
092fd0
License:        BSD
092fd0
URL:            https://github.com/mitsuhiko/click
092fd0
Source0:        %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz
092fd0
# https://bugzilla.redhat.com/show_bug.cgi?id=1500962
092fd0
# https://github.com/pallets/click/pull/838
092fd0
Patch0:         0001-Remove-outdated-comment-about-Click-3.0.patch
092fd0
Patch1:         0002-Add-pytest-option-to-not-capture-warnings.patch
092fd0
Patch2:         0003-Catch-and-test-pytest-warning.patch
092fd0
092fd0
BuildArch:      noarch
092fd0
092fd0
%global _description \
092fd0
click is a Python package for creating beautiful command line\
092fd0
interfaces in a composable way with as little amount of code as necessary.\
092fd0
It's the "Command Line Interface Creation Kit".  It's highly configurable but\
092fd0
comes with good defaults out of the box.
092fd0
092fd0
%description %{_description}
092fd0
092fd0
%if %{with python2}
092fd0
%package -n     python2-%{pypi_name}
092fd0
Summary:        %{summary}
092fd0
%{?python_provide:%python_provide python2-%{pypi_name}}
092fd0
BuildRequires:  python2-devel
092fd0
%if ! (0%{?rhel} && 0%{?rhel} <= 7)
092fd0
BuildRequires:  python2-setuptools
092fd0
# pytest in base RHEL is too old, we'll skip the tests there
092fd0
BuildRequires:  python2-pytest >= 2.8
092fd0
%else
092fd0
BuildRequires:  python-setuptools
092fd0
%endif
092fd0
092fd0
%description -n python2-%{pypi_name} %{_description}
092fd0
092fd0
Python 2 version.
092fd0
%endif # with python2
092fd0
092fd0
%package -n     python%{python3_pkgversion}-%{pypi_name}
092fd0
Summary:        %{summary}
092fd0
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
092fd0
BuildRequires:  python%{python3_pkgversion}-devel
092fd0
BuildRequires:  python%{python3_pkgversion}-setuptools
092fd0
BuildRequires:  python%{python3_pkgversion}-pytest >= 2.8
092fd0
092fd0
%description -n python%{python3_pkgversion}-%{pypi_name} %{_description}
092fd0
092fd0
Python 3 version.
092fd0
092fd0
%prep
092fd0
%autosetup -n %{pypi_name}-%{version} -p1
092fd0
092fd0
%build
092fd0
%if %{with python2}
092fd0
%py2_build
092fd0
%endif # with python2
092fd0
%py3_build
092fd0
092fd0
%install
092fd0
%if %{with python2}
092fd0
%py2_install
092fd0
%endif # with python2
092fd0
%py3_install
092fd0
092fd0
%check
092fd0
export PYTHONPATH=$(pwd)
092fd0
export LC_ALL=en_US.UTF-8
092fd0
%if %{with python2}
092fd0
%if ! (0%{?rhel} && 0%{?rhel} <= 7)
092fd0
# pytest in base RHEL is too old, we'll skip the tests there
092fd0
py.test-%{python2_version} tests --tb=long --verbose
092fd0
%endif
092fd0
%endif # with python2
092fd0
py.test-%{python3_version} tests --tb=long --verbose
092fd0
092fd0
%if %{with python2}
092fd0
%files -n python2-%{pypi_name}
092fd0
%license LICENSE
092fd0
%doc README CHANGES
092fd0
%{python2_sitelib}/%{pypi_name}-*.egg-info/
092fd0
%{python2_sitelib}/%{pypi_name}/
092fd0
%endif # with python2
092fd0
092fd0
%files -n python%{python3_pkgversion}-%{pypi_name}
092fd0
%license LICENSE
092fd0
%doc README CHANGES
092fd0
%{python3_sitelib}/%{pypi_name}-*.egg-info/
092fd0
%{python3_sitelib}/%{pypi_name}/
092fd0
092fd0
%changelog
092fd0
* Fri Jun 22 2018 Charalampos Stratakis <cstratak@redhat.com> - 6.7-8
092fd0
- Conditionalize the python2 subpackage
092fd0
092fd0
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.7-7
092fd0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
092fd0
092fd0
* Thu Oct 12 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 6.7-6
092fd0
- Fixup EPEL packaging
092fd0
092fd0
* Thu Oct 12 2017 Carl George <carl@george.computer> - 6.7-6
092fd0
- Add EPEL compatibility
092fd0
092fd0
* Thu Oct 12 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 6.7-5
092fd0
- Fix FTBFS
092fd0
092fd0
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 6.7-4
092fd0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
092fd0
092fd0
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 6.7-3
092fd0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
092fd0
092fd0
* Mon Jan 09 2017 Miro HronĨok <mhroncok@redhat.com> - 6.7-2
092fd0
- Fixed a copy-paste bug in %%python_provide (rhbz#1411169)
092fd0
092fd0
* Sat Jan 07 2017 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 6.7-1
092fd0
- Update to 6.7
092fd0
- Adopt to packaging guidelines
092fd0
092fd0
* Tue Dec 13 2016 Charalampos Stratakis <cstratak@redhat.com> - 6.6-4
092fd0
- Enable tests
092fd0
092fd0
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 6.6-3
092fd0
- Rebuild for Python 3.6
092fd0
- Disable python3 tests for now
092fd0
092fd0
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.6-2
092fd0
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
092fd0
092fd0
* Mon Apr 18 2016 Charalampos Stratakis <cstratak@redhat.com> - 6.6-1
092fd0
- Update to 6.6
092fd0
- Removed non-applied patch file.
092fd0
092fd0
* Tue Mar 08 2016 Robert Kuska <rkuska@redhat.com> - 6.3-1
092fd0
- Update to 6.3
092fd0
092fd0
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 6.2-2
092fd0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
092fd0
092fd0
* Tue Jan 19 2016 Robert Kuska <rkuska@redhat.com> - 6.2-1
092fd0
- Update to 6.2
092fd0
092fd0
* Wed Oct 14 2015 Robert Kuska <rkuska@redhat.com> - 5.1-2
092fd0
- Rebuilt for Python3.5 rebuild
092fd0
092fd0
* Mon Aug 24 2015 Robert Kuska <rkuska@redhat.com> - 5.1-1
092fd0
- Update to 5.1
092fd0
092fd0
* Mon Aug 03 2015 Robert Kuska <rkuska@redhat.com> - 4.1-1
092fd0
- Update to 4.1
092fd0
092fd0
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-3
092fd0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
092fd0
092fd0
* Sun May 31 2015 Robert Kuska <rkuska@redhat.com> - 4.0-2
092fd0
- Rebuilt
092fd0
092fd0
* Wed Apr 01 2015 Robert Kuska <rkuska@redhat.com> - 4.0-1
092fd0
- Update to 4.0
092fd0
092fd0
* Fri Oct 03 2014 Robert Kuska <rkuska@redhat.com> - 3.3-1
092fd0
- Update to 3.3
092fd0
092fd0
* Sun Aug 24 2014 Robert Kuska <rkuska@redhat.com> - 3.2-2
092fd0
- Add patch for exception check of TypeError
092fd0
092fd0
* Sun Aug 24 2014 Robert Kuska <rkuska@redhat.com> - 3.2-1
092fd0
- Update to 3.2
092fd0
092fd0
* Mon Aug 18 2014 Robert Kuska <rkuska@redhat.com> - 3.1-1
092fd0
- Update to 3.1
092fd0
092fd0
* Wed Jul 16 2014 Robert Kuska <rkuska@redhat.com> - 2.4-1
092fd0
- Update to 2.4
092fd0
092fd0
* Mon Jun 30 2014 Robert Kuska <rkuska@redhat.com> - 2.2-1
092fd0
- Update to 2.2
092fd0
092fd0
* Thu Jun 12 2014 Robert Kuska <rkuska@redhat.com> - 2.0-1
092fd0
- Update to 2.0
092fd0
092fd0
* Fri Jun 06 2014 Robert Kuska <rkuska@redhat.com> - 1.1-3
092fd0
- Make click own its folder
092fd0
- Use pythonX_version macros from devel package
092fd0
092fd0
* Thu May 29 2014 Robert Kuska <rkuska@redhat.com> - 1.1-2
092fd0
- Remove __pycache__ folder from tests
092fd0
092fd0
* Mon May 12 2014 Robert Kuska <rkuska@redhat.com> - 1.1-1
092fd0
- Update source
092fd0
092fd0
* Wed May 07 2014 Robert Kuska <rkuska@redhat.com> - 0.6-1
092fd0
- Initial package.