forked from pool/python-websocket-client
Accepting request 387867 from home:anubisg1:branches:devel:languages:python
created update alternatives. Please forward to factory and add into Staging:adi:36 so that SR #380661 can be finally unlocked OBS-URL: https://build.opensuse.org/request/show/387867 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-websocket-client?expand=0&rev=14
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 12 07:57:30 UTC 2016 - andrea@opensuse.org
|
||||
|
||||
- added update-alternatives to allow the python3 version to be installed
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 21 16:56:55 UTC 2015 - dmueller@suse.com
|
||||
|
||||
|
||||
@@ -37,6 +37,8 @@ BuildRequires: python-six
|
||||
Requires: %backports
|
||||
Requires: python
|
||||
Requires: python-six
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
||||
BuildRequires: python-argparse
|
||||
@@ -70,19 +72,36 @@ python setup.py build
|
||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
# Use the system certs
|
||||
rm %{buildroot}/%{python_sitelib}/websocket/cacert.pem
|
||||
# update alternatives
|
||||
mv %{buildroot}%{_bindir}/wsdump.py %{buildroot}%{_bindir}/wsdump.py-%{py_ver}
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||
touch %{buildroot}%{_sysconfdir}/alternatives/wsdump.py
|
||||
ln -sf %{_sysconfdir}/alternatives/wsdump.py %{buildroot}/%{_bindir}/wsdump.py
|
||||
|
||||
%check
|
||||
python websocket/tests/test_websocket.py
|
||||
|
||||
%post
|
||||
update-alternatives \
|
||||
--install %{_bindir}/wsdump.py wsdump.py %{_bindir}/wsdump.py-%{py_ver} 20
|
||||
|
||||
%postun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
update-alternatives --remove wsdump.py %{_bindir}/wsdump.py-%{py_ver}
|
||||
fi
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE README.rst
|
||||
%dir %{python_sitelib}/websocket
|
||||
%dir %{python_sitelib}/websocket_client-%{version}-py*.egg-info
|
||||
%{_bindir}/wsdump.py
|
||||
%{_bindir}/wsdump.py-%{py_ver}
|
||||
%exclude %{python_sitelib}/websocket/tests/
|
||||
%{python_sitelib}/websocket/*
|
||||
%{python_sitelib}/*egg-info/*
|
||||
%ghost %{_sysconfdir}/alternatives/wsdump.py
|
||||
|
||||
%files test
|
||||
%defattr(-,root,root,-)
|
||||
|
||||
Reference in New Issue
Block a user