diff options
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | PKGBUILD | 20 | ||||
-rw-r--r-- | exclude-packages.patch | 18 | ||||
-rw-r--r-- | fix-sphinx-issues.patch | 31 | ||||
-rw-r--r-- | latex-engine.patch | 11 |
6 files changed, 34 insertions, 64 deletions
@@ -1,7 +1,7 @@ pkgbase = python-xhtml2pdf pkgdesc = A library for converting HTML into PDFs using ReportLab - pkgver = 0.2.11 - pkgrel = 4 + pkgver = 0.2.13 + pkgrel = 1 url = https://github.com/xhtml2pdf/xhtml2pdf arch = any license = Apache @@ -25,11 +25,10 @@ pkgbase = python-xhtml2pdf depends = python-pypdf depends = python-reportlab depends = python-svglib - source = python-xhtml2pdf-0.2.11.tar.gz::https://github.com/xhtml2pdf/xhtml2pdf/archive/refs/tags/v0.2.11.tar.gz - source = latex-engine.patch - source = fix-sphinx-issues.patch - sha256sums = 198a7c78d4233322802cf57a554a92db78f30c7fa485a25cdb93713812f1f9ad - sha256sums = 19d631ba04ae7d42e6c95962df1bc99edf84c80920539bb8aa2fc7f2f6c53589 - sha256sums = a76ae6df2bc2103038a416e16f8eb41d2a3fcf4e813a075a6c0a5d38b50895d0 + depends = python-typing_extensions + source = python-xhtml2pdf-0.2.13.tar.gz::https://github.com/xhtml2pdf/xhtml2pdf/archive/refs/tags/v0.2.13.tar.gz + source = exclude-packages.patch + sha256sums = 549b73ec2d79da002bb81911fa3d8f6d8877ea7aa2af3a080a3d8882f90b5113 + sha256sums = 9553544f4151f5d4facfe02fdcd43fb9dba78dc5ec4afc9e8a17073ad3d78a5d pkgname = python-xhtml2pdf diff --git a/.gitignore b/.gitignore index 8838d091b40b..a9320c5dba0e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,4 @@ !.gitignore !PKGBUILD !.SRCINFO -!fix-sphinx-issues.patch -!latex-engine.patch +!exclude-packages.patch @@ -4,8 +4,8 @@ pkgname=python-xhtml2pdf _name=${pkgname#python-} -pkgver=0.2.11 -pkgrel=4 +pkgver=0.2.13 +pkgrel=1 pkgdesc="A library for converting HTML into PDFs using ReportLab" arch=(any) url="https://github.com/xhtml2pdf/xhtml2pdf" @@ -22,6 +22,7 @@ depends=( python-pypdf python-reportlab python-svglib + python-typing_extensions ) makedepends=( python-build @@ -40,13 +41,11 @@ checkdepends=( source=( "$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v${pkgver}.tar.gz" - "latex-engine.patch" - "fix-sphinx-issues.patch" + "exclude-packages.patch" ) sha256sums=( - '198a7c78d4233322802cf57a554a92db78f30c7fa485a25cdb93713812f1f9ad' - '19d631ba04ae7d42e6c95962df1bc99edf84c80920539bb8aa2fc7f2f6c53589' - 'a76ae6df2bc2103038a416e16f8eb41d2a3fcf4e813a075a6c0a5d38b50895d0' + '549b73ec2d79da002bb81911fa3d8f6d8877ea7aa2af3a080a3d8882f90b5113' + '9553544f4151f5d4facfe02fdcd43fb9dba78dc5ec4afc9e8a17073ad3d78a5d' ) _archive="$_name-$pkgver" @@ -54,11 +53,7 @@ _archive="$_name-$pkgver" prepare() { cd "$_archive" - patch --forward --strip=1 --input="${srcdir}/latex-engine.patch" - patch --forward --strip=1 --input="${srcdir}/fix-sphinx-issues.patch" - - sed -i '/with-coverage/d' setup.cfg - sed -i '/coverage-package/d' setup.cfg + patch --forward --strip=1 --input="${srcdir}/exclude-packages.patch" } build() { @@ -66,6 +61,7 @@ build() { python -m build --wheel --no-isolation + export PYTHONPATH=$PWD/docs/source:$PWD (cd docs && make html) (cd docs && make man) } diff --git a/exclude-packages.patch b/exclude-packages.patch new file mode 100644 index 000000000000..500ee914e6b2 --- /dev/null +++ b/exclude-packages.patch @@ -0,0 +1,18 @@ +diff --unified --recursive --text xhtml2pdf-0.2.13.orig/pyproject.toml xhtml2pdf-0.2.13/pyproject.toml +--- xhtml2pdf-0.2.13.orig/pyproject.toml 2023-11-11 11:10:18.591303923 +0100 ++++ xhtml2pdf-0.2.13/pyproject.toml 2023-11-11 11:10:58.961431424 +0100 +@@ -86,7 +86,13 @@ + version = {attr = "xhtml2pdf.__version__"} + + [tool.setuptools.packages.find] +-exclude = ["tests", "tests.*", "manual_test", "manual_test.*"] ++exclude = [ ++ "tests", "tests.*", ++ "manual_test", "manual_test.*", ++ "demo", "demo.*", ++ "testrender", "testrender.*", ++ "docs", "docs.*", ++] + + + [tool.tox] diff --git a/fix-sphinx-issues.patch b/fix-sphinx-issues.patch deleted file mode 100644 index ace6063511d8..000000000000 --- a/fix-sphinx-issues.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --unified --recursive --text xhtml2pdf-0.2.11.orig/docs/source/conf.py xhtml2pdf-0.2.11/docs/source/conf.py ---- xhtml2pdf-0.2.11.orig/docs/source/conf.py 2023-07-24 21:56:50.661484433 +0200 -+++ xhtml2pdf-0.2.11/docs/source/conf.py 2023-07-24 21:57:34.611687595 +0200 -@@ -44,8 +44,8 @@ - - - # Shortening external links. Here: issue & PR tracker of GitHub --extlinks = {'issue': ('https://github.com/xhtml2pdf/xhtml2pdf/issues/%s', '#'), -- 'pr': ('https://github.com/xhtml2pdf/xhtml2pdf/pull/%s', '#')} -+extlinks = {'issue': ('https://github.com/xhtml2pdf/xhtml2pdf/issues/%s', 'issue %s'), -+ 'pr': ('https://github.com/xhtml2pdf/xhtml2pdf/pull/%s', 'pr %s')} - - # Add any paths that contain templates here, relative to this directory. - templates_path = ['_templates'] -@@ -82,7 +82,7 @@ - # - # This is also used if you do content translation via gettext catalogs. - # Usually you set "language" from the command line for these cases. --language = None -+language = 'en' - - # There are two options for replacing |today|: either, you set today to some - # non-false value, then it is used: -@@ -443,6 +443,6 @@ - - - # Example configuration for intersphinx: refer to the Python standard library. --intersphinx_mapping = {'https://docs.python.org/': None} -+intersphinx_mapping = {'python': ('https://docs.python.org/3/', None)} - import build_samples as bs - bs.build_resources() diff --git a/latex-engine.patch b/latex-engine.patch deleted file mode 100644 index 2048f46d3d6c..000000000000 --- a/latex-engine.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff '--color=auto' --unified --recursive --text xhtml2pdf-0.2.7/docs/source/conf.py xhtml2pdf-0.2.7_patched/docs/source/conf.py ---- xhtml2pdf-0.2.7/docs/source/conf.py 2022-04-01 00:40:27.000000000 +0200 -+++ xhtml2pdf-0.2.7_patched/docs/source/conf.py 2022-06-07 09:10:11.796716045 +0200 -@@ -254,6 +254,7 @@ - htmlhelp_basename = 'xhtml2pdfdoc' - - # -- Options for LaTeX output --------------------------------------------- -+latex_engine = 'xelatex' - - latex_elements = { - # The paper size ('letterpaper' or 'a4paper'). |