File saltbundlepy-setuptools.spec of Package saltbundlepy-setuptools

#
# spec file for package saltbundlepy-setuptools
#
# Copyright (c) 2025 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


%{?!saltbundlepy_module:%define saltbundlepy_module() saltbundlepy-%{**}}
%define pythons saltbundlepy

Name:           saltbundlepy-setuptools
Version:        78.1.1
Release:        0
Summary:        Download, build, install, upgrade, and uninstall Python packages
License:        Apache-2.0 AND MIT AND BSD-2-Clause AND Python-2.0
Group:          Development/Languages/Python
URL:            https://github.com/pypa/setuptools
Source:         https://files.pythonhosted.org/packages/source/s/setuptools/setuptools-%{version}.tar.gz
Patch0:         sort-for-reproducibility.patch
BuildRequires:  %{saltbundlepy_module base >= 3.10}
BuildRequires:  fdupes
BuildRequires:  saltbundlepy-rpm-macros
BuildRequires:  unzip
# The dependency download feature may require SSL, which is in python3-base and python(2)
Requires:       saltbundlepy-base
Requires(post): update-alternatives
Requires(postun): update-alternatives
Provides:       python-distribute = %{version}
Obsoletes:      python-distribute < %{version}
BuildArch:      noarch
%python_subpackages

%description
setuptools is 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
%autosetup -p1 -n setuptools-%{version}

%build
%python_build

%install
%python_install

%python_expand %fdupes %{buildroot}%{$python_sitelib}

# Delete all *.exe files as not needed for linux packages
find %{buildroot} -type f -name '*.exe' -print -delete

%files %{python_files}
%defattr(-,root,root)
%license LICENSE
%doc NEWS.rst README.rst
%{python_sitelib}/setuptools
%{python_sitelib}/setuptools-%{version}-py%{python_version}.egg-info
%dir %{python_sitelib}/pkg_resources
%{python_sitelib}/pkg_resources/*
%{python_sitelib}/_distutils_hack
%{python_sitelib}/distutils-precedence.pth

%changelog
openSUSE Build Service is sponsored by