forked from pool/python-wheel
- Updated vendored ``packaging`` library to v20.8 - Fixed wheel sdist missing ``LICENSE.txt`` - Don't use default ``macos/arm64`` deployment target in calculating the platform tag for fat binaries (PR by Ronald Oussoren) - Fixed ``AssertionError`` when ``MACOSX_DEPLOYMENT_TARGET`` was set to ``11`` (PR by Grzegorz Bokota and François-Xavier Coudert) - Fixed regression introduced in 0.36.0 on Python 2.7 when a custom generator name was passed as unicode (Scikit-build) (``TypeError: 'unicode' does not have the buffer interface``) - Added official Python 3.9 support - Updated vendored ``packaging`` library to v20.7 - Switched to always using LF as line separator when generating ``WHEEL`` files (on Windows, CRLF was being used instead) - The ABI tag is taken from the sysconfig SOABI value. On PyPy the SOABI value is ``pypy37-pp73`` which is not compliant with PEP 3149, as it should have both the API tag and the platform tag. This change future-proofs any change in PyPy's SOABI tag to make sure only the ABI tag is used by wheel. - Fixed regression and test for ``bdist_wheel --plat-name``. It was ignored for C extensions in v0.35, but the regression was not detected by tests. - Replaced install dependency on ``packaging`` with a vendored copy of its ``tags`` module - Fixed ``bdist_wheel`` not working on FreeBSD due to mismatching platform tag name (it was not being converted to lowercase) - Switched to the packaging_ library for computing wheel tags - Fixed a resource leak in ``WheelFile.open()`` (PR by Jon Dufresne) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-wheel?expand=0&rev=49
99 lines
2.8 KiB
RPMSpec
99 lines
2.8 KiB
RPMSpec
#
|
|
# spec file for package python-wheel
|
|
#
|
|
# Copyright (c) 2021 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/
|
|
#
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
%if "%{flavor}" == "test"
|
|
%define psuffix -test
|
|
%bcond_without test
|
|
%else
|
|
%define psuffix %{nil}
|
|
%bcond_with test
|
|
%endif
|
|
Name: python-wheel%{psuffix}
|
|
Version: 0.36.2
|
|
Release: 0
|
|
Summary: A built-package format for Python
|
|
License: MIT
|
|
Group: Development/Languages/Python
|
|
URL: https://github.com/pypa/wheel
|
|
Source: https://github.com/pypa/wheel/archive/%{version}.tar.gz#/wheel-%{version}.tar.gz
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
Requires: python-setuptools
|
|
Requires(post): update-alternatives
|
|
Requires(postun): update-alternatives
|
|
BuildArch: noarch
|
|
%if %{with test}
|
|
BuildRequires: %{python_module devel}
|
|
BuildRequires: %{python_module pytest >= 3.0.0}
|
|
BuildRequires: %{python_module wheel >= %{version}}
|
|
%endif
|
|
%python_subpackages
|
|
|
|
%description
|
|
A built-package format for Python.
|
|
|
|
A wheel is a ZIP-format archive with a specially formatted filename
|
|
and the .whl extension. It is designed to contain all the files for a
|
|
PEP 376 compatible install in a way that is very close to the on-disk
|
|
format. Many packages will be properly installed with only the "Unpack"
|
|
step (simply extracting the file onto sys.path), and the unpacked archive
|
|
preserves enough information to "Spread" (copy data and scripts to their
|
|
final locations) at any later time.
|
|
|
|
%prep
|
|
%setup -q -n wheel-%{version}
|
|
# Remove addopts as it requires pytest-cov
|
|
sed -i '/addopts = /d' setup.cfg
|
|
|
|
%build
|
|
%python_build
|
|
|
|
%install
|
|
%if !%{with test}
|
|
%python_install
|
|
%python_clone -a %{buildroot}%{_bindir}/wheel
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
%endif
|
|
|
|
%check
|
|
%if %{with test}
|
|
export LC_ALL=en_US.utf8
|
|
export PYTHONDONTWRITEBYTECODE=1
|
|
%pytest
|
|
%endif
|
|
|
|
%if !%{with test}
|
|
%post
|
|
%python_install_alternative wheel
|
|
|
|
%postun
|
|
%python_uninstall_alternative wheel
|
|
|
|
%files %{python_files}
|
|
%doc docs/news.rst README.rst
|
|
%license LICENSE.txt
|
|
%python_alternative %{_bindir}/wheel
|
|
%{python_sitelib}/wheel-%{version}-py%{python_version}.egg-info
|
|
%{python_sitelib}/wheel/
|
|
%endif
|
|
|
|
%changelog
|