2019-10-21 13:36:50 +02:00
|
|
|
#
|
|
|
|
# spec file for package python-userpath
|
|
|
|
#
|
2023-08-10 09:20:22 +02:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2019-10-21 13:36:50 +02: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-10-21 13:37:17 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
2019-10-21 13:36:50 +02:00
|
|
|
|
|
|
|
|
2023-08-10 09:20:22 +02:00
|
|
|
%{?sle15_python_module_pythons}
|
2019-10-21 13:36:50 +02:00
|
|
|
Name: python-userpath
|
2023-12-13 11:21:46 +01:00
|
|
|
Version: 1.9.1
|
2019-10-21 13:36:50 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Tool for adding locations to the user PATH
|
2023-08-10 09:20:22 +02:00
|
|
|
License: MIT
|
2019-10-21 13:37:17 +02:00
|
|
|
URL: https://github.com/ofek/userpath
|
2019-10-21 13:36:50 +02:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/u/userpath/userpath-%{version}.tar.gz
|
2023-08-10 09:20:22 +02:00
|
|
|
BuildRequires: %{python_module hatchling}
|
|
|
|
BuildRequires: %{python_module pip}
|
|
|
|
BuildRequires: %{python_module wheel}
|
2019-10-21 13:37:17 +02:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
Requires: python-click
|
2020-05-18 15:01:02 +02:00
|
|
|
Requires(post): update-alternatives
|
2022-03-14 15:28:34 +01:00
|
|
|
Requires(postun):update-alternatives
|
2019-10-21 13:37:17 +02:00
|
|
|
BuildArch: noarch
|
2019-10-21 13:36:50 +02:00
|
|
|
# SECTION test requirements
|
|
|
|
BuildRequires: %{python_module click}
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
# /SECTION
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
Cross-platform tool for adding locations to the user PATH,
|
|
|
|
with no elevated privileges required.
|
|
|
|
|
|
|
|
%prep
|
2023-08-10 09:20:22 +02:00
|
|
|
%autosetup -p1 -n userpath-%{version}
|
2019-10-21 13:36:50 +02:00
|
|
|
|
|
|
|
%build
|
2023-08-10 09:20:22 +02:00
|
|
|
%pyproject_wheel
|
2019-10-21 13:36:50 +02:00
|
|
|
|
|
|
|
%install
|
2023-08-10 09:20:22 +02:00
|
|
|
%pyproject_install
|
2020-05-18 15:01:02 +02:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/userpath
|
2019-10-21 13:36:50 +02:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
%check
|
|
|
|
export LC_ALL=C.UTF-8
|
|
|
|
%pytest
|
|
|
|
|
2020-05-18 15:01:02 +02:00
|
|
|
%post
|
|
|
|
%python_install_alternative userpath
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative userpath
|
|
|
|
|
2019-10-21 13:36:50 +02:00
|
|
|
%files %{python_files}
|
2023-08-10 09:20:22 +02:00
|
|
|
%doc README.md
|
|
|
|
%license LICENSE.txt
|
2020-05-18 15:01:02 +02:00
|
|
|
%python_alternative %{_bindir}/userpath
|
2023-08-10 09:20:22 +02:00
|
|
|
%{python_sitelib}/userpath
|
|
|
|
%{python_sitelib}/userpath-%{version}*-info
|
2019-10-21 13:36:50 +02:00
|
|
|
|
|
|
|
%changelog
|