2019-03-08 15:46:09 +01:00
|
|
|
#
|
|
|
|
# spec file for package python-distlib
|
|
|
|
#
|
2020-03-13 09:44:40 +01:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2019-03-08 15:46:09 +01:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-03-25 12:39:45 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
2019-03-08 15:46:09 +01:00
|
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
Name: python-distlib
|
2020-03-13 09:44:40 +01:00
|
|
|
Version: 0.3.0
|
2019-03-08 15:46:09 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Distribution utilities
|
2019-03-25 12:39:45 +01:00
|
|
|
License: Python-2.0
|
2019-09-13 10:57:12 +02:00
|
|
|
URL: https://bitbucket.org/pypa/distlib
|
2019-03-08 15:46:09 +01:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/d/distlib/distlib-%{version}.zip
|
|
|
|
Patch0: remove-backports.patch
|
|
|
|
BuildRequires: %{python_module pytest}
|
2019-03-25 12:39:45 +01:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2019-03-08 15:46:09 +01:00
|
|
|
BuildRequires: fdupes
|
2019-03-25 12:39:45 +01:00
|
|
|
BuildRequires: python-rpm-macros
|
2019-03-08 15:46:09 +01:00
|
|
|
BuildRequires: unzip
|
|
|
|
BuildArch: noarch
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
Python distribution utilities.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n distlib-%{version}
|
2019-10-25 07:30:51 +02:00
|
|
|
%autopatch -p1
|
2019-03-08 15:46:09 +01:00
|
|
|
|
|
|
|
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.*
|
|
|
|
|
2019-04-04 14:32:51 +02:00
|
|
|
# Unneeded on Linux
|
|
|
|
rm distlib/*.exe
|
|
|
|
|
2019-03-08 15:46:09 +01:00
|
|
|
# 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
|
2019-10-25 07:30:51 +02:00
|
|
|
%pytest -k 'not (test_search or test_package_data)'
|
2019-03-08 15:46:09 +01:00
|
|
|
|
|
|
|
%files %{python_files}
|
|
|
|
%doc CHANGES.rst README.rst
|
|
|
|
%license LICENSE.txt
|
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|