* add python-sphinx-hawkmoth

This commit is contained in:
Alexander Baldeck 2025-01-30 15:17:51 +01:00
parent ccc355d94a
commit f2b68ddc7a
5 changed files with 218 additions and 0 deletions

View File

@ -0,0 +1,31 @@
pkgbase = python-sphinx-hawkmoth
pkgdesc = Sphinx autodoc C extension
pkgver = 0.19.0
pkgrel = 2
url = https://github.com/jnikula/hawkmoth
arch = x86_64
arch = powerpc64le
arch = powerpc64
arch = powerpc
arch = riscv64
license = BSD-2-Clause
checkdepends = python-pytest
checkdepends = python-pytest-xdist
checkdepends = python-strictyaml
makedepends = git
makedepends = python-build
makedepends = python-hatchling
makedepends = python-installer
makedepends = python-setuptools
makedepends = python-wheel
depends = clang
depends = python
depends = python-docutils
depends = python-sphinx
source = git+https://github.com/jnikula/hawkmoth?signed#tag=v0.19.0
source = 0001-Reapply-test-query-system-include-args-from-clang.patch
validpgpkeys = 3FE6F7606966ED87707760B6A14C59DFEDB4CE88
b2sums = c3b816fcd8259ba64e2269926ff4120a385ea45be226a1f3ca91e61108b8086e0a72e39f1186a0cdf4e5f9dab5624268ac4d2e68c850b1d77305878cc6b51ae6
b2sums = 6fca617b2d07c8a16ad8606b53cf5469062b1630a5491647c4953613d3ed40e326a3dfdf5abba0789e70dd84a2908d9969178267b657efd07dc79e402fe4ec98
pkgname = python-sphinx-hawkmoth

View File

@ -0,0 +1,5 @@
[python-sphinx-hawkmoth]
source = "github"
github = "jnikula/hawkmoth"
use_max_tag = true
prefix = "v"

View File

@ -0,0 +1,66 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Fri, 1 Nov 2024 16:52:09 +0100
Subject: [PATCH] Reapply "test: query system include args from clang"
Still needed; Clang issue?
This reverts commit 124385241fbb3d3181a0420e56998d37cb328f1e.
---
test/conf.py | 6 ++++--
test/testenv.py | 5 +++++
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/test/conf.py b/test/conf.py
index 6b95fa7b75e9..7431b5d43b82 100644
--- a/test/conf.py
+++ b/test/conf.py
@@ -3,6 +3,8 @@
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
+from hawkmoth.util import compiler
+
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
@@ -32,8 +34,8 @@ pygments_style = None
# -- Options for Hawkmoth ----------------------------------------------------
# https://jnikula.github.io/hawkmoth/dev/extension.html#configuration
-hawkmoth_clang_c = ['-std=c17']
-hawkmoth_clang_cpp = ['-std=c++17']
+hawkmoth_clang_c = ['-std=c17'] + compiler.get_include_args()
+hawkmoth_clang_cpp = ['-std=c++17'] + compiler.get_include_args()
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
diff --git a/test/testenv.py b/test/testenv.py
index 77f6e88abeb8..9bf2f0224196 100644
--- a/test/testenv.py
+++ b/test/testenv.py
@@ -7,12 +7,15 @@ import sys
import pytest
import strictyaml
+from hawkmoth.util import compiler
from test import conf
testext = '.yaml'
testdir = os.path.dirname(os.path.abspath(__file__))
rootdir = os.path.dirname(testdir)
+_clang_include_args = compiler.get_include_args()
+
sys.path.insert(0, rootdir)
class Directive:
@@ -52,6 +55,8 @@ class Directive:
else:
clang_args.extend(getattr(conf, 'hawkmoth_clang_cpp', []))
+ clang_args.extend(_clang_include_args.copy())
+
clang_args.extend(self.options.get('clang', []))
return clang_args

View File

@ -0,0 +1,64 @@
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Bruno Santos <brunomanuelsantos@tecnico.ulisboa.pt>
pkgname=python-sphinx-hawkmoth
pkgver=0.19.0
pkgrel=2
pkgdesc="Sphinx autodoc C extension"
url="https://github.com/jnikula/hawkmoth"
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
license=(BSD-2-Clause)
depends=(
clang
python
python-docutils
python-sphinx
)
makedepends=(
git
python-build
python-hatchling
python-installer
python-setuptools
python-wheel
)
checkdepends=(
python-pytest
python-pytest-xdist
python-strictyaml
)
source=(
"git+https://github.com/jnikula/hawkmoth?signed#tag=v$pkgver"
0001-Reapply-test-query-system-include-args-from-clang.patch
)
b2sums=('c3b816fcd8259ba64e2269926ff4120a385ea45be226a1f3ca91e61108b8086e0a72e39f1186a0cdf4e5f9dab5624268ac4d2e68c850b1d77305878cc6b51ae6'
'6fca617b2d07c8a16ad8606b53cf5469062b1630a5491647c4953613d3ed40e326a3dfdf5abba0789e70dd84a2908d9969178267b657efd07dc79e402fe4ec98')
validpgpkeys=(
3FE6F7606966ED87707760B6A14C59DFEDB4CE88 # Jani Nikula <jani@nikula.org>
)
prepare() {
cd hawkmoth
# Unbreak tests. Clang issue?
git apply -3 ../0001-Reapply-test-query-system-include-args-from-clang.patch
}
build() {
cd hawkmoth
python -m build --wheel --no-isolation
}
check() {
cd hawkmoth
PYTHONPATH="$PWD/src" make test-verbose
}
package() {
cd hawkmoth
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}
# vim:set sw=2 sts=-1 et:

View File

@ -0,0 +1,52 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBE8z+2sBEADNByVdSdPQ0+CztvxXXkLB9HRXWmuT7GHdBj0DHyps9PxdOc96
XX4chpWHR8UaSBrfYMqghknIRBBOJM/cZpd6WrJf9NINcJhTjEdqmsgwoN2Ya4tA
cz/7du/r1lb0k/d+EVlFycqGq9j7CT5iGR6XCY09wPc3m2BHjMgVbHkC1EBax3JR
CiVa3VCOvhOIywe/dFQwYKsrtVjFWsf0/JmDw8dvlJfFA2ugKGCho3B8d1LFYCjC
kDWoe/RUT6IcEbCZ5IdtUfhve+PT04H+cEYA/gP4PEtctPLOfsFIomWqs4t3YlJ0
lODQE2i4J2zwDe/iiQhWEs5Bv/Vw3xYksoFQuoRRkizUMlO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