SHA256
1
0
forked from pool/python-wheel

Accepting request 511586 from home:sebix:branches:devel:languages:python

- convert to singlespec

OBS-URL: https://build.opensuse.org/request/show/511586
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-wheel?expand=0&rev=20
This commit is contained in:
Todd R 2017-07-27 15:15:19 +00:00 committed by Git OBS Bridge
parent c4f06d5c7e
commit eace59e9c6
2 changed files with 45 additions and 44 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Jul 20 08:20:17 UTC 2017 - sebix+novell.com@sebix.at
- convert to singlespec
-------------------------------------------------------------------
Mon May 9 22:31:35 UTC 2016 - hpj@urpla.net

View File

@ -1,7 +1,7 @@
#
# spec file for package python-wheel
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,6 +16,8 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%{!?license: %global license %doc}
Name: python-wheel
Version: 0.29.0
Release: 0
@ -23,33 +25,31 @@ Summary: A built-package format for Python
License: MIT
Group: Development/Languages/Python
Url: http://bitbucket.org/pypa/wheel/
Source: https://pypi.python.org/packages/source/w/wheel/wheel-%{version}.tar.gz
BuildRequires: python-devel
BuildRequires: python-setuptools
# Test requirements:
BuildRequires: python-cov-core >= 1.6
BuildRequires: python-coverage
BuildRequires: python-jsonschema
BuildRequires: python-keyring
BuildRequires: python-keyrings.alt
BuildRequires: python-pytest
BuildRequires: python-pytest-cov
BuildRequires: python-pyxdg
Recommends: python-ed25519ll
Source: https://files.pythonhosted.org/packages/source/w/wheel/wheel-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
# SECTION test
BuildRequires: %{python_module cov-core >= 1.6}
BuildRequires: %{python_module coverage}
BuildRequires: %{python_module jsonschema}
# Not compatible currently, see https://github.com/jaraco/keyrings.alt/issues/20
#BuildRequires: %%{python_module keyrings.alt}
BuildRequires: %{python_module keyring}
BuildRequires: %{python_module pytest-cov}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module pyxdg}
# /SECTION
Requires(post): update-alternatives
Requires(postun): update-alternatives
Recommends: python-dirspec
Recommends: python-ed25519ll
Recommends: python-keyring
Recommends: python-keyrings.alt
Recommends: python-pyxdg
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
BuildRequires: python-argparse
Requires: python-argparse
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch: noarch
%endif
%{python_subpackages}
%description
A built-package format for Python.
@ -75,38 +75,34 @@ The reference implementation is at http://bitbucket.org/dholth/wheel/
%prep
%setup -q -n wheel-%{version}
sed -i '1s/^#!.*//' wheel/wininst2wheel.py wheel/egg2wheel.py
%build
python setup.py build
%{python_build}
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
for b in wheel ; do
mv %{buildroot}%{_bindir}/$b %{buildroot}%{_bindir}/$b-%{py_ver}
touch %{buildroot}%{_sysconfdir}/alternatives/$b
ln -sf %{_sysconfdir}/alternatives/$b %{buildroot}/%{_bindir}/$b
done
%{python_install}
%python_clone -a %{buildroot}%{_bindir}/wheel
%check
PYTHONPATH=%{buildroot}%{python_sitelib} py.test
rm -rf %{buildroot}%{python_sitelib}/wheel/test/headers.dist
# Requires keyrings.alt
rm wheel/test/test_tool.py
%{python_expand rm -rf _build.python2 _build.python3
PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_version}
rm -rf %{buildroot}%{$python_sitelib}/wheel/test/headers.dist
}
%post
update-alternatives --install %{_bindir}/wheel wheel %{_bindir}/wheel-%{py_ver} 20
%python_install_alternative wheel
%postun
if [ $1 -eq 0 ] ; then
update-alternatives --remove wheel %{_bindir}/wheel-%{py_ver}
fi
%python_uninstall_alternative wheel
%files
%defattr(-,root,root,-)
%doc CHANGES.txt README.txt LICENSE.txt
%{_bindir}/wheel
%{_bindir}/wheel-%{py_ver}
%ghost %{_sysconfdir}/alternatives/wheel
%{python_sitelib}/wheel-%{version}-py%{py_ver}.egg-info
%files %{python_files}
%doc CHANGES.txt README.txt
%license LICENSE.txt
%python_alternative %{_bindir}/wheel
%{python_sitelib}/wheel-%{version}-py%{python_version}.egg-info
%{python_sitelib}/wheel/
%changelog