commit f1e0d0d8ef47eecc21cf9f59334178710f2be5d9545f5a189703bcc5c2aafd16 Author: Nico Krapp Date: Wed Jun 4 14:47:24 2025 +0000 - fix usage of libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-catkin-pkg?expand=0&rev=20 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/0.4.24.tar.gz b/0.4.24.tar.gz new file mode 100644 index 0000000..4443db1 --- /dev/null +++ b/0.4.24.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:57ea09fd51d9a67ccf5a0660a8f84794304182c4f644f27ad835a979567893b1 +size 65113 diff --git a/1.0.0.tar.gz b/1.0.0.tar.gz new file mode 100644 index 0000000..ddbbab8 --- /dev/null +++ b/1.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:48e88c995838807165bb70c6272abab2d6dda5efc210f62db8ac714d4c96a0c6 +size 67603 diff --git a/python-catkin-pkg-no-mock.patch b/python-catkin-pkg-no-mock.patch new file mode 100644 index 0000000..2d1d1e9 --- /dev/null +++ b/python-catkin-pkg-no-mock.patch @@ -0,0 +1,74 @@ +diff --git a/test/test_package.py b/test/test_package.py +index 98420c5..1a417b0 100644 +--- a/test/test_package.py ++++ b/test/test_package.py +@@ -20,7 +20,10 @@ + Person, + ) + +-from mock import Mock ++try: ++ from unittest.mock import Mock ++except ImportError: ++ from mock import Mock + + sys.stderr = sys.stdout + +diff --git a/test/test_package_version.py b/test/test_package_version.py +index 6265347..190802b 100644 +--- a/test/test_package_version.py ++++ b/test/test_package_version.py +@@ -9,7 +9,10 @@ + from catkin_pkg.package_version import update_changelog_sections + from catkin_pkg.package_version import update_versions + +-import mock ++try: ++ from unittest.mock import Mock ++except ImportError: ++ from mock import Mock + + from .util import in_temporary_directory + +@@ -69,7 +72,7 @@ def test_update_changelog_unicode(self, directory=None): + temp_file = os.path.join(directory, 'changelog') + missing_changelogs_but_forthcoming = {} + # Mock the Changelog object from catkin_pkg +- mock_changelog = mock.Mock() ++ mock_changelog = Mock() + # Create a changelog entry with a unicode char. + mock_changelog.rst = ('^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n' + 'Changelog for package fake_pkg\n' +diff --git a/test/test_templates.py b/test/test_templates.py +index 561ec28..164f1b1 100644 +--- a/test/test_templates.py ++++ b/test/test_templates.py +@@ -8,7 +8,10 @@ + create_cmakelists, create_package_files, create_package_xml, PackageTemplate + from catkin_pkg.python_setup import generate_distutils_setup + +-from mock import MagicMock, Mock ++try: ++ from unittest.mock import MagicMock, Mock ++except ImportError: ++ from mock import MagicMock, Mock + + + def u(line): +diff --git a/test/test_topological_order.py b/test/test_topological_order.py +index 651cb6b..88f44b4 100644 +--- a/test/test_topological_order.py ++++ b/test/test_topological_order.py +@@ -3,7 +3,10 @@ + import sys + import unittest + +-from mock import Mock ++try: ++ from mock import Mock ++except ImportError: ++ from unittest.mock import Mock + + try: + from catkin_pkg.topological_order import topological_order_packages, _PackageDecorator, \ + diff --git a/python-catkin-pkg.changes b/python-catkin-pkg.changes new file mode 100644 index 0000000..3eca244 --- /dev/null +++ b/python-catkin-pkg.changes @@ -0,0 +1,172 @@ +------------------------------------------------------------------- +Wed Jun 4 14:46:54 UTC 2025 - Nico Krapp + +- fix usage of libalternatives + +------------------------------------------------------------------- +Thu May 15 21:30:25 UTC 2025 - Matej Cepl + +- Add missing rpmlintrc to the SPEC file. + +------------------------------------------------------------------- +Thu May 15 13:00:20 UTC 2025 - Markéta Machová + +- Convert to pip-based build + +------------------------------------------------------------------- +Thu Dec 14 11:16:31 UTC 2023 - pgajdos@suse.com + +- deleted patches + - python-catkin-pkg-no-mock.patch (upstreamed) + +------------------------------------------------------------------- +Thu Dec 14 09:18:11 UTC 2023 - Petr Gajdos + +- update to 1.0.0: + * List 'ROS Infrastructure Team' as the package maintainer. + `#328 `_ + * Drop support for Python 2. `#354 `_ + * Move flake8 config to setup.cfg, address flake8 v6 + violations. `#356 `_ + * Contributors + * Scott K Logan + * Steven! Ragnarök + * 0.5.2 (2022-05-27) + * Use renamed function for getting multiple build types. `#342 + `_ + * Resolves `#341 `_ + * Contributors + * Steven! Ragnarök + * 0.5.1 (2022-05-10) + * Add API method for getting all build types regardless of + conditions. `#337 `_ + * Pass all string format arguments as a tuple. `#339 + `_ + * Resolves `#338 `_ + * Consider all build types when updating package versions. + `#340 `_ + * Resolves `#336 `_ + * Contributors + * Scott K Logan + * Steven! Ragnarök + * 0.5.0 (2022-05-10) + * Remove references to Travis CI. `#314 + `_ + * Drop python 2.7 on macOS. `#318 `_ + * Update release suites. `#317 `_ + * Use unittest.mock where possible. `#321 + `_ + * Declare test dependencies in extras_require.test. `#323 + `_ + * Drop support for Python < 2.7 (2.7 itself is still + supported). `#322 `_ + * Run tests with pytest instead of nose. `#324 + `_ + * Enable Python 3.10 tests, bump actions/setup-python. `#325 + `_ + * Mark linter test and declare cov/junit module name. `#327 + `_ + * Add plaintext_description field to Package. `#305 + `_ + * Use only first line of plaintext description in distutils + setup generation. `#326 `_ + * Update catkin_prepare_release to support setup.py files in + ament_python packages. `#331 `_ + * This pull requests introduces an API change! + * ``catkin_pkg.package_version.update_packages`` now takes the + full dict of package Paths: Package objects instead of just + the paths. + * Make filenames to be used as ignore markers configurable. + `#307 `_ + * Fix catkin_package_version after API change. `#333 + `_ + * Contributors + * Jan Strohbeck + * Scott K Logan + * Steven! Ragnarök + * Tomáš Hrnčiar + * William Woodall + +------------------------------------------------------------------- +Wed Mar 9 11:43:28 UTC 2022 - pgajdos@suse.com + +- do not require mock for build +- added patches + https://github.com/ros-infrastructure/catkin_pkg/commit/b5c6812b40fa31da91ee560dda7c6e470dedcfb8 + + python-catkin-pkg-no-mock.patch + +------------------------------------------------------------------- +Sat Jan 15 18:34:37 UTC 2022 - Dirk Müller + +- update to 0.4.24: + * stop using undocumented docutils api + * remove validate_metapacakge wrapper + * flake8 warnings + * test fixes + * add option to show only merge commits + * compare dependencies with all attributes + +------------------------------------------------------------------- +Wed Jul 29 04:04:09 UTC 2020 - Steve Kowalik + +- Update to 0.4.22: + * catkin_generate_changelog: hack to allow tag version prefixed with v + * add GitLab auto linking for issues in catkin_generate_changelog + * enable releasing from Focal with stdeb 0.9.1 + * fix deprecation warnings in tests + * pass stricter pycodestyle 2.6 checks + * Restore compatibility with pyparsing < 1.5.7 + * Respect (AMENT|COLCON|CATKIN)_IGNORE directories + * bump min CMake version to avoid CMP0048 warning + * Fix travis warning + * use parse actions to evaluate conditions + * Speed up topological_order by using a per-package cache of all run_depends + * Fix crash with pyparsing 3 + * [enhancement]evaluating more than 1 condition fixes #277 + * exclude Signed-off-by: lines from changelog + * Changes 'install' to 'catkin_install_python' in the CMakeLists.txt template + +------------------------------------------------------------------- +Wed May 27 09:36:36 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative +- use %pytest + +------------------------------------------------------------------- +Mon Mar 30 12:51:38 UTC 2020 - Marketa Calabkova + +- update to 0.4.16 + * add Python 3.7 and 3.8 to Travis matrix + * allow different CMake minimum version in metapackage + +------------------------------------------------------------------- +Fri Jan 24 11:34:31 UTC 2020 - Marketa Calabkova + +- update to 0.4.15 + * small fixes + +------------------------------------------------------------------- +Sat Aug 3 07:34:09 UTC 2019 - Tomáš Chvátal + +- Update to 0.4.13: + * small fixes +- Fix download url + +------------------------------------------------------------------- +Thu Jul 11 19:26:29 UTC 2019 - Andreas Färber + +- Initial (v0.4.12) diff --git a/python-catkin-pkg.rpmlintrc b/python-catkin-pkg.rpmlintrc new file mode 100644 index 0000000..e93cfd1 --- /dev/null +++ b/python-catkin-pkg.rpmlintrc @@ -0,0 +1,2 @@ +addFilter("alternative-generic-name-missing") +addFilter("alternative-link-missing") diff --git a/python-catkin-pkg.spec b/python-catkin-pkg.spec new file mode 100644 index 0000000..f6885ad --- /dev/null +++ b/python-catkin-pkg.spec @@ -0,0 +1,91 @@ +# +# spec file for package python-catkin-pkg +# +# 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 +%define commands create_pkg find_pkg generate_changelog package_version prepare_release tag_changelog test_changelog +Name: python-catkin-pkg +Version: 1.0.0 +Release: 0 +Summary: Catkin package library +License: BSD-3-Clause +URL: https://wiki.ros.org/catkin_pkg +Source0: https://github.com/ros-infrastructure/catkin_pkg/archive/%{version}.tar.gz +Source99: python-catkin-pkg.rpmlintrc +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: alts +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: alts +Requires: python-docutils +Requires: python-pyparsing +Requires: python-python-dateutil +Requires: python-setuptools +BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module docutils} +BuildRequires: %{python_module flake8} +BuildRequires: %{python_module pyparsing} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module python-dateutil} +# /SECTION +%python_subpackages + +%description +Library for retrieving information about catkin packages. + +%prep +%autosetup -p1 -n catkin_pkg-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +for c in %{commands}; do + %python_clone -a %{buildroot}%{_bindir}/catkin_$c +done +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +export PYTHONPATH=$PWD/src +# flake8 line length checks failing (E501) +%pytest -k 'not test_flake8' + +%pre +# If libalternatives is used: Removing old update-alternatives entries. +for c in %{commands}; do + %python_libalternatives_reset_alternative catkin_$c +done + +# post and postun macro call is not needed with only libalternatives + +%files %{python_files} +%license LICENSE +%python_alternative %{_bindir}/catkin_create_pkg +%python_alternative %{_bindir}/catkin_find_pkg +%python_alternative %{_bindir}/catkin_generate_changelog +%python_alternative %{_bindir}/catkin_package_version +%python_alternative %{_bindir}/catkin_prepare_release +%python_alternative %{_bindir}/catkin_tag_changelog +%python_alternative %{_bindir}/catkin_test_changelog +%{python_sitelib}/catkin_pkg +%{python_sitelib}/catkin_pkg*-info + +%changelog