From 2a2b0f9d967f9ded4bfe3f035dfed45fe3c647122c56d82c4b6269fc87297b37 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Mon, 10 Feb 2014 14:45:13 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-wheel?expand=0&rev=8 --- python-wheel.spec | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/python-wheel.spec b/python-wheel.spec index a7814d2..9707d9f 100644 --- a/python-wheel.spec +++ b/python-wheel.spec @@ -1,7 +1,7 @@ # # spec file for package python-wheel # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -27,7 +27,6 @@ Source: https://pypi.python.org/packages/source/w/wheel/wheel-%{version} BuildRequires: python-devel BuildRequires: python-setuptools # Test requirements: -BuildRequires: python-argparse BuildRequires: python-cov-core >= 1.6 BuildRequires: python-coverage BuildRequires: python-jsonschema @@ -37,9 +36,10 @@ Recommends: python-ed25519ll Recommends: python-dirspec Recommends: python-keyring Requires(post): update-alternatives -Requires(postun): update-alternatives +Requires(preun): 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 @@ -76,9 +76,11 @@ python setup.py build %install python setup.py install --prefix=%{_prefix} --root=%{buildroot} +mkdir -p %{buildroot}%{_sysconfdir}/alternatives for b in egg2wheel wheel wininst2wheel ; do mv %{buildroot}%{_bindir}/$b %{buildroot}%{_bindir}/$b-%{py_ver} - ln -s %{_bindir}/$b-%{py_ver} %{buildroot}%{_bindir}/$b + touch %{buildroot}%{_sysconfdir}/alternatives/$b + ln -sf %{_sysconfdir}/alternatives/$b %{buildroot}/%{_bindir}/$b done %check @@ -97,12 +99,15 @@ fi %files %defattr(-,root,root,-) %doc CHANGES.txt README.txt LICENSE.txt -%ghost %{_bindir}/egg2wheel +%{_bindir}/egg2wheel %{_bindir}/egg2wheel-%{py_ver} -%ghost %{_bindir}/wheel +%{_bindir}/wheel %{_bindir}/wheel-%{py_ver} -%ghost %{_bindir}/wininst2wheel +%{_bindir}/wininst2wheel %{_bindir}/wininst2wheel-%{py_ver} +%ghost %{_sysconfdir}/alternatives/wheel +%ghost %{_sysconfdir}/alternatives/egg2wheel +%ghost %{_sysconfdir}/alternatives/wininst2wheel %{python_sitelib}/wheel-%{version}-py%{py_ver}.egg-info %{python_sitelib}/wheel/