initial import

This commit is contained in:
2025-06-22 20:39:04 -05:00
commit f8a70886f0
3428 changed files with 302546 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
From f7e354798b944bc2d3abbd30cb81f7235826deb6 Mon Sep 17 00:00:00 2001
From: Takeshi KOMIYA <i.tkomiya@gmail.com>
Date: Sun, 6 Oct 2019 22:50:44 +0900
Subject: [PATCH] Fix mypy-0.730 violations
---
sphinxcontrib/__init__.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/sphinxcontrib/__init__.py b/sphinxcontrib/__init__.py
index 68c04af..54b09d4 100644
--- a/sphinxcontrib/__init__.py
+++ b/sphinxcontrib/__init__.py
@@ -1,2 +1,5 @@
# -*- coding: utf-8 -*-
-__import__('pkg_resources').declare_namespace(__name__)
+import pkg_resources
+
+
+pkg_resources.declare_namespace(__name__)

View File

@@ -0,0 +1,41 @@
From 631ef5fb4a52129895de47711f68bf3b663a51bb Mon Sep 17 00:00:00 2001
From: Takeshi KOMIYA <i.tkomiya@gmail.com>
Date: Mon, 13 Jan 2020 00:52:10 +0900
Subject: [PATCH] Fix mypy violations
---
setup.cfg | 1 +
sphinxcontrib/jsmath/__init__.py | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/setup.cfg b/setup.cfg
index 821a6c9..2d93352 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -27,3 +27,4 @@ exclude = .git,.tox,.venv
[mypy]
ignore_missing_imports = True
+strict_optional = False
diff --git a/sphinxcontrib/jsmath/__init__.py b/sphinxcontrib/jsmath/__init__.py
index 1ce675d..2ffef84 100644
--- a/sphinxcontrib/jsmath/__init__.py
+++ b/sphinxcontrib/jsmath/__init__.py
@@ -65,7 +65,7 @@ def html_visit_displaymath(self: HTMLTranslator, node: nodes.math_block) -> None
def install_jsmath(app: Sphinx, env: BuildEnvironment) -> None:
if app.builder.format != 'html' or app.builder.math_renderer_name != 'jsmath': # type: ignore # NOQA
return
- if not app.config.jsmath_path:
+ if not app.config.jsmath_path: # type: ignore
raise ExtensionError('jsmath_path config value must be set for the '
'jsmath extension to work')
@@ -73,7 +73,7 @@ def install_jsmath(app: Sphinx, env: BuildEnvironment) -> None:
domain = cast(MathDomain, env.get_domain('math'))
if domain.has_equations():
# Enable jsmath only if equations exists
- builder.add_js_file(app.config.jsmath_path)
+ builder.add_js_file(app.config.jsmath_path) # type: ignore
def setup(app: Sphinx) -> Dict[str, Any]:

View File

@@ -0,0 +1,44 @@
# Maintainer: Jesus E. <heckyel@riseup.net>
_srcname=sphinxcontrib-jsmath
pkgname=python-sphinxcontrib-jsmath
pkgver=1.0.1
pkgrel=0
pkgdesc='Sphinx extension which renders display math in HTML via JavaScript'
arch=('any')
url='https://github.com/sphinx-doc/sphinxcontrib-jsmath'
license=('Simplified-BSD')
makedepends=('python-setuptools')
# checkdepends=('python-pytest' 'python-sphinx')
source=("$pkgname-$pkgver.tar.gz::https://github.com/sphinx-doc/sphinxcontrib-jsmath/archive/$pkgver.tar.gz"
'000-fix-mypy-violations-1.patch'
'001-fix-mypy-violations-2.patch')
sha512sums=('7ebe70475c0a2c5f6626daf2171ccb8886fe24111988c625d16a32efc33ec62c487d8b34e6cdf4147ec0e4174db7f36c9acd8384249c85b0ef5dd8dc1b8b7a43'
'aa5921d9d4005b57a646d7261270baf55f8c0bad51c4d3472af7e60d97d38ff075c7b5624ca3a4e401afea64ae9409accc13268ba288a8845a1555da13be9fb8'
'8c1159f7f5398c75b903bc31048e8eacc1a6ed50a1d3765bc3212ec52d23bfa2a31ccb7bbb196f3aa909afc541f00cdaf043b44d5e95d8bbc9dc3918b6fc87b3')
prepare() {
cd $_srcname-$pkgver
patch -Np1 -i "$srcdir/000-fix-mypy-violations-1.patch"
patch -Np1 -i "$srcdir/001-fix-mypy-violations-2.patch"
}
build() {
cd $_srcname-$pkgver
python setup.py build
}
# check() {
# cd $_srcname-$pkgver
# pytest
# }
package() {
cd $_srcname-$pkgver
python setup.py install --root="$pkgdir" --optimize=1 --skip-build
# License
install -d "$pkgdir/usr/share/licenses/$pkgname"
install -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
# vim:set ts=2 sw=2 et: