forked from pool/python-pyflakes
Accepting request 482211 from devel:languages:python:singlespec
singlespec OBS-URL: https://build.opensuse.org/request/show/482211 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyflakes?expand=0&rev=35
This commit is contained in:
parent
4d33659fbc
commit
f71e99cde1
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 20 14:19:34 UTC 2017 - jmatejek@suse.com
|
||||
|
||||
- update for singlespec
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 15 08:46:26 UTC 2017 - kkaempf@suse.com
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-pyflakes
|
||||
Version: 1.5.0
|
||||
Release: 0
|
||||
@ -25,17 +26,15 @@ License: MIT
|
||||
Group: Development/Languages/Python
|
||||
Source: pyflakes-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: python-rpm-macros
|
||||
# the pkg_resources module is required at runtime
|
||||
Requires: python-setuptools
|
||||
Requires(post): update-alternatives
|
||||
Requires(preun): update-alternatives
|
||||
%if 0%{?suse_version} <= 1110
|
||||
%{!?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
|
||||
Pyflakes is program to analyze Python programs and detect various errors. It
|
||||
@ -46,31 +45,22 @@ modules with side effects. It's also much faster.
|
||||
%setup -q -n pyflakes-%{version}
|
||||
|
||||
%build
|
||||
python setup.py build
|
||||
%python_build
|
||||
|
||||
%install
|
||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
|
||||
# Prepare for update-alternatives usage
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||
mv %{buildroot}%{_bindir}/pyflakes %{buildroot}%{_bindir}/pyflakes-%{py_ver}
|
||||
ln -s -f %{_sysconfdir}/alternatives/pyflakes %{buildroot}%{_bindir}/pyflakes
|
||||
%python_install
|
||||
%python_clone -a %{buildroot}%{_bindir}/pyflakes
|
||||
|
||||
%post
|
||||
%_sbindir/update-alternatives \
|
||||
--install %{_bindir}/pyflakes pyflakes %{_bindir}/pyflakes-%{py_ver} 30
|
||||
%python_install_alternative pyflakes
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
%_sbindir/update-alternatives --remove pyflakes %{_bindir}/pyflakes-%{py_ver}
|
||||
fi
|
||||
%python_uninstall_alternative pyflakes
|
||||
|
||||
%files
|
||||
%files %{python_files}
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE NEWS.txt README.rst AUTHORS
|
||||
%{_bindir}/pyflakes
|
||||
%{_bindir}/pyflakes-%{py_ver}
|
||||
%ghost %{_sysconfdir}/alternatives/pyflakes
|
||||
%python_alternative %{_bindir}/pyflakes
|
||||
%{python_sitelib}/pyflakes/
|
||||
%{python_sitelib}/pyflakes-%{version}-py*.egg-info
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user