From e05c0d85b45283e9267d6799f94b43c224db2b94afe2b6cbd15f350fa4549710 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Mon, 9 Jun 2025 14:15:44 +0000 Subject: [PATCH] - Convert to libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-helpdev?expand=0&rev=13 --- .gitattributes | 23 +++++++++++++ .gitignore | 1 + helpdev-v0.7.1.tar.gz | 3 ++ python-helpdev.changes | 68 ++++++++++++++++++++++++++++++++++++++ python-helpdev.spec | 74 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 169 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 helpdev-v0.7.1.tar.gz create mode 100644 python-helpdev.changes create mode 100644 python-helpdev.spec 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/helpdev-v0.7.1.tar.gz b/helpdev-v0.7.1.tar.gz new file mode 100644 index 0000000..46920a2 --- /dev/null +++ b/helpdev-v0.7.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2b8d519fdada00c95f66306682995f93e0b1015890e5e74d80ca2d913ad92229 +size 370569 diff --git a/python-helpdev.changes b/python-helpdev.changes new file mode 100644 index 0000000..778b73a --- /dev/null +++ b/python-helpdev.changes @@ -0,0 +1,68 @@ +------------------------------------------------------------------- +Mon Jun 9 14:15:18 UTC 2025 - Markéta Machová + +- Convert to libalternatives + +------------------------------------------------------------------- +Tue May 27 15:24:45 UTC 2025 - Markéta Machová + +- Convert to pip-based build + +------------------------------------------------------------------- +Tue May 26 07:33:07 UTC 2020 - Antonio Larrosa + +- python-psutil is only used to call its "swap_memory" and + "virtual_memory" functions, so we reduced the required version + from 5.6 to 5.4.8 so we can build packages for SLE/Leap. + +------------------------------------------------------------------- +Mon May 25 10:59:16 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + +------------------------------------------------------------------- +Mon May 18 08:11:04 UTC 2020 - Antonio Larrosa + +- Update to version 0.7.1 (fixes issue reported in boo#1135733 #c4): + * Fix pipeline, doc8 linting ignores D001, line too long + * Add customize function, part of #1 + * Change _filter to filter_packages and make it public + * Improve filter_package explanation + * Improve docs + * Add check_qt() function + * Add check_numbers() function + * Enhance help from command line parser + * Enhance command line order + * Correct mispelling errors + * Remove importlib_metadata for Python 3.8+, incoporated into std lib, MR#2 + * Add MANIFEST.in, part of #9 + * Improve internal code and linting + * Remove support for Python 2.7 and 3.4, closes #8 + +- There's no 0.7.0 release by upstream. + +- Remove patch already included by upstream: + * python38.patch + +------------------------------------------------------------------- +Sun Mar 8 03:51:01 UTC 2020 - Tomáš Chvátal + +- Use proper name for importlib-metadata + +------------------------------------------------------------------- +Tue Jan 28 08:38:12 UTC 2020 - Tomáš Chvátal + +- Switch to github tarball to get tests and license +- Run the tests + +------------------------------------------------------------------- +Tue Jan 28 08:20:21 UTC 2020 - Tomáš Chvátal + +- Format with spec cleaner +- Add patch to work with python 3.8: + * python38.patch + +------------------------------------------------------------------- +Sat Jan 25 14:53:04 UTC 2020 - Sebastian Wagner + +- initial version for package diff --git a/python-helpdev.spec b/python-helpdev.spec new file mode 100644 index 0000000..6395465 --- /dev/null +++ b/python-helpdev.spec @@ -0,0 +1,74 @@ +# +# spec file for package python-helpdev +# +# 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/ +# + + +%bcond_without libalternatives +Name: python-helpdev +Version: 0.7.1 +Release: 0 +Summary: HelpDev - Extracts information about the Python environment easily +License: CC-BY-4.0 AND MIT +Group: Development/Languages/Python +URL: https://gitlab.com/dpizetta/helpdev +Source0: https://gitlab.com/dpizetta/helpdev/-/archive/v%{version}/helpdev-v%{version}.tar.gz +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: alts +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: alts +Requires: python-importlib-metadata +Requires: python-psutil >= 5.4.8 +BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module importlib-metadata} +BuildRequires: %{python_module psutil >= 5.4.8} +BuildRequires: %{python_module pytest} +# /SECTION +%python_subpackages + +%description +HelpDev - Extracts information about the Python environment easily. + +%prep +%setup -q -n helpdev-v%{version} +sed -i '1{\,^#!%{_bindir}/env python,d}' helpdev/*.py +sed -i -e "s/psutil>=5.6/psutil>=5.4.8/" setup.py + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/helpdev +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +#test_check_python_packages needs the binary +%pytest -k 'not test_check_python_packages' + +%pre +%python_libalternatives_reset_alternative helpdev + +%files %{python_files} +%doc README.rst +%python_alternative %{_bindir}/helpdev +%{python_sitelib}/helpdev +%{python_sitelib}/helpdev-%{version}*-info + +%changelog