Skip to content
Open
2 changes: 1 addition & 1 deletion common/build-helper/python3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [ -n "$CROSS_BUILD" ]; then
export CXX="${XBPS_CROSS_TRIPLET}-g++ -pthread $CXXFLAGS $LDFLAGS"
export LDSHARED="${CC} -shared $LDFLAGS"
export PYTHON_CONFIG="${XBPS_CROSS_BASE}/usr/bin/python3-config"
export PYTHONPATH="${XBPS_CROSS_BASE}/${py3_lib}"
export PYTHONPATH="${XBPS_CROSS_BASE}/${py3_lib}:${PYTHONPATH}"
for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
[ -f "$f" ] || continue
f=${f##*/}
Expand Down
3 changes: 2 additions & 1 deletion common/environment/build-style/python3-pep517.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
lib32disabled=yes
hostmakedepends+=" python3-build python3-installer"
hostmakedepends+=" python3-build python3-installer-bootstrap"
if [ -z "$nopyprovides" ] || [ -z "$noverifypydeps" ]; then
hostmakedepends+=" python3-packaging-bootstrap"
fi
build_helper+=" python3"
export PYTHONPATH="${PYTHONPATH}:/${py3_sitelib}-bootstrap"
22 changes: 22 additions & 0 deletions srcpkgs/flit/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Template file for 'flit'
pkgname=flit
version=4.0.2
revision=1
build_style=python3-pep517
# these tests try to use system pip
make_check_args="-k not((test_install_data_dir)or(test_install_module_pep621)or(test_symlink_data_dir)or(test_symlink_module_pep621))"
hostmakedepends="python3-flit_core python3-installer"
depends="python3-flit_core python3-requests python3-docutils python3-tomli-w
python3-pip"
checkdepends="$depends python3-pytest python3-testpath python3-responses"
short_desc="Simplified packaging of Python modules"
maintainer="classabbyamp <void@placeviolette.net>"
license="BSD-3-Clause"
homepage="https://flit.pypa.io"
changelog="https://flit.pypa.io/en/stable/history.html"
distfiles="${PYPI_SITE}/f/flit/flit-${version}.tar.gz"
checksum=232bc4317279e8952eca9fb3f5e000d8395d693b39c105b99f619ce461e1da85

post_install() {
vlicense LICENSE
}
9 changes: 9 additions & 0 deletions srcpkgs/img2pdf/patches/allow-flit-versions.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,5 +1,5 @@
[build-system]
-requires = ["flit_core >=3.2,<4"]
+requires = ['flit_core']
build-backend = "flit_core.buildapi"

[project]
11 changes: 11 additions & 0 deletions srcpkgs/python3-Flask/patches/allow-flit-versions.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -84,7 +84,7 @@
flask = "flask.cli:main"

[build-system]
-requires = ["flit_core<4"]
+requires = ['flit_core']
build-backend = "flit_core.buildapi"

[tool.flit.module]
11 changes: 11 additions & 0 deletions srcpkgs/python3-Jinja2/patches/allow-flit-versions.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -33,7 +33,7 @@
jinja2 = "jinja2.ext:babel_extract[i18n]"

[build-system]
-requires = ["flit_core<4"]
+requires = ['flit_core']
build-backend = "flit_core.buildapi"

[tool.flit.module]
9 changes: 9 additions & 0 deletions srcpkgs/python3-MyST-Parser/patches/allow-flit-versions.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,5 +1,5 @@
[build-system]
-requires = ["flit_core >=3.4,<4"]
+requires = ['flit_core']
build-backend = "flit_core.buildapi"

[project]
4 changes: 3 additions & 1 deletion srcpkgs/python3-MyST-Parser/template
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Template file for 'python3-MyST-Parser'
pkgname=python3-MyST-Parser
version=3.0.1
revision=3
revision=4
build_style=python3-pep517
hostmakedepends="python3-flit_core"
depends="python3-Jinja2 python3-Sphinx python3-docutils python3-markdown-it
python3-mdit-py-plugins python3-yaml"
short_desc="Sphinx and Docutils extension to parse MyST"
maintainer="Daniel Martinez <danielmartinez@cock.li>"
license="MIT"
Expand Down
9 changes: 9 additions & 0 deletions srcpkgs/python3-WeasyPrint/patches/allow-flit-versions.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,5 +1,5 @@
[build-system]
-requires = ['flit_core >=3.2,<4']
+requires = ['flit_core']
build-backend = 'flit_core.buildapi'

[project]
11 changes: 11 additions & 0 deletions srcpkgs/python3-Werkzeug/patches/allow-flit-versions.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -36,7 +36,7 @@
watchdog = ["watchdog>=2.3"]

[build-system]
-requires = ["flit_core<4"]
+requires = ['flit_core']
build-backend = "flit_core.buildapi"

[tool.flit.module]
9 changes: 9 additions & 0 deletions srcpkgs/python3-aiosqlite/patches/allow-flit-versions.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,5 +1,5 @@
[build-system]
-requires = ["flit_core >=3.8,<4"]
+requires = ['flit_core']
build-backend = "flit_core.buildapi"

[project]
9 changes: 9 additions & 0 deletions srcpkgs/python3-blessed/patches/allow-flit-versions.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,5 +1,5 @@
[build-system]
-requires = ['flit_core >=3.11,<4']
+requires = ['flit_core']
build-backend = 'flit_core.buildapi'

[tool.flit.sdist]
11 changes: 11 additions & 0 deletions srcpkgs/python3-blinker/patches/allow-flit-versions.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -20,7 +20,7 @@
Chat = "https://discord.gg/pallets"

[build-system]
-requires = ["flit_core<4"]
+requires = ['flit_core']
build-backend = "flit_core.buildapi"

[tool.flit.sdist]
10 changes: 5 additions & 5 deletions srcpkgs/python3-build/template
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ revision=1
# This package is used by the python3-pep517 build style; using that style here
# would create a build cycle
build_style=python3-module
_depends="python3-packaging python3-pyproject-hooks"
hostmakedepends="python3-flit_core python3-installer $_depends"
depends="$_depends"
hostmakedepends="python3-flit_core-bootstrap python3-installer-bootstrap
python3-packaging-bootstrap python3-pyproject-hooks"
depends="python3-packaging python3-pyproject-hooks"
short_desc="Simple, correct PEP 517 build frontend"
maintainer="Andrew J. Hesford <ajh@sideband.org>"
license="MIT"
Expand All @@ -24,11 +24,11 @@ do_build() {
pypath="${pypath}:${PYTHONPATH}"
fi

PYTHONPATH="${pypath}" python3 -m build --no-isolation --wheel .
PYTHONPATH="${pypath}:/${py3_sitelib}-bootstrap" python3 -m build --no-isolation --wheel .
}

do_install() {
python3 -m installer --destdir "${DESTDIR}" \
PYTHONPATH="${PYTHONPATH}:/${py3_sitelib}-bootstrap" python3 -m installer --destdir "${DESTDIR}" \
"dist/build-${version}-py3-none-any.whl"
vlicense LICENSE
}
9 changes: 9 additions & 0 deletions srcpkgs/python3-cairocffi/patches/allow-flit-versions.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,5 +1,5 @@
[build-system]
-requires = ['flit_core >=3.2,<4']
+requires = ['flit_core']
build-backend = 'flit_core.buildapi'

[project]
11 changes: 11 additions & 0 deletions srcpkgs/python3-click/patches/allow-flit-versions.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -58,7 +58,7 @@
]

[build-system]
-requires = ["flit_core>=3.11,<4"]
+requires = ['flit_core']
build-backend = "flit_core.buildapi"

[tool.flit.module]
9 changes: 9 additions & 0 deletions srcpkgs/python3-cssselect2/patches/allow-flit-versions.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,5 +1,5 @@
[build-system]
-requires = ['flit_core >=3.2,<4']
+requires = ['flit_core']
build-backend = 'flit_core.buildapi'

[project]
11 changes: 11 additions & 0 deletions srcpkgs/python3-docutils/patches/allow-flit-versions.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@
# Use flit as a build backend (https://flit.pypa.io/)
# Build with (https://build.pypa.io/)
[build-system]
-requires = ["flit_core>=3.11,<4"]
+requires = ['flit_core']
build-backend = "flit_core.buildapi"

# Project metadata
48 changes: 48 additions & 0 deletions srcpkgs/python3-entrypoints/patches/allow-flit-versions.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
From 1333ae592d0261e6a014ef4c0fb25086ab0919dc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Wed, 5 Aug 2026 20:24:55 +0200
Subject: [PATCH] Use the PEP 621 project metadata to support flit-core>=5
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
pyproject.toml | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/pyproject.toml b/pyproject.toml
index 1279b10..810224a 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,18 +1,20 @@
[build-system]
-requires = ["flit_core >=2,<4"]
+requires = ["flit_core >=2,<5"]
build-backend = "flit_core.buildapi"

-[tool.flit.metadata]
-module = "entrypoints"
-author = "Thomas Kluyver"
-author-email = "thomas@kluyver.me.uk"
-home-page = "https://github.com/takluyver/entrypoints"
-description-file = "README.rst"
+[project]
+name = "entrypoints"
+authors = [
+ { name = "Thomas Kluyver", email = "thomas@kluyver.me.uk" },
+]
+readme = "README.rst"
+license = "MIT"
+requires-python = ">=3.6"
+dynamic = ["version", "description"]
classifiers = [
- "License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3"
]
-requires-python = ">=3.6"

-[tool.flit.metadata.urls]
+[project.urls]
+Homepage = "https://github.com/takluyver/entrypoints"
Documentation = "https://entrypoints.readthedocs.io/en/latest/"
3 changes: 0 additions & 3 deletions srcpkgs/python3-entrypoints/template
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ homepage="https://github.com/takluyver/entrypoints"
distfiles="https://github.com/takluyver/entrypoints/archive/${version}.tar.gz"
checksum=d2197a94aa73e70a7f60600e654ac9918ca2a0ee5480eb875296c42220a02272

pre_build() {
vsed -i "s|@VERSION@|${version}|" setup.py
}
post_install() {
vinstall entrypoints.py 644 usr/lib/python${py3_ver}/site-packages
vlicense LICENSE
Expand Down
6 changes: 3 additions & 3 deletions srcpkgs/python3-flit_core-bootstrap/template
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Template file for 'python3-flit_core-bootstrap'
pkgname=python3-flit_core-bootstrap
version=3.12.0
revision=2
version=4.0.2
revision=1
# This package is required by python3-build and python3-installer, used by the
# python3-pep517 style; so using that style here would create a cycle
hostmakedepends="python3"
Expand All @@ -12,7 +12,7 @@ license="BSD-3-Clause"
homepage="https://flit.pypa.io/"
changelog="https://flit.pypa.io/en/stable/history.html"
distfiles="${PYPI_SITE}/f/flit_core/flit_core-${version}.tar.gz"
checksum=18f63100d6f94385c6ed57a72073443e1a71a4acb4339491615d0f16d6ff01b2
checksum=b6929defd93884b584d7c87829e0e7b5c26ed6be17b0b873979019314aa841c8
make_check=no # bootstrap
repository=bootstrap
nopyprovides=yes
Expand Down
24 changes: 6 additions & 18 deletions srcpkgs/python3-flit_core/template
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# Template file for 'python3-flit_core'
pkgname=python3-flit_core
version=3.12.0
revision=2
# This package is required by python3-build and python3-installer, used by the
# python3-pep517 style; so using that style here would create a cycle
hostmakedepends="python3"
version=4.0.2
revision=1
build_style=python3-pep517
hostmakedepends="python3-flit_core-bootstrap"
depends="python3"
checkdepends="python3-pytest python3-testpath $depends"
short_desc="Simplified packaging of Python modules - PEP 517 build backend"
Expand All @@ -13,19 +12,8 @@ license="BSD-3-Clause"
homepage="https://flit.pypa.io/"
changelog="https://flit.pypa.io/en/stable/history.html"
distfiles="${PYPI_SITE}/f/flit_core/flit_core-${version}.tar.gz"
checksum=18f63100d6f94385c6ed57a72073443e1a71a4acb4339491615d0f16d6ff01b2

do_build() {
python3 -m flit_core.wheel
}

do_check() {
python3 -m pytest tests_core
}

do_install() {
python3 bootstrap_install.py --install-root "${DESTDIR}" \
"dist/flit_core-${version}-py3-none-any.whl"
checksum=b6929defd93884b584d7c87829e0e7b5c26ed6be17b0b873979019314aa841c8

post_install() {
vlicense LICENSE
}
9 changes: 9 additions & 0 deletions srcpkgs/python3-idna/patches/allow-flit-versions.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,5 +1,5 @@
[build-system]
-requires = ["flit_core >=3.11,<4"]
+requires = ['flit_core']
build-backend = "flit_core.buildapi"

[project]
11 changes: 11 additions & 0 deletions srcpkgs/python3-installer/patches/allow-flit-versions.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,7 +1,7 @@
[build-system]
build-backend = "flit_core.buildapi"
requires = [
- "flit_core<4,>=3.11",
+ 'flit_core',
]

[project]
24 changes: 3 additions & 21 deletions srcpkgs/python3-installer/template
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
pkgname=python3-installer
version=1.0.1
revision=1
# This package is used by the python3-pep517 build style; using that style here
# would create a build cycle
build_style=python3-module
hostmakedepends="python3-flit_core"
build_style=python3-pep517
hostmakedepends="python3-flit_core-bootstrap"
depends="python3"
checkdepends="python3-pytest-xdist"
short_desc="Low-level library for installing from a Python wheel"
Expand All @@ -15,22 +13,6 @@ homepage="https://installer.readthedocs.io/"
distfiles="https://github.com/pypa/installer/archive/${version}.tar.gz"
checksum=391b8068eb6b5629496a71e33b948b10c31bea77a12d302034323406ee03ffd1

do_build() {
python3 -m flit_core.wheel
}

do_check() {
PYTHONPATH=src python3 -m pytest -n $XBPS_MAKEJOBS
}

do_install() {
local pypath="./src"
if [ -n "${PYTHONPATH}" ]; then
pypath="${pypath}:${PYTHONPATH}"
fi

PYTHONPATH="${pypath}" python3 -m installer --destdir "${DESTDIR}" \
"dist/installer-${version}-py3-none-any.whl"

post_install() {
vlicense LICENSE
}
Loading
Loading