forked from FemboyOS/fempkg_recipes
Femboyos 2 full rewrite full working CI
This commit is contained in:
43
python.recipe.py
Normal file
43
python.recipe.py
Normal file
@@ -0,0 +1,43 @@
|
||||
pkgname = "python"
|
||||
pkgver = "3.14.0"
|
||||
Pkgver = pkgver[:4]
|
||||
atomic = True
|
||||
source = f"https://www.python.org/ftp/python/{pkgver}/Python-{pkgver}.tar.xz"
|
||||
builddir = f"/tmp/fempkg/build/{pkgname}/Python-{pkgver}"
|
||||
fembuilddir = f"/tmp/fempkg/build/{pkgname}"
|
||||
outputdir = "/home/gabry/lfs-repo/binpkg"
|
||||
manifestdir = "/home/gabry/lfs-repo/manifests"
|
||||
destdir = f"{fembuilddir}/DESTDIR"
|
||||
deps = []
|
||||
|
||||
build = [
|
||||
# Extract
|
||||
f"mkdir /tmp/fempkg/build {fembuilddir} || true && cd {fembuilddir} && tar -xvf /var/lib/fempkg/pkgs/Python-{pkgver}.tar.xz",
|
||||
|
||||
f"cd {builddir} && ./configure --prefix=/usr --enable-shared --with-system-expat --enable-optimizations --without-static-libpython",
|
||||
f"cd {builddir} && make -j$(nproc)",
|
||||
f"cd {builddir} && make DESTDIR={destdir} install",
|
||||
f"cd {builddir} && install -d -m 755 {destdir}/etc",
|
||||
f"cd {builddir} && echo -e \"[global]\\nroot-user-action = ignore\\ndisable-pip-version-check = true\" > {destdir}/etc/pip.conf",
|
||||
|
||||
f"install -v -d -m755 {destdir}/usr/share/licenses/{pkgname}/",
|
||||
f"install -v -m644 {builddir}/LICENSE {destdir}/usr/share/licenses/{pkgname}/LICENSE",
|
||||
|
||||
# Make tarball + manifests
|
||||
f"mkdir -p {outputdir} && cd {destdir} && tar --transform 's|^\\.||' -I zstd -cf {outputdir}/{pkgname}-{pkgver}.tar.zst .",
|
||||
f"mkdir -p {manifestdir} && tar -tf {outputdir}/{pkgname}-{pkgver}.tar.zst | grep -v '/$' > {manifestdir}/{pkgname}.txt",
|
||||
|
||||
# Always cleanup
|
||||
f"rm -rf {fembuilddir}"
|
||||
]
|
||||
|
||||
triggers = [
|
||||
f"cd /tmp && pip3 install requests build installer materialyoucolor pillow setuptools wheel meson dbus-python meson_python "
|
||||
f"flit-core packaging markupsafe Jinja2 pluggy PyYAML pathspec Mako trove-classifiers editables hatchling python-dbusmock "
|
||||
f"brotli pyproject_metadata Cython pyparsing ply docutils PyGObject Pygments tqdm httplib2==0.21.0 certifi chardet charset_normalizer "
|
||||
f"doxypypy doxyqml idna urllib3",
|
||||
{"rebuild_package": ["caelestia-cli", "kapidox", "glib", "libxml2", "newt", "pycairo", "xcb-proto"]},
|
||||
f"cd /tmp && find /usr/lib -maxdepth 1 -type d -name \"python3*\" ! -name \"python{Pkgver}\" -exec rm -rf {{}} +"
|
||||
]
|
||||
|
||||
# TODO when a minor version, ie 3.13.0 to 3.14.0 drops specfiy the python version in the newt package config line
|
||||
Reference in New Issue
Block a user