py-itables: update to 2.8.1; add py31x subports; assume maintainership

This commit is contained in:
Marius Schamschula
2026-06-30 15:58:29 -05:00
parent a21c249194
commit 9999d7e1d9
6 changed files with 154 additions and 14 deletions
+77 -14
View File
@@ -1,37 +1,100 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
PortGroup github 1.0
PortGroup python 1.0
name py-itables
version 2.2.3
github.setup mwouts itables 2.8.1 v
github.tarball_from archive
revision 0
categories-append math
platforms {darwin any}
supported_archs noarch
license MIT
maintainers nomaintainer
maintainers {mps @Schamschula} openmaintainer
description Pandas and Polar DataFrames as interactive DataTables
long_description {*}${description}
homepage https://mwouts.github.io/itables/
checksums rmd160 a4061865e47ac017516f1f94bedbe0b3661b77c1 \
sha256 d1987c2f69b348d63d8184c30e05bd25710997a37894cf7b57b6e0a4ea969c10 \
size 2436125
checksums rmd160 c056b44e77dfae591395a723b69f0dcbb532a1c9 \
sha256 4f2e43000216bc53ee5db9d3381e3baad24af35d4295107fc0d4f4bc9b8e68e6 \
size 1249483
python.versions 312
python.pep517_backend hatch
python.versions 311 312 313 314
python.pep517_backend \
hatch
if {${name} ne ${subport}} {
depends_build-append \
port:py${python.version}-hatch-jupyter-builder \
path:bin/npm:npm10
port:py${python.version}-hatch-jupyter-builder
depends_lib-append \
port:py${python.version}-anywidget \
port:py${python.version}-dash \
port:py${python.version}-ipython \
port:py${python.version}-marimo \
port:py${python.version}-narwhals \
port:py${python.version}-numpy \
port:py${python.version}-pandas
port:py${python.version}-pandas \
port:py${python.version}-pyarrow \
port:py${python.version}-traitlets \
port:py${python.version}-typeguard
if {${python.version} < 311} {
depends_lib-append \
port:py${python.version}-typing_extensions
}
platform darwin {
if {${os.major} > 21} {
depends_lib-append \
port:nodejs24
}
if {${os.major} > 18 && ${os.major} < 22} {
depends_lib-append \
port:nodejs22
}
if {${os.major} > 15 && ${os.major} < 19} {
depends_lib-append \
port:nodejs20
}
if {${os.major} > 10 && ${os.major} < 16} {
depends_lib-append \
port:nodejs16
}
if {${os.major} > 15} {
depends_build-append \
port:npm11
}
if {${os.major} > 12 && ${os.major} < 16} {
depends_build-append \
port:npm9
}
if {${os.major} < 13} {
depends_build-append \
port:npm8
}
}
patchfiles patch-pyproject.toml.diff \
patch-packages-dt_for_itables-package.json.diff \
patch-packages-itables_anywidget-package.json.diff \
patch-packages-itables_for_dash-package.json.diff
post-patch {
reinplace "s|%PREFIX%|${prefix}|g" \
${worksrcpath}/packages/dt_for_itables/package.json \
${worksrcpath}/packages/itables_anywidget/package.json \
${worksrcpath}/packages/itables_for_dash/package.json
reinplace "s|%PYTHONBR%|${python.branch}|g" \
${worksrcpath}/packages/dt_for_itables/package.json \
${worksrcpath}/packages/itables_for_dash/package.json
}
variant polars {
depends_lib-append \
port:py${python.version}-polars
}
}
@@ -0,0 +1,16 @@
--- packages/dt_for_itables/package.json.orig 2026-06-10 17:24:31
+++ packages/dt_for_itables/package.json 2026-06-30 14:44:02
@@ -18,10 +18,10 @@
"scripts": {
"build:js": "esbuild src/index.js --format=esm --bundle --outfile=dt_bundle.js --minify",
"build:css": "esbuild src/index.css --bundle --outfile=dt_bundle.css --minify",
- "add_host": "python add_host_to_root.py dt_bundle.css",
- "build:all": "npm run build:js && npm run build:css && npm run add_host",
+ "add_host": "python%PYTHONBR% add_host_to_root.py dt_bundle.css",
+ "build:all": "%PREFIX%/bin/npm run build:js && %PREFIX%/bin/npm run build:css && %PREFIX%/bin/npm run add_host",
"install:all": "cp dt_bundle.js dt_bundle.css ../../src/itables/html",
- "build": "npm run build:all && npm run install:all"
+ "build": "%PREFIX%/bin/npm run build:all && %PREFIX%/bin/npm run install:all"
},
"author": "Marc Wouts",
"license": "MIT",
@@ -0,0 +1,14 @@
--- packages/itables_anywidget/package.json.orig 2026-06-10 17:24:31
+++ packages/itables_anywidget/package.json 2026-06-30 14:44:30
@@ -1,9 +1,9 @@
{
"scripts": {
- "dev": "npm run build -- --sourcemap=inline --watch",
+ "dev": "%PREFIX%/bin/npm run build -- --sourcemap=inline --watch",
"build:js": "esbuild js/widget.ts --format=esm --bundle --minify --outdir=../../src/itables/widget/static",
"build:css": "esbuild js/widget.css --bundle --minify --outdir=../../src/itables/widget/static",
- "build": "npm run build:js && npm run build:css",
+ "build": "%PREFIX%/bin/npm run build:js && %PREFIX%/bin/npm run build:css",
"typecheck": "tsc --noEmit"
},
"dependencies": {
@@ -0,0 +1,14 @@
--- packages/itables_for_dash/package.json.orig 2026-06-10 17:24:31
+++ packages/itables_for_dash/package.json 2026-06-30 14:59:05
@@ -5,9 +5,9 @@
"main": "build/index.js",
"scripts": {
"build:js": "webpack --mode production",
- "build:backends": "dash-generate-components src/lib/components itables_for_dash -p package-info.json",
+ "build:backends": "dash-generate-components-%PYTHONBR% src/lib/components itables_for_dash -p package-info.json",
"move": "mv itables_for_dash/* ../../src/itables_for_dash && rmdir itables_for_dash",
- "build": "npm run build:js && npm run build:backends && npm run move"
+ "build": "%PREFIX%/bin/npm run build:js && %PREFIX%/bin/npm run build:backends && %PREFIX%/bin/npm run move"
},
"author": "Marc Wouts <marc.wouts@gmail.com>",
"license": "MIT",
@@ -0,0 +1,11 @@
--- packages/itables_for_streamlit/package.json.orig 2026-06-10 17:24:31
+++ packages/itables_for_streamlit/package.json 2026-06-30 14:47:39
@@ -13,7 +13,7 @@
"scripts": {
"build:js": "esbuild src/index.tsx --bundle --minify --format=esm --outdir=../../src/itables/itables_for_streamlit",
"build:css": "esbuild src/index.css --bundle --outdir=../../src/itables/itables_for_streamlit",
- "build": "npm run build:js && npm run build:css",
+ "build": "%PREFIX%/bin/npm run build:js && %PREFIX%/bin/npm run build:css",
"typecheck": "tsc --noEmit"
}
}
@@ -0,0 +1,22 @@
--- pyproject.toml.orig 2020-02-01 18:00:00
+++ pyproject.toml 2026-06-30 13:32:38
@@ -43,7 +43,8 @@
dash = ["dash", "typing-extensions"]
streamlit = ["streamlit"]
marimo = ["marimo"]
-other_dataframes = ["narwhals", "pyarrow", "modin[dask]"]
+# other_dataframes = ["narwhals", "pyarrow", "modin[dask]"]
+other_dataframes = ["narwhals", "pyarrow"]
config = ["tomli;python_version<\"3.11\"", "platformdirs"]
typing = ["typing_extensions;python_version<\"3.11\""]
@@ -51,7 +52,8 @@
samples = ["pytz", "world_bank_data"]
-all = ["itables[config,pandas,polars,style,narwhals,other_dataframes,samples,notebook,widget,dash,shiny,streamlit,marimo,typing,check_type]"]
+# all = ["itables[config,pandas,polars,style,narwhals,other_dataframes,samples,notebook,widget,dash,shiny,streamlit,marimo,typing,check_type]"]
+all = ["itables[config,pandas,style,narwhals,other_dataframes,notebook,widget,marimo,typing,check_type]"]
test-base = [
"itables",
# Pytest