From e1562a4ade02ba9995f9681843e98f92a6ca7110a0c735c40a12ad089b7533cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 17 Jun 2025 07:58:53 +0000 Subject: [PATCH 1/2] - Convert to libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bindep?expand=0&rev=18 --- .gitattributes | 23 ++++++ .gitignore | 1 + bindep-2.11.0.tar.gz | 3 + bindep-2.12.0.tar.gz | 3 + bindep-2.13.0.tar.gz | 3 + python-bindep.changes | 169 ++++++++++++++++++++++++++++++++++++++++++ python-bindep.spec | 91 +++++++++++++++++++++++ remove-mock.patch | 32 ++++++++ 8 files changed, 325 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 bindep-2.11.0.tar.gz create mode 100644 bindep-2.12.0.tar.gz create mode 100644 bindep-2.13.0.tar.gz create mode 100644 python-bindep.changes create mode 100644 python-bindep.spec create mode 100644 remove-mock.patch 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/bindep-2.11.0.tar.gz b/bindep-2.11.0.tar.gz new file mode 100644 index 0000000..713dadf --- /dev/null +++ b/bindep-2.11.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:acb2f259bce1fd1508873479609bbde5b9aae508378476a68d6b6a19002e7e2f +size 42317 diff --git a/bindep-2.12.0.tar.gz b/bindep-2.12.0.tar.gz new file mode 100644 index 0000000..ab3e4e3 --- /dev/null +++ b/bindep-2.12.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c06b51e6d0ba3965aad8f3c25f0a574be0f801ba07cb1a78495da895467de760 +size 42752 diff --git a/bindep-2.13.0.tar.gz b/bindep-2.13.0.tar.gz new file mode 100644 index 0000000..e53e361 --- /dev/null +++ b/bindep-2.13.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:df7564753e583033bb113338150d772540145b4d189a4801ec56a25b5ede5050 +size 43002 diff --git a/python-bindep.changes b/python-bindep.changes new file mode 100644 index 0000000..e1a1b49 --- /dev/null +++ b/python-bindep.changes @@ -0,0 +1,169 @@ +------------------------------------------------------------------- +Tue Jun 17 07:58:12 UTC 2025 - Markéta Machová + +- Convert to libalternatives + +------------------------------------------------------------------- +Mon Apr 28 08:44:31 UTC 2025 - John Paul Adrian Glaubitz + +- Update to 2.13.0 + * Python 3.6 is no longer supported. +- Add missing update-alternatives dependency to Requires + +------------------------------------------------------------------- +Mon Jan 27 12:52:44 UTC 2025 - John Paul Adrian Glaubitz + +- Update to 2.12.0 + * Basic support for PopOS is now included. + * Python 2.7 and 3.5 are no longer supported. + * Bindep now depends on the distro python library to determine + details about the current platform. This library looks at both + /etc/os-release and lsb_release to find platform info. The + os-release file data is preferred and at times has slightly + different data than lsb_release. Every effort has been made + to make this transition backward compatible but some things + may have been missed. The motivation for this change is that + not all distros have lsb_release available and we can let the + distro library sort that out for us. +- Drop remove-mock.patch, merged upstream + +------------------------------------------------------------------- +Fri May 5 11:04:40 UTC 2023 - Johannes Kastl + +- add sle15_python_module_pythons + +------------------------------------------------------------------- +Mon Mar 27 06:49:08 UTC 2023 - Steve Kowalik + +- Add patch remove-mock.patch: + * Remove use of external mock module, try unittest.mock first. +- Switch to pyproject macros. +- Actually run the testsuite using pytest. +- Stop using %python_sitelib/* + +------------------------------------------------------------------- +Tue Mar 21 07:08:38 UTC 2023 - Johannes Kastl + +- recreate spec file using py2pack + +------------------------------------------------------------------- +Fri Sep 23 02:33:16 UTC 2022 - Yogalakshmi Arunachalam + +- Update to 2.11.0 + * Add support for Rocky Linux and Manjaro to Bindep. + +------------------------------------------------------------------- +Tue Jan 11 20:56:10 UTC 2022 - Dirk Müller + +- add python-rpm-macros dependency + +------------------------------------------------------------------- +Tue Jan 4 09:01:17 UTC 2022 - Dirk Müller + +- update to 2.10.1: + * Add old python packaging pin + * Add release note for rocky and manjaro + * feat: Add test support for Manjaro Linux + * feat: Add support for Manjaro Linux + * Require packaging + * Add Rocky Linux support + * Correctly skip sdist building in tox.ini + * Fix formatting issues in docs + * Build releases on ubuntu-focal + * Update contributor doc and readme + * Overhaul Python package metadata + * Remove release note about rpm path references + * Build docs for OpenDev + * Move all jobs in-repo + * Publish release notes + * Add missing release notes + * Assure bindep can be called as a module + * ArchLinux: ignore unrelated warnings from pacman + * Fixed pep8 job + * Add centos 8 and focal testing + * Cull the test bindep file + * Use abstracted virtualenv\_command from ensure-pip + * Tolerate missing bindep.txt when using --profiles + * Add OracleLinux support + * Fix test execution failure on Darwin + * Expose base python version as an atom + * Fix emerge testcases + * Replace Trusty with Bionic in the testing + * Some cleanups + * Add bindep.txt for pypy + * Change openstack-dev to openstack-discuss + * Add dependency version examples to README + * Switch to opensuse-15 nodeset for bindep testing + * Use Python 3.x by default for testing + * OpenDev Migration Patch + * Adds job to test bindep on Fedora + * Fix bindep --brief for arch linux + * Replace deprecated bindep-fallback testing + * Allow mentioning tools paths in bindep + * Fix apk handling of warnings/output problems + * Add openSUSE 15.0 testing + * Update docs building + +------------------------------------------------------------------- +Tue Dec 4 12:46:08 UTC 2018 - Matej Cepl + +- Remove superfluous devel dependency for noarch package + +------------------------------------------------------------------- +Fri Nov 30 13:36:51 UTC 2018 - Thomas Bechtold + +- update to 2.8.1: + * Remove fedora-27 fallback job + * Fix bindep path + * Fix user profile display + * Add opensuse-leap support + * Add support for Alpine Linux + * Clearer unsupported platform error message + * Use the distro package to determine distro + * Move to argparse + * Remove debian-jessie nodeset + * SUSE: Update openSUSE Tumbleweed references for lsb-release-3.X.X + * Update to fedora-27 for testing + * add detection of darwin (MacOS/OSX) + * Move jenkins/data/bindep-fallback.txt + * add support for rhel workstation + * Zuul: Remove project name + * Add native Zuul v3 bindep-fallback test + * Fix logic for groups + * Add new syntax to allow matching multiple profile + * Add ability to list all deps + * bindep: Query for RPM capabilities as well + * Log an error when lsb\_release cannot be executed + * Fix test\_main and test\_depends for systems missing lsb\_release + * Handle dotted versions in platform selectors + * Update tox.ini with py35 + * bindep: depends: Add distro family aliases + * Add Amazon Linux support to bindep + * Consistently check subprocess output + * Update 'pbr' version requirements + * Exit the loop when we don't have a package + * bindep: depends: Add support for openSUSE {Leap,Tumbleweed} + * Bump lower cap of PBR to 1.3 + * Extract file finding and processing to functions + * Add RHEL support + * get\_pkg\_version: Fix py3 bytes/str errors + * Use the autodoc Sphinx extension + * Move dev reference from readme to contributing + * Remove unused module index in documentation + * Removed remnants of support\_py26 module + * Give some examples + * Update newsfile entry for default filename change + * Update a couple of old references in README file + * Add bindep.txt as default filename + * Build universal wheels + * Add '\_' to the list of valid characters acceptable in package name + * Remove discover from test-requirements +- Switch to singlespec +- Use %license +- Drop unused BuildRequires + +------------------------------------------------------------------- +Wed Jul 20 05:44:20 UTC 2016 - tbechtold@suse.com + +- Initial packaging (version 2.0.0) + diff --git a/python-bindep.spec b/python-bindep.spec new file mode 100644 index 0000000..d8809db --- /dev/null +++ b/python-bindep.spec @@ -0,0 +1,91 @@ +# +# spec file for package python-bindep +# +# 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 +%{?sle15_python_module_pythons} +Name: python-bindep +Version: 2.13.0 +Release: 0 +Summary: Binary dependency utility +License: Apache-2.0 +URL: https://docs.opendev.org/opendev/bindep +Source: https://files.pythonhosted.org/packages/source/b/bindep/bindep-%{version}.tar.gz +BuildRequires: %{python_module pbr} +BuildRequires: %{python_module setuptools} +BuildRequires: alts +BuildRequires: fdupes +BuildRequires: openSUSE-release +BuildRequires: python-rpm-macros +Requires: alts +Requires: python-Parsley +Requires: python-distro >= 1.7.0 +Requires: python-packaging +Requires: python-pbr >= 2.0.0 +Suggests: python-distro < 1.7.0 +Suggests: python-packaging < 21.0 +BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module Parsley} +BuildRequires: %{python_module coverage >= 3.6} +BuildRequires: %{python_module distro >= 1.7.0} +BuildRequires: %{python_module fixtures >= 0.3.12} +BuildRequires: %{python_module hatchling} +BuildRequires: %{python_module packaging} +BuildRequires: %{python_module pbr >= 2.0.0} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module python-subunit} +BuildRequires: %{python_module testrepository >= 0.0.13} +BuildRequires: %{python_module testtools >= 0.9.27} +BuildRequires: %{python_module wheel} +# /SECTION +%python_subpackages + +%description +Bindep is a tool for checking the presence of binary packages needed to +use an application / library. It started life as a way to make it easier to set +up a development environment for OpenStack projects. While OpenStack depends +heavily on `pip` for installation of Python dependencies, some dependencies are +not Python based, and particularly for testing, some dependencies have to be +installed before `pip` can be used - such as `virtualenv` and `pip` itself. + +%prep +%autosetup -p1 -n bindep-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/bindep +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pytest -s -k 'not (test_arch_implies_pacman or test_manjaro_implies_pacman)' + +%pre +%python_libalternatives_reset_alternative bindep + +%files %{python_files} +%doc AUTHORS ChangeLog NEWS.rst README.rst +%license LICENSE +%python_alternative %{_bindir}/bindep +%{python_sitelib}/bindep +%{python_sitelib}/bindep-%{version}*info + +%changelog diff --git a/remove-mock.patch b/remove-mock.patch new file mode 100644 index 0000000..915ebab --- /dev/null +++ b/remove-mock.patch @@ -0,0 +1,32 @@ +Index: bindep-2.11.0/bindep/tests/test_main.py +=================================================================== +--- bindep-2.11.0.orig/bindep/tests/test_main.py ++++ bindep-2.11.0/bindep/tests/test_main.py +@@ -24,7 +24,10 @@ from fixtures import FakeLogger + from fixtures import Fixture + from fixtures import MonkeyPatch + from fixtures import TempDir +-import mock ++try: ++ from unittest import mock ++except ImportError: ++ import mock + from testtools import TestCase + + from bindep.__main__ import main +Index: bindep-2.11.0/bindep/tests/test_depends.py +=================================================================== +--- bindep-2.11.0.orig/bindep/tests/test_depends.py ++++ bindep-2.11.0/bindep/tests/test_depends.py +@@ -23,7 +23,10 @@ from textwrap import dedent + + import distro + import fixtures +-import mock ++try: ++ from unittest import mock ++except ImportError: ++ import mock + import ometa.runtime + from testtools import ExpectedException + from testtools.matchers import Contains From 4f0c17b3b090890200448f5d96aa370a52e2cfb13008cfd0ccc68d3141501581 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Wed, 18 Jun 2025 07:48:09 +0000 Subject: [PATCH 2/2] - Use multibuild for running tests OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bindep?expand=0&rev=19 --- _multibuild | 3 +++ python-bindep.changes | 5 +++++ python-bindep.spec | 26 +++++++++++++++++++++++--- 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 _multibuild 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-bindep.changes b/python-bindep.changes index e1a1b49..956c39a 100644 --- a/python-bindep.changes +++ b/python-bindep.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jun 18 07:47:52 UTC 2025 - Daniel Garcia + +- Use multibuild for running tests + ------------------------------------------------------------------- Tue Jun 17 07:58:12 UTC 2025 - Markéta Machová diff --git a/python-bindep.spec b/python-bindep.spec index d8809db..df2755c 100644 --- a/python-bindep.spec +++ b/python-bindep.spec @@ -16,9 +16,18 @@ # +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif + %bcond_without libalternatives %{?sle15_python_module_pythons} -Name: python-bindep +Name: python-bindep%{psuffix} Version: 2.13.0 Release: 0 Summary: Binary dependency utility @@ -26,7 +35,9 @@ License: Apache-2.0 URL: https://docs.opendev.org/opendev/bindep Source: https://files.pythonhosted.org/packages/source/b/bindep/bindep-%{version}.tar.gz BuildRequires: %{python_module pbr} +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: alts BuildRequires: fdupes BuildRequires: openSUSE-release @@ -39,6 +50,9 @@ Requires: python-pbr >= 2.0.0 Suggests: python-distro < 1.7.0 Suggests: python-packaging < 21.0 BuildArch: noarch + +%if %{with test} +BuildRequires: %{python_module bindep = %{version}} # SECTION test requirements BuildRequires: %{python_module Parsley} BuildRequires: %{python_module coverage >= 3.6} @@ -47,13 +61,13 @@ BuildRequires: %{python_module fixtures >= 0.3.12} BuildRequires: %{python_module hatchling} BuildRequires: %{python_module packaging} BuildRequires: %{python_module pbr >= 2.0.0} -BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} BuildRequires: %{python_module python-subunit} BuildRequires: %{python_module testrepository >= 0.0.13} BuildRequires: %{python_module testtools >= 0.9.27} -BuildRequires: %{python_module wheel} # /SECTION +%endif + %python_subpackages %description @@ -71,13 +85,18 @@ installed before `pip` can be used - such as `virtualenv` and `pip` itself. %pyproject_wheel %install +%if !%{with test} %pyproject_install %python_clone -a %{buildroot}%{_bindir}/bindep %python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif %check +%if %{with test} %pytest -s -k 'not (test_arch_implies_pacman or test_manjaro_implies_pacman)' +%endif +%if !%{with test} %pre %python_libalternatives_reset_alternative bindep @@ -87,5 +106,6 @@ installed before `pip` can be used - such as `virtualenv` and `pip` itself. %python_alternative %{_bindir}/bindep %{python_sitelib}/bindep %{python_sitelib}/bindep-%{version}*info +%endif %changelog