Update to 6.7; Adopt to packaging guidelines

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
This commit is contained in:
Igor Gnatenko 2017-01-07 08:57:19 +01:00
parent b1f42e1935
commit 7be6fa8ae6
3 changed files with 55 additions and 74 deletions

1
.gitignore vendored
View File

@ -13,3 +13,4 @@
/click-6.2.tar.gz /click-6.2.tar.gz
/click-6.3.tar.gz /click-6.3.tar.gz
/click-6.6.tar.gz /click-6.6.tar.gz
/click-6.7.tar.gz

View File

@ -1,100 +1,80 @@
# Created by pyp2rpm-1.0.1
%global pypi_name click %global pypi_name click
%global with_python3 1
Name: python-%{pypi_name} Name: python-%{pypi_name}
Version: 6.6 Version: 6.7
Release: 4%{?dist} Release: 1%{?dist}
Summary: A simple wrapper around optparse for powerful command line utilities Summary: Simple wrapper around optparse for powerful command line utilities
License: BSD License: BSD
URL: http://github.com/mitsuhiko/click URL: https://github.com/mitsuhiko/click
Source0: https://pypi.python.org/packages/source/c/%{pypi_name}/%{pypi_name}-%{version}.tar.gz Source0: %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch BuildArch: noarch
BuildRequires: python-devel %global _description \
BuildRequires: python-setuptools click is a Python package for creating beautiful command line\
BuildRequires: pytest interfaces in a composable way with as little amount of code as necessary.\
It's the "Command Line Interface Creation Kit". It's highly configurable but\
%if %{?with_python3} comes with good defaults out of the box.
%description %{_description}
%package -n python2-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python2-%{pypi_name}}
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python2-pytest
%description -n python2-%{pypi_name} %{_description}
Python 2 version.
%package -n python3-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python2-%{pypi_name}}
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: python3-setuptools BuildRequires: python3-setuptools
BuildRequires: python3-pytest BuildRequires: python3-pytest
%endif # if with_python3
%description -n python3-%{pypi_name} %{_description}
%description Python 3 version.
click is a Python package for creating beautiful command line
interfaces in a composable way with as little amount of code as necessary.
It's the "Command Line Interface Creation Kit". It's highly configurable but
comes with good defaults out of the box.
%if 0%{?with_python3}
%package -n python3-%{pypi_name}
Summary: A simple wrapper around optparse for powerful command line utilities
%description -n python3-%{pypi_name}
click is a Python 3 package for creating beautiful command line
interfaces in a composable way with as little amount of code as necessary.
It's the "Command Line Interface Creation Kit". It's highly configurable but
comes with good defaults out of the box.
%endif # with_python3
%prep %prep
%setup -q -n %{pypi_name}-%{version} %autosetup -n %{pypi_name}-%{version}
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif # with_python3
%build %build
%{__python2} setup.py build %py2_build
%py3_build
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif # with_python3
%install %install
# Must do the subpackages' install first because the scripts in /usr/bin are %py2_install
# overwritten with every setup.py install (and we want the python2 version %py3_install
# to be the default for now).
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install --skip-build --root %{buildroot}
popd
%endif # with_python3
%{__python2} setup.py install --skip-build --root %{buildroot}
%check %check
PYTHONPATH=$(pwd) py.test-%{python2_version} tests --tb=long --verbose export PYTHONPATH=$(pwd)
%if 0%{?with_python3} export LC_ALL=C.UTF-8
pushd %{py3dir} py.test-%{python2_version} tests --tb=long --verbose
LANG=en_GB.utf8 LC_ALL=en_GB.utf8 PYTHONPATH=$(pwd) py.test-%{python3_version} tests --tb=long --verbose py.test-%{python3_version} tests --tb=long --verbose
popd
%endif %files -n python2-%{pypi_name}
%license LICENSE
%doc README CHANGES
%{python2_sitelib}/%{pypi_name}-*.egg-info/
%{python2_sitelib}/%{pypi_name}/
%files
%doc README
%{python2_sitelib}/%{pypi_name}
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%if 0%{?with_python3}
%files -n python3-%{pypi_name} %files -n python3-%{pypi_name}
%doc README %license LICENSE
%{python3_sitelib}/%{pypi_name} %doc README CHANGES
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %{python3_sitelib}/%{pypi_name}-*.egg-info/
%endif # with_python3 %{python3_sitelib}/%{pypi_name}/
%changelog %changelog
* Sat Jan 07 2017 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 6.7-1
- Update to 6.7
- Adopt to packaging guidelines
* Tue Dec 13 2016 Charalampos Stratakis <cstratak@redhat.com> - 6.6-4 * Tue Dec 13 2016 Charalampos Stratakis <cstratak@redhat.com> - 6.6-4
- Enable tests - Enable tests

View File

@ -1 +1 @@
d0b09582123605220ad6977175f3e51d click-6.6.tar.gz SHA512 (click-6.7.tar.gz) = 0d582ec4ecf8e4cf9ce2b9eec9d150e047512e1ebdb709eb031599c8e4a9632121dbb809bc1cfe597dd0ba62a9b8a5663c6dfbe41d575a991d27bca6b26130db