forked from pool/python-distlib
Dirk Mueller
388eba103d
* Removed splituser() function which wasn't used and is deprecated. * Handle version comparisons correctly in environment markers. * Handle a single trailing comma following a version. * Fix incorrect handling of epochs. * Reverted handling of tags for Python >= 3.10 (use 310 rather than 3_10). This is because PEP 641 was rejected. * removed unused regular expression * allowed "Obsoletes" in more scenarios, to better handle faulty metadata already on PyPI. * added entry for SourcelessFileLoader to the finder registry. * allowed a trailing comma in constraints, to better handle faulty metadata already on PyP - drop python-distlib-2048-bit-key.patch (obsolete) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-distlib?expand=0&rev=18
80 lines
2.1 KiB
RPMSpec
80 lines
2.1 KiB
RPMSpec
#
|
|
# spec file for package python-distlib
|
|
#
|
|
# 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-%{**}}
|
|
Name: python-distlib
|
|
Version: 0.3.3
|
|
Release: 0
|
|
Summary: Distribution utilities
|
|
License: Python-2.0
|
|
URL: https://bitbucket.org/pypa/distlib
|
|
Source: https://files.pythonhosted.org/packages/source/d/distlib/distlib-%{version}.zip
|
|
Patch0: remove-backports.patch
|
|
BuildRequires: %{python_module pytest}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
BuildRequires: unzip
|
|
BuildArch: noarch
|
|
%python_subpackages
|
|
|
|
%description
|
|
Python distribution utilities.
|
|
|
|
%prep
|
|
%setup -q -n distlib-%{version}
|
|
%autopatch -p1
|
|
|
|
rm -r tests/unittest2
|
|
|
|
# tarfile backport is broken
|
|
rm distlib/_backport/tarfile.py
|
|
|
|
# sysconfig backport is unnecessary and untested
|
|
rm distlib/_backport/sysconfig.*
|
|
|
|
# These test modules require internet access and are unnecessary
|
|
rm tests/test_locators.py tests/test_sysconfig.py
|
|
|
|
# Unused
|
|
rm distlib/_backport/misc.*
|
|
|
|
# Unneeded on Linux
|
|
rm distlib/*.exe
|
|
|
|
# However, the tests for shutil fail when not using using provided backport
|
|
|
|
%build
|
|
%python_build
|
|
|
|
%install
|
|
%python_install
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%check
|
|
export LANG=en_US.UTF-8
|
|
# These two tests need internet access
|
|
%pytest -k 'not (test_search or test_package_data)'
|
|
|
|
%files %{python_files}
|
|
%doc CHANGES.rst README.rst
|
|
%license LICENSE.txt
|
|
%{python_sitelib}/*
|
|
|
|
%changelog
|