From 61e2007ff068eab9b3f7ec79999c2b0b7c63f7be29edac34cdd6e2a67a8b9456 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Wed, 22 Jan 2025 00:59:43 +0000 Subject: [PATCH] - Switch to pyproject macros. - No more greedy globs in %files. - Explicitly BuildRequire sphinx_rtd_theme. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-abimap?expand=0&rev=14 --- .gitattributes | 23 ++++++++++ .gitignore | 1 + abimap-0.3.2.tar.gz | 3 ++ python-abimap.changes | 61 +++++++++++++++++++++++++ python-abimap.spec | 102 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 190 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 abimap-0.3.2.tar.gz create mode 100644 python-abimap.changes create mode 100644 python-abimap.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/abimap-0.3.2.tar.gz b/abimap-0.3.2.tar.gz new file mode 100644 index 0000000..ba74f42 --- /dev/null +++ b/abimap-0.3.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:85797f8c99ca240c43130dbd3b51b85d7772735164d4299f9b453b98bf84559a +size 51744 diff --git a/python-abimap.changes b/python-abimap.changes new file mode 100644 index 0000000..7e87670 --- /dev/null +++ b/python-abimap.changes @@ -0,0 +1,61 @@ +------------------------------------------------------------------- +Wed Jan 22 00:59:09 UTC 2025 - Steve Kowalik + +- Switch to pyproject macros. +- No more greedy globs in %files. +- Explicitly BuildRequire sphinx_rtd_theme. + +------------------------------------------------------------------- +Thu Dec 9 12:46:25 UTC 2021 - pgajdos@suse.com + +- pytest-runner is not required for build + +------------------------------------------------------------------- +Wed May 27 09:35:56 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + +------------------------------------------------------------------- +Thu Aug 22 08:35:33 UTC 2019 - Tomáš Chvátal + +- Drop no longer needed abimap-0.3.0-disable-pytest-console-script-tests.patch + and properly depend on pytest-console-scripts + +------------------------------------------------------------------- +Thu Aug 22 08:28:28 UTC 2019 - Tomáš Chvátal + +- Update to 0.3.2: + * Fixed broken builds due to changes in warning output + * Changed tests to check error messages + * Added python 3.7 to testing matrix + * Added requirement to verify SNI when checking URLs in docs + +------------------------------------------------------------------- +Mon Aug 20 14:34:59 UTC 2018 - tchvatal@suse.com + +- Just require python-setuptools not use macros as it gets auto-expanded + by lua parser properly + +------------------------------------------------------------------- +Mon Aug 20 08:59:29 UTC 2018 - asn@cryptomilk.org + +- Update to version 0.3.1 + * Fixed bug when sorting releases: the older come first + * Added missing runtime requirement for setuptools + * Added manpage generation + +------------------------------------------------------------------- +Wed Aug 8 17:50:53 UTC 2018 - asn@cryptomilk.org + +- Add missing Requires for python-setuptools +- Remove noarch from doc (the whole package is noarch) +- Remove unneeded build require on python-devel + +------------------------------------------------------------------- +Fri Aug 3 15:40:38 UTC 2018 - asn@cryptomilk.org + +- Initial package +- Add abimap-0.3.0-disable-pytest-console-script-tests.patch + * We need to disable the pytest-console-script tests temporarily. The package + can't be built yet as the tests are not working. The upstream maintainer of + pytest-console-script is aware. diff --git a/python-abimap.spec b/python-abimap.spec new file mode 100644 index 0000000..c50cae7 --- /dev/null +++ b/python-abimap.spec @@ -0,0 +1,102 @@ +# +# spec file for package python-abimap +# +# 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/ +# + + +Name: python-abimap +Version: 0.3.2 +Release: 0 +Summary: A helper for library maintainers to use symbol versioning +License: MIT +URL: https://github.com/ansasaki/abimap +Source: https://files.pythonhosted.org/packages/source/a/abimap/abimap-%{version}.tar.gz +BuildRequires: %{python_module Sphinx} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module sphinx_rtd_theme} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-setuptools +Requires(post): update-alternatives +Requires(postun): update-alternatives +BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module PyYAML} +BuildRequires: %{python_module pytest-console-scripts} +BuildRequires: %{python_module pytest-cov} +BuildRequires: %{python_module pytest} +# /SECTION +%python_subpackages + +%description +This script allows to generate and update symbol version linker scripts which +adds version information to the exported symbols. The script is intended to be +integrated as part of a shared library build to check for changes in the set of +exported symbols and update the symbol version linker script accordingly. + +%package doc +Summary: Symbol versioning helper (Documentation) + +%description doc +Documentation for the symbol versioning helper %{name} + +%prep +%setup -q -n abimap-%{version} +# https://github.com/ansasaki/abimap/issues/87 +sed -i 's:pytest-runner::' setup.py + +%build +%pyproject_wheel + +PYTHONPATH=${PWD}/src:${PWD}/tests sphinx-build docs html +PYTHONPATH=${PWD}/src:${PWD}/tests sphinx-build -E -b man docs man + +%install +%pyproject_install + +rm -rf html/.{doctrees,buildinfo} + +install -d -m 0755 %{buildroot}%{_mandir}/man1 +install -m 0644 man/abimap.1 %{buildroot}%{_mandir}/man1/ + +%python_clone -a %{buildroot}%{_mandir}/man1/abimap.1 +%python_clone -a %{buildroot}%{_bindir}/abimap + +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%make_build -j1 -C tests ABIMAP_NAME_VERSION="abimap-%{version}" ABIMAP_VERSION="%{version}" +%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib}:${PWD}/tests py.test-%{$python_version} -vv tests -k 'not test_main' + +%post +%python_install_alternative abimap abimap.1 + +%postun +%python_uninstall_alternative abimap + +%files %{python_files} +%doc AUTHORS.rst CHANGELOG.rst README.rst +%license LICENSE +%python_alternative %{_bindir}/abimap +%python_alternative %{_mandir}/man1/abimap.1%{?ext_man} +%{python_sitelib}/abimap +%{python_sitelib}/abimap-%{version}.dist-info + +%files %{python_files doc} +%doc html +%license LICENSE + +%changelog