python-setuptools/python-setuptools.spec
Dirk Mueller a4c85ff7e8 Accepting request 433921 from home:tbechtold:branches:devel:languages:python
- update to 28.3.0:
  * #809: In ``find_packages()``, restore support for excluding
    a parent package without excluding a child package.
  * #805: Disable ``-nspkg.pth`` behavior on Python 3.3+ where
    PEP-420 functionality is adequate. Fixes pip #1924.
  * #803: Bump certifi to 2016.9.26.
  * #733: Do not search excluded directories for packages.
    This introduced a backwards incompatible change in ``find_packages()``
    so that ``find_packages(exclude=['foo']) == []``, excluding subpackages of ``foo``.
    Previously, ``find_packages(exclude=['foo']) == ['foo.bar']``,
    even though the parent ``foo`` package was excluded.
  * #795: Bump certifi.
  * #719: Suppress decoding errors and instead log a warning
    when metadata cannot be decoded.
  * #790: In MSVC monkeypatching, explicitly patch each
    function by name in the target module instead of inferring
    the module from the function's ``__module__``. Improves
    compatibility with other packages that might have previously
    patched distutils functions (i.e. NumPy).
  * #794: In test command, add installed eggs to PYTHONPATH
    when invoking tests so that subprocesses will also have the
    dependencies available. Fixes `tox 330
    <https://github.com/tox-dev/tox/issues/330>`_.
  * #795: Update vendored pyparsing 2.1.9.
  * #520 and #513: Suppress ValueErrors in fixup_namespace_packages
    when lookup fails.
  * Nicer, more consistent interfaces for msvc monkeypatching.
  * #779 via #781: Fix circular import.
  * #778: Fix MSVC monkeypatching.
  * Introduce the (private) ``monkey`` module to encapsulate

OBS-URL: https://build.opensuse.org/request/show/433921
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools?expand=0&rev=102
2016-10-10 11:54:14 +00:00

116 lines
4.0 KiB
RPMSpec

#
# spec file for package python-setuptools
#
# Copyright (c) 2016 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
# 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: python-setuptools
Version: 28.3.0
Release: 0
Url: http://pypi.python.org/pypi/setuptools
Summary: Easily download, build, install, upgrade, and uninstall Python packages
License: Python-2.0 or ZPL-2.0
Group: Development/Languages/Python
Source: https://pypi.io/packages/source/s/setuptools/setuptools-%{version}.tar.gz
Source1: psfl.txt
Source2: zpl.txt
Patch1: setuptools-5.4.1-create-sitedir.patch
# NOTE(toabctl): Fix for SLE11SP3 test failures
Patch3: fix-sle11-test-failure.patch
# PATCH-FIX-UPSTREAM better handling of certificate store in SUSE
Patch4: setuptools-certpath.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel
BuildRequires: python-xml
# needed for SLE
Requires: python
Requires: python-six
Requires: python-xml
Recommends: ca-certificates-mozilla
Requires(post): update-alternatives
Requires(postun): update-alternatives
# NOTE(saschpe): Distribute was merged into 0.7.x, so even though distribute
# obsoletes setuptools < 0.6.45, current setuptools obsoletes distribute again
Provides: python-distribute = %{version}
Obsoletes: python-distribute < %{version}
%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
BuildArch: noarch
%endif
%description
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.
%prep
%setup -q -n setuptools-%{version}
%patch1 -p1
%if 0%{?suse_version} && 0%{?suse_version} <= 1220
%patch3 -p1
%patch4 -p1
%endif
find . -type f -name "*.orig" -delete
# fix rpmlint spurious-executable-perm
chmod -x README.rst
# strip shebangs to fix rpmlint warnings
# "explain the sed":
# 1 = first line only
# s@...@...@ = same as s/.../.../ except with @ instead of /
# ^ = start; #!/ = shebang leading characters; .* = rest of line; $ = end
# replace with nothing
sed -r -i '1s@^#!/.*$@@' pkg_resources/_vendor/appdirs.py setuptools/command/easy_install.py
%build
python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
rm %{buildroot}%{_bindir}/easy_install
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
touch %{buildroot}%{_sysconfdir}/alternatives/easy_install
ln -sf %{_sysconfdir}/alternatives/easy_install %{buildroot}/%{_bindir}/easy_install
# Can not run testsuite as this introduces build cycle
#%check
#export LANG="en_US.UTF-8"
#python setup.py ptr --addopts='-rxs'
%post
update-alternatives \
--install %{_bindir}/easy_install easy_install %{_bindir}/easy_install-%{py_ver} 20
%postun
if [ $1 -eq 0 ] ; then
update-alternatives --remove easy_install %{_bindir}/easy_install-%{py_ver}
fi
%files
%defattr(-,root,root,-)
%doc CHANGES.rst README.rst
%{_bindir}/easy_install
%{_bindir}/easy_install-%{py_ver}
%ghost %{_sysconfdir}/alternatives/easy_install
%{python_sitelib}/setuptools
%{python_sitelib}/setuptools-%{version}-py%{py_ver}.egg-info
%{python_sitelib}/easy_install.py*
%dir %{python_sitelib}/pkg_resources
%{python_sitelib}/pkg_resources/*
%changelog