From 82b6322053c08b409d66575962704c5cae77666c483d460d2088e7f41d089957 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Wed, 5 Feb 2025 13:20:35 +0000 Subject: [PATCH] - Use multibuild for tests OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-userpath?expand=0&rev=17 --- .gitattributes | 23 ++++++++++ .gitignore | 1 + _multibuild | 3 ++ python-userpath.changes | 72 +++++++++++++++++++++++++++++++ python-userpath.spec | 93 +++++++++++++++++++++++++++++++++++++++++ userpath-1.9.2.tar.gz | 3 ++ 6 files changed, 195 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _multibuild create mode 100644 python-userpath.changes create mode 100644 python-userpath.spec create mode 100644 userpath-1.9.2.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/python-userpath.changes b/python-userpath.changes new file mode 100644 index 0000000..08524b0 --- /dev/null +++ b/python-userpath.changes @@ -0,0 +1,72 @@ +------------------------------------------------------------------- +Wed Feb 5 12:20:58 UTC 2025 - Daniel Garcia + +- Use multibuild for tests + +------------------------------------------------------------------- +Sat Mar 16 14:23:15 UTC 2024 - Dirk Müller + +- update to 1.9.2: + * Fix import error on Windows + +------------------------------------------------------------------- +Wed Dec 13 10:21:39 UTC 2023 - Dirk Müller + +- update to 1.9.1: + * Temporarily revert the change on non-Windows systems where + only login shells are modified + +------------------------------------------------------------------- +Thu Aug 10 07:10:31 UTC 2023 - Daniel Garcia + +- add sle15_python_module_pythons (jsc#PED-68, jsc#PED-5573) +- update to 1.9.0 + * Ignore the current directory for path detection on Windows + * On non-Windows systems only modify login shells +- v1.8.0 + * Broadcast WM_SETTINGCHANGE on Windows + * Drop Python 2.7 & 3.6 + +------------------------------------------------------------------- +Mon Mar 14 10:06:06 UTC 2022 - PragmaticLinux + +- update to 1.7.0 + * Fix path normalization to be aware of case-insensitive + platforms and symlinks. + * Use locale's encoding when handling output from subprocesses + * Modify bash start-up files based on their existence + * Remove distro dependency + * Fix fallback mechanism for detecting the name of the parent + process + +------------------------------------------------------------------- +Thu Jul 23 11:07:58 UTC 2020 - Marketa Calabkova + +- update to 1.4.1 + * Prevent adding paths multiple times on macOS/Linux + * Send CLI errors to stderr instead of stdout + +------------------------------------------------------------------- +Mon May 18 09:10:45 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + +------------------------------------------------------------------- +Wed Oct 23 07:06:02 UTC 2019 - Tomáš Chvátal + +- Fix license string + +------------------------------------------------------------------- +Mon Oct 21 09:06:03 UTC 2019 - John Vandenberg + +- Update to v1.3.0 + +------------------------------------------------------------------- +Wed Sep 11 08:18:27 AM UTC 2019 - John Vandenberg + +- Update spec for userpath v1.2.0 + +------------------------------------------------------------------- +Thu Aug 2 18:59:39 UTC 2018 - aboe76@gmail.com + +- python-addduserpath initial packaging diff --git a/python-userpath.spec b/python-userpath.spec new file mode 100644 index 0000000..8006ee5 --- /dev/null +++ b/python-userpath.spec @@ -0,0 +1,93 @@ +# +# spec file for package python-userpath +# +# Copyright (c) 2025 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/ +# + + +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif +%{?sle15_python_module_pythons} +Name: python-userpath%{psuffix} +Version: 1.9.2 +Release: 0 +Summary: Tool for adding locations to the user PATH +License: MIT +URL: https://github.com/ofek/userpath +Source: https://files.pythonhosted.org/packages/source/u/userpath/userpath-%{version}.tar.gz +BuildRequires: %{python_module hatchling} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-click +Requires(post): update-alternatives +Requires(postun): update-alternatives +BuildArch: noarch +%if %{with test} +# SECTION test requirements +BuildRequires: %{python_module click} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module userpath = %{version}} +%endif +# /SECTION +%python_subpackages + +%description +Cross-platform tool for adding locations to the user PATH, +with no elevated privileges required. + +%prep +%autosetup -p1 -n userpath-%{version} + +%build +%if !%{with test} +%pyproject_wheel +%endif + +%install +%if !%{with test} +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/userpath +%python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif + +%check +%if %{with test} +export LC_ALL=C.UTF-8 +%pytest +%endif + +%if !%{with test} +%post +%python_install_alternative userpath + +%postun +%python_uninstall_alternative userpath + +%files %{python_files} +%doc README.md +%license LICENSE.txt +%python_alternative %{_bindir}/userpath +%{python_sitelib}/userpath +%{python_sitelib}/userpath-%{version}*-info +%endif + +%changelog diff --git a/userpath-1.9.2.tar.gz b/userpath-1.9.2.tar.gz new file mode 100644 index 0000000..0f3f54b --- /dev/null +++ b/userpath-1.9.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c52288dab069257cc831846d15d48133522455d4677ee69a9781f11dbefd815 +size 11140