2008-09-17 21:43:14 +02:00
|
|
|
#
|
2011-09-23 09:04:42 +02:00
|
|
|
# spec file for package python-setuptools
|
2008-09-17 21:43:14 +02:00
|
|
|
#
|
2013-06-25 11:01:42 +02:00
|
|
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2008-09-17 21:43:14 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
2013-07-18 12:09:01 +02:00
|
|
|
|
2008-09-17 21:43:14 +02:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2009-07-30 18:02:49 +02:00
|
|
|
|
2013-06-25 11:01:42 +02:00
|
|
|
Name: python-setuptools
|
2013-10-11 10:44:30 +02:00
|
|
|
Version: 1.1.6
|
2011-09-23 09:04:42 +02:00
|
|
|
Release: 0
|
|
|
|
Url: http://pypi.python.org/pypi/setuptools
|
2013-06-25 11:01:42 +02:00
|
|
|
Summary: Easily download, build, install, upgrade, and uninstall Python packages
|
|
|
|
License: Python-2.0 or ZPL-2.0
|
2011-09-23 09:04:42 +02:00
|
|
|
Group: Development/Languages/Python
|
2013-06-25 11:01:42 +02:00
|
|
|
Source: https://pypi.python.org/packages/source/s/setuptools/setuptools-%{version}.tar.gz
|
2008-09-17 21:43:14 +02:00
|
|
|
Source1: psfl.txt
|
|
|
|
Source2: zpl.txt
|
2009-11-04 18:59:19 +01:00
|
|
|
Patch1: setuptools-0.6c9-create-sitedir.patch
|
2008-09-17 21:43:14 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2011-09-23 09:04:42 +02:00
|
|
|
BuildRequires: python-devel
|
2013-08-18 15:12:27 +02:00
|
|
|
# needed for SLE
|
|
|
|
Requires: python
|
2013-07-18 12:09:01 +02:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
2013-06-25 11:01:42 +02:00
|
|
|
# NOTE(saschpe): Distribute was merged into 0.7.x, so even though distribute
|
|
|
|
# obsoletes setuptools < 0.6.45, current setuptools obsoletes distribute again
|
2013-10-24 13:14:14 +02:00
|
|
|
Provides: python-setuptools = %{version}
|
|
|
|
Obsoletes: python-setuptools < %{version}
|
2013-06-25 11:01:42 +02:00
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
|
|
|
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
|
|
%else
|
2011-09-23 09:04:42 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
%endif
|
2006-10-27 14:17:57 +02:00
|
|
|
|
|
|
|
%description
|
2008-09-17 21:43:14 +02:00
|
|
|
setuptools is a collection of enhancements to the Python distutils that
|
|
|
|
allow you to more easily build and distribute Python packages,
|
|
|
|
especially ones that have dependencies on other packages.
|
|
|
|
|
2006-10-27 14:17:57 +02:00
|
|
|
%prep
|
2013-06-25 11:01:42 +02:00
|
|
|
%setup -q -n setuptools-%{version}
|
2009-11-04 18:59:19 +01:00
|
|
|
%patch1
|
2013-06-25 11:01:42 +02:00
|
|
|
find . -type f -name "*.orig" -delete
|
2006-10-27 14:17:57 +02:00
|
|
|
|
|
|
|
%build
|
2013-06-25 11:01:42 +02:00
|
|
|
python setup.py build
|
2006-10-27 14:17:57 +02:00
|
|
|
|
|
|
|
%install
|
2013-06-25 11:01:42 +02:00
|
|
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
2013-07-18 12:09:01 +02:00
|
|
|
rm %{buildroot}%{_bindir}/easy_install
|
|
|
|
ln -s %{_bindir}/easy_install-%{py_ver} %{buildroot}%{_bindir}/easy_install
|
2007-06-13 10:31:39 +02:00
|
|
|
|
2013-06-25 11:01:42 +02:00
|
|
|
%check
|
|
|
|
python setup.py test
|
2007-06-13 10:31:39 +02:00
|
|
|
|
2013-07-18 12:09:01 +02:00
|
|
|
%pre
|
|
|
|
# Since /usr/bin/easy_install became ghosted to be used with update-alternatives,
|
|
|
|
# we have to get rid of the old binary:
|
|
|
|
[[ ! -L %{_bindir}/easy_install ]] && rm -f %{_bindir}/easy_install
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
%post
|
|
|
|
update-alternatives \
|
|
|
|
--install %{_bindir}/easy_install easy_install %{_bindir}/easy_install-%{py_ver} 20
|
|
|
|
|
|
|
|
%preun
|
|
|
|
if [ $1 -eq 0 ] ; then
|
|
|
|
update-alternatives --remove easy_install %{_bindir}/easy_install-%{py_ver}
|
|
|
|
fi
|
|
|
|
|
2013-06-25 11:01:42 +02:00
|
|
|
%files
|
2008-09-17 21:43:14 +02:00
|
|
|
%defattr(-,root,root,-)
|
2013-06-25 11:01:42 +02:00
|
|
|
%doc CHANGES.txt README.txt
|
2013-07-18 12:09:01 +02:00
|
|
|
%ghost %{_bindir}/easy_install
|
2013-06-25 11:01:42 +02:00
|
|
|
%{_bindir}/easy_install-%{py_ver}
|
|
|
|
%{python_sitelib}/_markerlib
|
|
|
|
%{python_sitelib}/setuptools
|
|
|
|
%{python_sitelib}/setuptools-%{version}-py%{py_ver}.egg-info
|
2011-09-23 09:04:42 +02:00
|
|
|
%python_sitelib/easy_install.py*
|
|
|
|
%python_sitelib/pkg_resources.py*
|
2006-10-27 14:17:57 +02:00
|
|
|
|
|
|
|
%changelog
|