Dirk Mueller
b60f7b237a
* #1042: Fix import in py27compat module that still referenced six directly, rather than through the externs module (vendored packages hook). * #980 and others: Once again, Setuptools vendors all of its dependencies. It seems to be the case that in the Python ecosystem, all build tools must run without any dependencies (build, runtime, or otherwise). At such a point that a mechanism exists that allows build tools to have dependencies, Setuptools will adopt it. * #1015: Fix test failures on Python 3.7. * #1024: Add workaround for Jython #2581 in monkey module. * #992: Revert change introduced in v34.4.1, now considered invalid. * #1016: Revert change introduced in v35.0.0 per #1014, referencing #436. The approach had unintended consequences, causing sdist installs to be missing files. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools?expand=0&rev=111
116 lines
3.6 KiB
RPMSpec
116 lines
3.6 KiB
RPMSpec
#
|
|
# spec file for package python-setuptools
|
|
#
|
|
# Copyright (c) 2017 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/
|
|
#
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
%define oldpython python
|
|
Name: python-setuptools
|
|
Version: 36.0.1
|
|
Release: 0
|
|
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}.zip
|
|
Source1: psfl.txt
|
|
Source2: zpl.txt
|
|
# NOTE(toabctl): Fix for SLE11SP3 test failures
|
|
Patch3: fix-sle11-test-failure.patch
|
|
BuildRequires: %{python_module appdirs}
|
|
BuildRequires: %{python_module devel}
|
|
BuildRequires: %{python_module packaging}
|
|
BuildRequires: %{python_module six}
|
|
BuildRequires: %{python_module xml}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
BuildRequires: unzip
|
|
# needed for SLE
|
|
Requires: python
|
|
Requires: python-appdirs
|
|
Requires: python-packaging
|
|
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
|
|
%ifpython2
|
|
Provides: %{oldpython}-distribute = %{version}
|
|
Obsoletes: %{oldpython}-distribute < %{version}
|
|
%endif
|
|
%if 0%{?suse_version} > 1110
|
|
BuildArch: noarch
|
|
%endif
|
|
|
|
%python_subpackages
|
|
|
|
%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}
|
|
%if 0%{?suse_version} && 0%{?suse_version} <= 1220
|
|
%patch3 -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@^#!/.*$@@' setuptools/command/easy_install.py
|
|
|
|
%build
|
|
%python_build
|
|
|
|
%install
|
|
%python_install
|
|
%prepare_alternative easy_install
|
|
%fdupes %{buildroot}%{_prefix}
|
|
|
|
# Can not run testsuite as this introduces build cycle
|
|
#%check
|
|
#export LANG="en_US.UTF-8"
|
|
#python setup.py ptr --addopts='-rxs'
|
|
|
|
%post
|
|
%python_install_alternative easy_install
|
|
|
|
%postun
|
|
%python_uninstall_alternative easy_install
|
|
|
|
%files %python_files
|
|
%defattr(-,root,root,-)
|
|
%doc CHANGES.rst README.rst
|
|
%python_alternative %{_bindir}/easy_install
|
|
%{python_sitelib}/setuptools
|
|
%{python_sitelib}/setuptools-%{version}-py%{python_version}.egg-info
|
|
%{python_sitelib}/easy_install.py*
|
|
%pycache_only %{python_sitelib}/__pycache__/easy_install.*
|
|
%dir %{python_sitelib}/pkg_resources
|
|
%{python_sitelib}/pkg_resources/*
|
|
|
|
%changelog
|