Update to 0.29.0; Cleanups and fixes
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
This commit is contained in:
parent
aa4ca484f1
commit
0a308dc20a
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
/wheel-0.22.0.tar.gz
|
/wheel-0.22.0.tar.gz
|
||||||
/wheel-0.24.0.tar.gz
|
/wheel-0.24.0.tar.gz
|
||||||
/wheel-0.26.0.tar.gz
|
/wheel-0.26.0.tar.gz
|
||||||
|
/wheel-0.29.0.tar.gz
|
||||||
|
|||||||
@ -1,134 +1,96 @@
|
|||||||
%global pypi_name wheel
|
%global pypi_name wheel
|
||||||
%if 0%{?rhel} > 7 || 0%{?fedora} >= 16
|
|
||||||
%bcond_without python3
|
|
||||||
%else
|
|
||||||
%bcond_with python3
|
|
||||||
|
|
||||||
%if 0%{?rhel} < 7
|
|
||||||
%global rhel6 1
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Name: python-%{pypi_name}
|
Name: python-%{pypi_name}
|
||||||
Version: 0.26.0
|
Version: 0.29.0
|
||||||
Release: 3%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: A built-package format for Python
|
Summary: A built-package format for Python
|
||||||
|
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://bitbucket.org/pypa/wheel
|
URL: https://bitbucket.org/pypa/wheel
|
||||||
Source0: https://pypi.python.org/packages/source/w/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
|
Source0: https://files.pythonhosted.org/packages/source/%(n=%{pypi_name}; echo ${n:0:1})/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildRequires: python-devel
|
%global _description \
|
||||||
BuildRequires: python-setuptools
|
A built-package format for Python.\
|
||||||
|
\
|
||||||
|
A wheel is a ZIP-format archive with a specially formatted filename and the\
|
||||||
|
.whl extension. It is designed to contain all the files for a PEP 376\
|
||||||
|
compatible install in a way that is very close to the on-disk format.
|
||||||
|
|
||||||
BuildRequires: pytest
|
%description %{_description}
|
||||||
BuildRequires: python-jsonschema
|
|
||||||
|
%package -n python2-%{pypi_name}
|
||||||
|
Summary: %{summary}
|
||||||
|
BuildRequires: python2-devel
|
||||||
|
BuildRequires: python2-setuptools
|
||||||
|
BuildRequires: python2-pytest
|
||||||
|
BuildRequires: pyxdg
|
||||||
BuildRequires: python-keyring
|
BuildRequires: python-keyring
|
||||||
%if 0%{?rhel6}
|
BuildRequires: python-jsonschema
|
||||||
BuildRequires: python-argparse
|
|
||||||
Requires: python-argparse
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if %{with python3}
|
%description -n python2-%{pypi_name} %{_description}
|
||||||
|
|
||||||
|
Python 2 version.
|
||||||
|
|
||||||
|
%package -n python3-%{pypi_name}
|
||||||
|
Summary: %{summary}
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: python3-setuptools
|
||||||
BuildRequires: python3-pytest
|
BuildRequires: python3-pytest
|
||||||
|
BuildRequires: python3-pyxdg
|
||||||
BuildRequires: python3-keyring
|
BuildRequires: python3-keyring
|
||||||
BuildRequires: python3-jsonschema
|
BuildRequires: python3-jsonschema
|
||||||
%endif # if with_python3
|
|
||||||
|
|
||||||
|
%description -n python3-%{pypi_name} %{_description}
|
||||||
|
|
||||||
%description
|
Python 3 version.
|
||||||
A built-package format for Python.
|
|
||||||
|
|
||||||
A wheel is a ZIP-format archive with a specially formatted filename and the
|
|
||||||
.whl extension. It is designed to contain all the files for a PEP 376
|
|
||||||
compatible install in a way that is very close to the on-disk format.
|
|
||||||
|
|
||||||
%if 0%{with python3}
|
|
||||||
%package -n python3-%{pypi_name}
|
|
||||||
Summary: A built-package format for Python
|
|
||||||
|
|
||||||
%description -n python3-%{pypi_name}
|
|
||||||
A built-package format for Python.
|
|
||||||
|
|
||||||
A wheel is a ZIP-format archive with a specially formatted filename and the
|
|
||||||
.whl extension. It is designed to contain all the files for a PEP 376
|
|
||||||
compatible install in a way that is very close to the on-disk format.
|
|
||||||
|
|
||||||
This is package contains Python 3 version of the package.
|
|
||||||
%endif # with_python3
|
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{pypi_name}-%{version}
|
%autosetup -n %{pypi_name}-%{version}
|
||||||
|
|
||||||
# remove unneeded shebangs
|
# remove unneeded shebangs
|
||||||
sed -ie '1d' %{pypi_name}/{egg2wheel,wininst2wheel}.py
|
sed -ie '1d' %{pypi_name}/{egg2wheel,wininst2wheel}.py
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
rm -rf %{py3dir}
|
|
||||||
cp -a . %{py3dir}
|
|
||||||
%endif # with_python3
|
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__python} setup.py build
|
%py2_build
|
||||||
|
%py3_build
|
||||||
%if %{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
|
mv %{buildroot}%{_bindir}/%{pypi_name}{,-%{python2_version}}
|
||||||
# to be the default for now).
|
ln -s %{pypi_name}-%{python2_version} %{buildroot}%{_bindir}/%{pypi_name}-2
|
||||||
%if %{with python3}
|
%py3_install
|
||||||
pushd %{py3dir}
|
mv %{buildroot}%{_bindir}/%{pypi_name}{,-%{python3_version}}
|
||||||
%{__python3} setup.py install --skip-build --root %{buildroot}
|
ln -s %{pypi_name}-%{python3_version} %{buildroot}%{_bindir}/%{pypi_name}-3
|
||||||
popd
|
|
||||||
pushd %{buildroot}%{_bindir}
|
|
||||||
for f in $(ls); do mv $f python3-$f; done
|
|
||||||
popd
|
|
||||||
%endif # with_python3
|
|
||||||
|
|
||||||
%{__python} setup.py install --skip-build --root %{buildroot}
|
|
||||||
|
|
||||||
|
ln -s %{pypi_name}-2 %{buildroot}%{_bindir}/%{pypi_name}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
# remove setup.cfg that makes pytest require pytest-cov (unnecessary dep)
|
|
||||||
rm setup.cfg
|
rm setup.cfg
|
||||||
PYTHONPATH=$(pwd) py.test --ignore build %{?rhel6:-k 'not test_keygen'}
|
PYTHONPATH=%{buildroot}%{python2_sitelib} py.test-2 -v --ignore build
|
||||||
# no test for Python 3, no python3-jsonschema yet
|
PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-3 -v --ignore build
|
||||||
%if %{with python3}
|
|
||||||
pushd %{py3dir}
|
|
||||||
rm setup.cfg
|
|
||||||
PYTHONPATH=$(pwd) py.test-%{python3_version} --ignore build
|
|
||||||
popd
|
|
||||||
%endif # with_python3
|
|
||||||
|
|
||||||
|
%files -n python2-%{pypi_name}
|
||||||
%files
|
%license LICENSE.txt
|
||||||
%doc LICENSE.txt CHANGES.txt README.txt
|
%doc CHANGES.txt README.txt
|
||||||
%{_bindir}/wheel
|
%{_bindir}/%{pypi_name}
|
||||||
%{python_sitelib}/%{pypi_name}*
|
%{_bindir}/%{pypi_name}-2
|
||||||
%exclude %{python_sitelib}/%{pypi_name}/test
|
%{_bindir}/%{pypi_name}-%{python2_version}
|
||||||
%if %{with python3}
|
%{python2_sitelib}/%{pypi_name}*
|
||||||
|
%exclude %{python2_sitelib}/%{pypi_name}/test
|
||||||
|
|
||||||
%files -n python3-%{pypi_name}
|
%files -n python3-%{pypi_name}
|
||||||
%doc LICENSE.txt CHANGES.txt README.txt
|
%license LICENSE.txt
|
||||||
%{_bindir}/python3-wheel
|
%doc CHANGES.txt README.txt
|
||||||
|
%{_bindir}/%{pypi_name}-3
|
||||||
|
%{_bindir}/%{pypi_name}-%{python3_version}
|
||||||
%{python3_sitelib}/%{pypi_name}*
|
%{python3_sitelib}/%{pypi_name}*
|
||||||
%exclude %{python3_sitelib}/%{pypi_name}/test
|
%exclude %{python3_sitelib}/%{pypi_name}/test
|
||||||
%endif # with_python3
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Aug 10 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.29.0-1
|
||||||
|
- Update to 0.29.0
|
||||||
|
- Cleanups and fixes
|
||||||
|
|
||||||
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.26.0-3
|
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.26.0-3
|
||||||
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user