%bcond_with dotests %global __tar /opt/freeware/bin/tar %global py_major 3.9 %global python_major python%{py_major} %global pkgname setuptools %global meta_package python3-%{pkgname} %global python3_sitearch %(%{python_major} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(0))") Name: %{python_major}-%{pkgname} Version: 65.5.1 Release: 1 Summary: Easily build and distribute Python packages License: MIT and ASL 2.0 and (BSD or ASL 2.0) and Python URL: https://pypi.python.org/pypi/%{pkgname} Source0: https://files.pythonhosted.org/packages/source/s/%{pkgname}/%{pkgname}-%{version}.tar.gz BuildArch: noarch BuildRequires: %{python_major}-devel >= %{py_major} Requires: %{python_major} >= %{py_major}.13 %description Setuptools is a collection of enhancements to the Python 3 distutils that allow you to more easily build and distribute Python 3 packages, especially ones that have dependencies on other packages. This package also contains the runtime components of setuptools, necessary to execute the software that requires pkg_resources. %package -n %{meta_package} Summary: Meta-package for %{name} Requires: python3 >= %{py_major}.13 Requires: %{name} = %{version}-%{release} %description -n %{meta_package} This is a Meta-package for %{name} package. %prep %autosetup -n %{pkgname}-%{version} %build export PATH=/opt/freeware/bin:$PATH %{python_major} setup.py build %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %{python_major} setup.py install --root %{buildroot} %check %if %{with dotests} #python3 -m venv python_venv #. ./python_venv/bin/activate #pip3 install pytest #pip3 install hypothesis #ulimit -d unlimited #ulimit -n unlimited #ulimit -m unlimited # ulimit -f unlimited #( python runtests.py -m 'full' -v || true ) #deactivate %endif %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %license LICENSE %doc CHANGES.rst README.rst %{python3_sitearch}/* %files -n %{meta_package} # Empty %changelog * Mon May 08 2023 Harshith K A - 65.5.1-1 - Update to fix the CVE-2022-40897 * Wed Aug 24 2022 Ayappan P - 65.2.0-1 - setuptools for python3.9