2019-03-08 13:57:50 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-pythonfinder
|
|
|
|
#
|
2022-02-24 06:56:52 +00:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2019-03-08 13:57:50 +00: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.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2022-02-24 06:56:52 +00:00
|
|
|
%define skip_python2 1
|
2019-03-08 13:57:50 +00:00
|
|
|
Name: python-pythonfinder
|
2022-10-25 20:09:54 +00:00
|
|
|
Version: 1.3.1
|
2019-03-08 13:57:50 +00:00
|
|
|
Release: 0
|
2019-03-17 15:30:16 +00:00
|
|
|
Summary: A tool to locate Python on the system
|
2019-03-08 13:57:50 +00:00
|
|
|
License: MIT
|
|
|
|
Group: Development/Languages/Python
|
|
|
|
URL: https://github.com/sarugaku/pythonfinder
|
2022-10-25 20:41:58 +00:00
|
|
|
Source: https://github.com/sarugaku/pythonfinder/archive/refs/tags/v%{version}.tar.gz#/pythonfinder-%{version}.tar.gz
|
2019-03-08 13:57:50 +00:00
|
|
|
BuildRequires: %{python_module setuptools >= 36.2.2}
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
Requires: python-attrs
|
|
|
|
Requires: python-cached-property
|
|
|
|
Requires: python-click
|
|
|
|
Requires: python-packaging
|
|
|
|
Requires: python-six
|
|
|
|
Requires: python-vistir >= 0.2.5
|
2020-05-20 11:33:37 +00:00
|
|
|
Requires(post): update-alternatives
|
2022-02-24 06:56:52 +00:00
|
|
|
Requires(postun):update-alternatives
|
2019-03-08 13:57:50 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
# SECTION test requirements
|
|
|
|
BuildRequires: %{python_module attrs}
|
|
|
|
BuildRequires: %{python_module cached-property}
|
|
|
|
BuildRequires: %{python_module click}
|
|
|
|
BuildRequires: %{python_module crayons}
|
|
|
|
BuildRequires: %{python_module packaging}
|
2019-03-13 12:52:11 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2019-03-08 13:57:50 +00:00
|
|
|
BuildRequires: %{python_module six}
|
|
|
|
BuildRequires: %{python_module vistir >= 0.2.5}
|
|
|
|
# /SECTION
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
2019-03-17 15:30:16 +00:00
|
|
|
A Python discovery tool to locate Python on the system.
|
2019-03-08 13:57:50 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n pythonfinder-%{version}
|
2019-03-13 12:52:11 +00:00
|
|
|
rm -r tasks
|
|
|
|
|
|
|
|
sed -i '/addopts/d' setup.cfg
|
|
|
|
|
|
|
|
# pep514tools is a Windows only dependency which is loosely coupled
|
|
|
|
# https://travis-ci.org/jayvdb/pythonfinder/builds/505169805
|
|
|
|
rm -rf src/pythonfinder/_vendor/pep514tools
|
|
|
|
|
2019-03-08 13:57:50 +00:00
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
2020-05-20 11:33:37 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pyfinder
|
2019-03-08 13:57:50 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
2019-03-13 12:52:11 +00:00
|
|
|
%check
|
|
|
|
# Three tests fail with OSError: [Errno 1] Operation not permitted , attempting
|
|
|
|
# to modify read-only system image files.
|
2019-05-25 08:54:20 +00:00
|
|
|
%pytest -k 'not (test_python_versions or test_shims_are_kept or test_shims_are_removed)'
|
2019-03-13 12:52:11 +00:00
|
|
|
|
2020-05-20 11:33:37 +00:00
|
|
|
%post
|
|
|
|
%python_install_alternative pyfinder
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative pyfinder
|
|
|
|
|
2019-03-08 13:57:50 +00:00
|
|
|
%files %{python_files}
|
|
|
|
%doc CHANGELOG.rst README.rst
|
|
|
|
%license LICENSE.txt
|
2020-05-20 11:33:37 +00:00
|
|
|
%python_alternative %{_bindir}/pyfinder
|
2019-03-08 13:57:50 +00:00
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|