File python3-setuptools.spec of Package setuptools

#
# spec file for package python3-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:           python3-setuptools
Version:        56.0.0
Release:        0
Url:            http://pypi.python.org/pypi/setuptools
Summary:        Easily download, build, install, upgrade, and uninstall Python packages
License:        MIT
Group:          Development/Languages/Python
Source:         https://files.pythonhosted.org/packages/source/s/setuptools/setuptools-%{version}.tar.gz
Patch1:         setuptools-0.6c9-create-sitedir.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
#!BuildIgnore:  python3-pip
#NOTE(saschpe): Need 'python3' for the 'xml' module:
BuildRequires:  python3
Requires:       python3
Requires:       python3-six
Requires:	python3 python3-base bash
AutoReqProv:	no
BuildRequires:  python3-devel
#%if 0%{?suse_version}
#Requires(post): update-alternatives
#Requires(postun): update-alternatives
#%endif
# NOTE(saschpe): Distribute was merged into 0.7.x, so even though distribute
# obsoletes setuptools < 0.6.45, current setuptools obsoletes distribute again
Provides:       python3-distribute = %{version}
Obsoletes:      python3-distribute < %{version}
BuildArch:      noarch

%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.

%if 0%{?suse_version}
%define         alternatives_program  update-alternatives
%else 0%{?rhel_version}
%define         alternatives_program  alternatives
%endif

%prep
%setup -q -n setuptools-%{version}
#%patch1 -p0
chmod a-x README.rst

%build
python3 setup.py build

%install
python3 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

%post
#%{alternatives_program} \
#    --install %{_bindir}/easy_install easy_install %{_bindir}/easy_install-%{py3_ver} 30

%postun
#if [ $1 -eq 0 ] ; then
#    %{alternatives_program} --remove easy_install %{_bindir}/easy_install-%{py3_ver}
#fi

%files
%defattr(-,root,root,-)
%doc README.rst LICENSE CHANGES.rst
#%{_bindir}/easy_install
#%{_bindir}/easy_install-%{py3_ver}
#%ghost %{_sysconfdir}/alternatives/easy_install
#%{python3_sitelib}/setuptools
#%{python3_sitelib}/setuptools-%{version}-py%{py3_ver}.egg-info
#%{python3_sitelib}/easy_install.py*
%dir %{python3_sitelib}/pkg_resources
%{python3_sitelib}/pkg_resources/*
#%{python3_sitelib}/__pycache__
/usr/lib/python3.6/site-packages/_distutils_hack/
/usr/lib/python3.6/site-packages/
/usr/lib/python3.6/site-packages/setuptools/

%changelog
openSUSE Build Service is sponsored by