From 28cb7c38376909f602379339e69daa66c4cc1650 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Thu, 2 Feb 2023 20:17:33 +0000 Subject: [PATCH] Auto sync2gitlab import of python3.11-wheel-0.38.4-1.el8.src.rpm --- .gitignore | 1 + EMPTY | 1 - python3.11-wheel.spec | 168 ++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 170 insertions(+), 1 deletion(-) create mode 100644 .gitignore delete mode 100644 EMPTY create mode 100644 python3.11-wheel.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..034becd --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/wheel-0.38.4.tar.gz diff --git a/EMPTY b/EMPTY deleted file mode 100644 index 0519ecb..0000000 --- a/EMPTY +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/python3.11-wheel.spec b/python3.11-wheel.spec new file mode 100644 index 0000000..3e6e64a --- /dev/null +++ b/python3.11-wheel.spec @@ -0,0 +1,168 @@ +%global __python3 /usr/bin/python3.11 +%global python3_pkgversion 3.11 + +# The function of bootstrap is that it disables the wheel subpackage +%bcond_without bootstrap + +# Default: when bootstrapping -> disable tests +%if %{with bootstrap} +%bcond_with tests +%else +%bcond_without tests +%endif + +# Similar to what we have in pythonX.Y.spec files. +# If enabled, provides unversioned executables and other stuff. +# Disable it if you build this package in an alternative stack. +%bcond_with main_python + +%global pypi_name wheel +%global python_wheel_name %{pypi_name}-%{version}-py3-none-any.whl + +Name: python%{python3_pkgversion}-%{pypi_name} +Version: 0.38.4 +Release: 1%{?dist} +Summary: Built-package format for Python + +# packaging is ASL 2.0 or BSD +License: MIT and (ASL 2.0 or BSD) +URL: https://github.com/pypa/wheel +Source0: %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools + +# python3 bootstrap: this is rebuilt before the final build of python3, which +# adds the dependency on python3-rpm-generators, so we require it manually +BuildRequires: python3-rpm-generators + +%if %{with tests} +BuildRequires: python%{python3_pkgversion}-pytest +# several tests compile extensions +# those tests are skipped if gcc is not found +BuildRequires: gcc +%endif + +# Virtual provides for the packages bundled by wheel. +# Actual version can be found in git history: +# https://github.com/pypa/wheel/commits/master/src/wheel/vendored/packaging/tags.py +%global bundled %{expand: +Provides: bundled(python%{python3_version}dist(packaging)) = 21.3 +} + +%{bundled} + + +# Require alternatives version that implements the --keep-foreign flag +Requires(postun): alternatives >= 1.19.1-1 + +# python3.11 installs the alternatives master symlink to which we attach a slave +Requires: python%{python3_pkgversion} +Requires(post): python%{python3_pkgversion} +Requires(postun): python%{python3_pkgversion} + +%global _description %{expand: +Wheel is the reference implementation of the Python wheel packaging standard, +as defined in PEP 427. + +It has two different roles: + + 1. A setuptools extension for building wheels that provides the bdist_wheel + setuptools command. + 2. A command line tool for working with wheel files.} + +%description %{_description} + +%if %{without bootstrap} +%package -n %{python_wheel_pkg_prefix}-%{pypi_name}-wheel +Summary: The Python wheel module packaged as a wheel +%{bundled} + +%description -n %{python_wheel_pkg_prefix}-%{pypi_name}-wheel +A Python wheel of wheel to use with virtualenv. +%endif + + +%prep +%autosetup -n %{pypi_name}-%{version} -p1 + + +%build +%py3_build + + +%install +%py3_install +mv %{buildroot}%{_bindir}/%{pypi_name}{,-%{python3_version}} +%if %{with main_python} +ln -s %{pypi_name}-%{python3_version} %{buildroot}%{_bindir}/%{pypi_name}-3 +ln -s %{pypi_name}-3 %{buildroot}%{_bindir}/%{pypi_name} +%endif +# Create an empty file to be used by `alternatives` +touch %{buildroot}%{_bindir}/%{pypi_name}-3 + +%if %{without bootstrap} +# We can only use bdist_wheel when wheel is installed, hence we don't build the wheel in %%build +export PYTHONPATH=%{buildroot}%{python3_sitelib} +%py3_build_wheel +mkdir -p %{buildroot}%{python_wheel_dir} +install -p dist/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir} +%endif + + +%if %{with tests} +%check +rm setup.cfg # to drop pytest coverage options configured there +%pytest -v --ignore build +%endif + +%post -n python%{python3_pkgversion}-%{pypi_name} +alternatives --keep-foreign --add-slave python3 %{_bindir}/python%{python3_version} \ + %{_bindir}/%{pypi_name}-3 \ + %{pypi_name}-3 \ + %{_bindir}/%{pypi_name}-%{python3_version} + +%postun -n python%{python3_pkgversion}-%{pypi_name} +# Do this only during uninstall process (not during update) +if [ $1 -eq 0 ]; then + alternatives --remove-slave python3 %{_bindir}/python%{python3_version} \ + %{pypi_name}-3 +fi + + +%files -n python%{python3_pkgversion}-%{pypi_name} +%license LICENSE.txt +%doc README.rst +%{_bindir}/%{pypi_name}-%{python3_version} +%if %{with main_python} +%{_bindir}/%{pypi_name} +%{_bindir}/%{pypi_name}-3 +%endif +%ghost %{_bindir}/%{pypi_name}-3 +%{python3_sitelib}/%{pypi_name}*/ + +%if %{without bootstrap} +%files -n %{python_wheel_pkg_prefix}-%{pypi_name}-wheel +%license LICENSE.txt +# we own the dir for simplicity +%dir %{python_wheel_dir}/ +%{python_wheel_dir}/%{python_wheel_name} +%endif + +%changelog +* Tue Dec 13 2022 Charalampos Stratakis - 0.38.4-1 +- Initial package +- Fedora contributions by: + # Charalampos Stratakis + # Dennis Gilmore + # Haikel Guemar + # Igor Gnatenko + # Karolina Surma + # Lumir Balhar + # Matej Stuchlik + # Miro HronĨok + # Robert Kuska + # Slavek Kabrda + # Tomas Hrnciar + # Tomas Orsava diff --git a/sources b/sources new file mode 100644 index 0000000..d70ff06 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (wheel-0.38.4.tar.gz) = 2ff7c6175201f8145f2c1f9937c6955a1dd22eeedab1e456f65c4edae9186610d9e7702c35773b49026c56c9cc201672025e7d42fcc7f782153c65c28e6b90d0