Update to 6.7; Adopt to packaging guidelines
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
This commit is contained in:
parent
b1f42e1935
commit
7be6fa8ae6
1
.gitignore
vendored
1
.gitignore
vendored
@ -13,3 +13,4 @@
|
||||
/click-6.2.tar.gz
|
||||
/click-6.3.tar.gz
|
||||
/click-6.6.tar.gz
|
||||
/click-6.7.tar.gz
|
||||
|
||||
@ -1,100 +1,80 @@
|
||||
# Created by pyp2rpm-1.0.1
|
||||
%global pypi_name click
|
||||
%global with_python3 1
|
||||
|
||||
Name: python-%{pypi_name}
|
||||
Version: 6.6
|
||||
Release: 4%{?dist}
|
||||
Summary: A simple wrapper around optparse for powerful command line utilities
|
||||
Version: 6.7
|
||||
Release: 1%{?dist}
|
||||
Summary: Simple wrapper around optparse for powerful command line utilities
|
||||
|
||||
License: BSD
|
||||
URL: http://github.com/mitsuhiko/click
|
||||
Source0: https://pypi.python.org/packages/source/c/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
|
||||
URL: https://github.com/mitsuhiko/click
|
||||
Source0: %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: pytest
|
||||
|
||||
%if %{?with_python3}
|
||||
%global _description \
|
||||
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.
|
||||
|
||||
%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-setuptools
|
||||
BuildRequires: python3-pytest
|
||||
%endif # if with_python3
|
||||
|
||||
%description -n python3-%{pypi_name} %{_description}
|
||||
|
||||
%description
|
||||
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
|
||||
|
||||
Python 3 version.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{pypi_name}-%{version}
|
||||
|
||||
%if 0%{?with_python3}
|
||||
rm -rf %{py3dir}
|
||||
cp -a . %{py3dir}
|
||||
|
||||
%endif # with_python3
|
||||
|
||||
%autosetup -n %{pypi_name}-%{version}
|
||||
|
||||
%build
|
||||
%{__python2} setup.py build
|
||||
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
%{__python3} setup.py build
|
||||
popd
|
||||
%endif # with_python3
|
||||
|
||||
%py2_build
|
||||
%py3_build
|
||||
|
||||
%install
|
||||
# Must do the subpackages' install first because the scripts in /usr/bin are
|
||||
# overwritten with every setup.py install (and we want the python2 version
|
||||
# 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}
|
||||
%py2_install
|
||||
%py3_install
|
||||
|
||||
%check
|
||||
PYTHONPATH=$(pwd) py.test-%{python2_version} tests --tb=long --verbose
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
LANG=en_GB.utf8 LC_ALL=en_GB.utf8 PYTHONPATH=$(pwd) py.test-%{python3_version} tests --tb=long --verbose
|
||||
popd
|
||||
%endif
|
||||
export PYTHONPATH=$(pwd)
|
||||
export LC_ALL=C.UTF-8
|
||||
py.test-%{python2_version} tests --tb=long --verbose
|
||||
py.test-%{python3_version} tests --tb=long --verbose
|
||||
|
||||
%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}
|
||||
%doc README
|
||||
%{python3_sitelib}/%{pypi_name}
|
||||
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
|
||||
%endif # with_python3
|
||||
|
||||
%license LICENSE
|
||||
%doc README CHANGES
|
||||
%{python3_sitelib}/%{pypi_name}-*.egg-info/
|
||||
%{python3_sitelib}/%{pypi_name}/
|
||||
|
||||
%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
|
||||
- Enable tests
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user