File python-setuptools.spec of Package python-setuptools

#
# spec file for package python-setuptools
#
# Copyright (c) 2018 COMBES Pascal <pascom@orange.fr>
#
# 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.

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:		python-setuptools
Version:	46.1.3
Release:	0
Summary:	Easily download, build, install, upgrade and uninstall Python packages
Url:		https://github.com/pypa/setuptools/
License:	MIT
Group:		Development/Languages/Python
Source0:	setuptools-%{version}.tar.gz
BuildArch:	noarch
BuildRequires:	python-rpm-macros
BuildRequires:	fdupes
BuildRequires:	%{python_module devel}
BuildRequires:	%{python_module xml}
Requires(post): update-alternatives
Requires(postun): update-alternatives

%python_subpackages

%description
This package contains a collection of enhancements to the Python distutils
that allow you to build and distribute Python packages, especially ones
that have dependencies on other packages.

%prep
%setup -q -n setuptools-%{version}

# Remove shebang in library files:
sed -i -e '1s\^#!/.*$\\' pkg_resources/_vendor/appdirs.py
sed -i -e '1s\^#!/.*$\\' setuptools/command/easy_install.py

%build
%python_exec bootstrap.py
%python_build

%install
%python_install
%prepare_alternative easy_install
%fdupes %{buildroot}%{_prefix}

%files %{python_files}
%{python_sitelib}/*
%python_alternative %{_bindir}/easy_install

%post
%python_install_alternative easy_install

%postun
%python_uninstall_alternative easy_install

%changelog

openSUSE Build Service is sponsored by