8.87.2. Contents of MarkupSafe
Installed directory:
/usr/lib/python3.13/site-packages/MarkupSafe-3.0.2.dist-info
MarkupSafe is a Python module that implements an XML/HTML/XHTML Markup safe string.
Create the PKGBUILD for the MarkupSafe package with the following commands:
mkdir /sources/markupsafe
cd /sources/markupsafe
cat > PKGBUILD << "REALEOF"
# Maintainer: Linux From Scratch <lfs-dev@lists.linuxfromscratch.org>
pkgname="markupsafe"
pkgver="3.0.2"
pkgrel="1"
pkgdesc="A Python module that implements an XML/HTML/XHTML Markup safe string."
arch=('any')
url="https://palletsprojects.com/p/markupsafe/"
license=('BSD3C')
groups=('core')
depends=('python')
makedepends=('setuptools'
'wheel')
source=('https://pypi.org/packages/source/M/MarkupSafe/markupsafe-3.0.2.tar.gz')
md5sums=('cb0071711b573b155cc8f86e1de72167')
build(){
cd "${pkgname}-${pkgver}
pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD
}
package(){
cd "${pkgname}-${pkgver}
pip3 install --root "${pkgdir}" --no-index --find-links dist Markupsafe
}
REALEOF
Prepare the build directory for the pacman user and build the package:
chown -R root:pacman . chmod 2775 . chmod 664 PKGBUILD su pacman -c 'makepkg -L --nodeps'
Add the newly created package to the central package repository:
cp markupsafe-3.0.2-1-any.pkg.tar.xz \
/srv/pacman/repos/LFS/
repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
/srv/pacman/repos/LFS/markupsafe-3.0.2-1-any.pkg.tar.xz
Update the local cache and install the MarkupSafe package:
pacman -Syu pacman -S markupsafe --overwrite \* -dd --noconfirm
Finally, copy the source files into the source repository and clean up the build directory:
mkdir /srv/pacman/source/LFS/markupsafe cp PKGBUILD /srv/pacman/source/LFS/markupsafe cd /sources rm -rf markupsafe