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
|
|
|
#
|
2019-01-17 20:12:34 +01:00
|
|
|
# Copyright (c) 2019 SUSE LINUX 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
|
|
|
|
2018-10-01 09:05:28 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2008-09-17 21:43:14 +02:00
|
|
|
#
|
|
|
|
|
2009-07-30 18:02:49 +02:00
|
|
|
|
2017-02-24 15:33:59 +01:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2017-02-23 14:35:50 +01:00
|
|
|
%define oldpython python
|
2019-08-21 15:08:44 +02:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "test"
|
|
|
|
%define psuffix -test
|
|
|
|
%bcond_without test
|
|
|
|
%else
|
|
|
|
%define psuffix %{nil}
|
|
|
|
%bcond_with test
|
|
|
|
%endif
|
|
|
|
Name: python-setuptools%{psuffix}
|
2019-08-21 14:18:57 +02:00
|
|
|
Version: 41.2.0
|
2011-09-23 09:04:42 +02:00
|
|
|
Release: 0
|
2018-08-25 22:09:10 +02:00
|
|
|
Summary: Enhancements to distutils for building and distributing Python packages
|
2017-11-27 10:57:16 +01:00
|
|
|
License: Python-2.0 OR ZPL-2.0
|
2011-09-23 09:04:42 +02:00
|
|
|
Group: Development/Languages/Python
|
2018-05-07 15:48:53 +02:00
|
|
|
URL: https://github.com/pypa/setuptools
|
2017-11-27 10:57:16 +01:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/s/setuptools/setuptools-%{version}.zip
|
2008-09-17 21:43:14 +02:00
|
|
|
Source1: psfl.txt
|
|
|
|
Source2: zpl.txt
|
2017-02-23 14:35:50 +01:00
|
|
|
BuildRequires: %{python_module appdirs}
|
|
|
|
BuildRequires: %{python_module packaging}
|
|
|
|
BuildRequires: %{python_module six}
|
2017-02-17 16:46:38 +01:00
|
|
|
BuildRequires: %{python_module xml}
|
2017-02-23 14:35:50 +01:00
|
|
|
BuildRequires: fdupes
|
2017-02-17 16:46:38 +01:00
|
|
|
BuildRequires: python-rpm-macros
|
2017-02-23 14:35:50 +01:00
|
|
|
BuildRequires: unzip
|
2013-08-18 15:12:27 +02:00
|
|
|
# needed for SLE
|
|
|
|
Requires: python
|
2017-02-23 14:35:50 +01:00
|
|
|
Requires: python-appdirs
|
|
|
|
Requires: python-packaging
|
2016-02-01 13:01:25 +01:00
|
|
|
Requires: python-six
|
2016-03-09 17:22:46 +01:00
|
|
|
Requires: python-xml
|
2013-07-18 12:09:01 +02:00
|
|
|
Requires(post): update-alternatives
|
2014-02-10 16:34:07 +01:00
|
|
|
Requires(postun): update-alternatives
|
2018-03-19 11:57:18 +01:00
|
|
|
BuildArch: noarch
|
2019-08-21 15:08:44 +02:00
|
|
|
%if %{with test}
|
|
|
|
BuildRequires: %{python_module Paver}
|
|
|
|
BuildRequires: %{python_module devel}
|
|
|
|
BuildRequires: %{python_module mock}
|
|
|
|
BuildRequires: %{python_module pip}
|
|
|
|
BuildRequires: %{python_module pyparsing >= 2.0.2}
|
|
|
|
BuildRequires: %{python_module pytest-fixture-config}
|
|
|
|
BuildRequires: %{python_module pytest-virtualenv}
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
BuildRequires: %{python_module setuptools >= %{version}}
|
|
|
|
BuildRequires: %{python_module wheel}
|
|
|
|
BuildRequires: python-futures
|
|
|
|
%else
|
|
|
|
#!BuildIgnore: python-pyparsing
|
|
|
|
#!BuildIgnore: python2-pyparsing
|
|
|
|
#!BuildIgnore: python3-pyparsing
|
|
|
|
%endif
|
2018-03-19 11:57:18 +01:00
|
|
|
%if 0%{?suse_version} || 0%{?fedora_version} >= 24
|
2017-11-27 10:57:16 +01:00
|
|
|
Recommends: ca-certificates-mozilla
|
2018-02-27 17:52:49 +01:00
|
|
|
%endif
|
2017-02-23 14:35:50 +01:00
|
|
|
%ifpython2
|
|
|
|
Provides: %{oldpython}-distribute = %{version}
|
|
|
|
Obsoletes: %{oldpython}-distribute < %{version}
|
|
|
|
%endif
|
2017-02-17 16:46:38 +01:00
|
|
|
%python_subpackages
|
|
|
|
|
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
|
2017-11-17 17:46:23 +01:00
|
|
|
allow you to build and distribute Python packages,
|
2008-09-17 21:43:14 +02:00
|
|
|
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}
|
|
|
|
find . -type f -name "*.orig" -delete
|
2006-10-27 14:17:57 +02:00
|
|
|
|
2016-08-31 17:37:24 +02:00
|
|
|
# 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
|
2017-02-23 14:35:50 +01:00
|
|
|
sed -r -i '1s@^#!/.*$@@' setuptools/command/easy_install.py
|
2016-08-31 17:37:24 +02:00
|
|
|
|
2006-10-27 14:17:57 +02:00
|
|
|
%build
|
2017-02-17 16:46:38 +01:00
|
|
|
%python_build
|
2006-10-27 14:17:57 +02:00
|
|
|
|
|
|
|
%install
|
2019-08-21 15:08:44 +02:00
|
|
|
%if !%{with test}
|
2017-02-17 16:46:38 +01:00
|
|
|
%python_install
|
|
|
|
%prepare_alternative easy_install
|
2018-12-06 13:04:15 +01:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2019-08-21 15:08:44 +02:00
|
|
|
%endif
|
2007-06-13 10:31:39 +02:00
|
|
|
|
2019-08-21 15:08:44 +02:00
|
|
|
%check
|
|
|
|
%if %{with test}
|
2019-09-16 11:18:31 +02:00
|
|
|
export LANG=en_US.UTF-8
|
2019-08-21 15:08:44 +02:00
|
|
|
%pytest
|
|
|
|
%endif
|
2015-04-07 01:29:51 +02:00
|
|
|
|
2019-08-21 15:08:44 +02:00
|
|
|
%if !%{with test}
|
2013-07-18 12:09:01 +02:00
|
|
|
%post
|
2017-02-17 16:46:38 +01:00
|
|
|
%python_install_alternative easy_install
|
2013-07-18 12:09:01 +02:00
|
|
|
|
2014-02-10 16:34:07 +01:00
|
|
|
%postun
|
2017-02-17 16:46:38 +01:00
|
|
|
%python_uninstall_alternative easy_install
|
2013-07-18 12:09:01 +02:00
|
|
|
|
2017-11-27 10:57:16 +01:00
|
|
|
%files %{python_files}
|
2016-07-04 10:17:56 +02:00
|
|
|
%doc CHANGES.rst README.rst
|
2017-02-17 16:46:38 +01:00
|
|
|
%python_alternative %{_bindir}/easy_install
|
2013-06-25 11:01:42 +02:00
|
|
|
%{python_sitelib}/setuptools
|
2017-02-17 16:46:38 +01:00
|
|
|
%{python_sitelib}/setuptools-%{version}-py%{python_version}.egg-info
|
2014-02-10 15:53:17 +01:00
|
|
|
%{python_sitelib}/easy_install.py*
|
2017-02-17 16:46:38 +01:00
|
|
|
%pycache_only %{python_sitelib}/__pycache__/easy_install.*
|
2016-02-01 13:01:25 +01:00
|
|
|
%dir %{python_sitelib}/pkg_resources
|
|
|
|
%{python_sitelib}/pkg_resources/*
|
2019-08-21 15:08:44 +02:00
|
|
|
%endif
|
2006-10-27 14:17:57 +02:00
|
|
|
|
|
|
|
%changelog
|