2019-10-21 13:36:50 +02:00
|
|
|
#
|
|
|
|
# spec file for package python-userpath
|
|
|
|
#
|
2020-05-18 15:01:02 +02:00
|
|
|
# Copyright (c) 2020 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
|
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
Name: python-userpath
|
|
|
|
Version: 1.3.0
|
|
|
|
Release: 0
|
|
|
|
Summary: Tool for adding locations to the user PATH
|
2019-10-23 09:06:15 +02:00
|
|
|
License: MIT OR Apache-2.0
|
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
|
|
|
|
BuildRequires: %{python_module setuptools}
|
2019-10-21 13:37:17 +02:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
Requires: python-click
|
|
|
|
Requires: python-distro
|
2020-05-18 15:01:02 +02:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
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 distro}
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
# /SECTION
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
Cross-platform tool for adding locations to the user PATH,
|
|
|
|
with no elevated privileges required.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n userpath-%{version}
|
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_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}
|
|
|
|
%doc README.rst
|
|
|
|
%license LICENSE-APACHE LICENSE-MIT
|
2020-05-18 15:01:02 +02:00
|
|
|
%python_alternative %{_bindir}/userpath
|
2019-10-21 13:36:50 +02:00
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|