From 3f7f144fac3d6fa6b8cef8c0bbff6a19f6b83aa1 Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Thu, 9 Nov 2023 15:32:18 +0100 Subject: [PATCH] Alpine packaging --- Alpine/APKGBUILD | 22 +++++++++++++++------- README.md | 5 ++++- setup.py | 4 ++++ 3 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 setup.py diff --git a/Alpine/APKGBUILD b/Alpine/APKGBUILD index 4cdd4f6..a68d2c1 100644 --- a/Alpine/APKGBUILD +++ b/Alpine/APKGBUILD @@ -1,15 +1,19 @@ # Maintainer: Daniel Langbein -# Python APKGBUILD template: https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/main/py3-requests/APKBUILD +# Python APKGBUILD template: https://github.com/alpinelinux/aports/blob/master/community/py3-vt-py/APKBUILD +# Different Python APKGBUILD template: https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/main/py3-requests/APKBUILD # Alpine packaging with pmbootstrap: https://wiki.postmarketos.org/wiki/Packaging#Generate_a_template # Parsing an APKGBUILD: https://wiki.postmarketos.org/wiki/Pmbootstrap_development_guide#Testing_the_APKBUILD_parser_after_changes +# APKGBUILD reference: https://wiki.alpinelinux.org/wiki/APKBUILD_Reference pkgname=py3-nextcast pkgver=0.0.1 pkgrel=1 pkgdesc="Nextcloud Podcast Client" url="https://git.privacy1st.de/langfingaz/nextcast" -arch="all" +# all: all architectures +# noarch: architecture independent, e.g. pure Python +arch="noarch" license="MIT" # Requirements for tests are not available in main #options="!check" @@ -18,18 +22,22 @@ depends=" py3-requests py3-pymediainfo py3-feedparser - python3 " -makedepends="py3-build py3-twine" -source="https://git.privacy1st.de/langfingaz/nextcast/archive/nextcast-$pkgver.tar.gz" +makedepends="py3-build py3-installer py3-setuptools py3-wheel" +source="$pkgname-$pkgver.tar.gz::https://git.privacy1st.de/langfingaz/nextcast/archive/nextcast-$pkgver.tar.gz" +subpackages="$pkgname-pyc" +# $srcdir: The directory where sources, from the source variable, are downloaded to and unpacked to. +# $builddir: This variable should point to the directory inside $srcdir where the main package source is unpacked. builddir="$srcdir/nextcast-$pkgver" build() { - python -m build --wheel --no-isolation + #cd $builddir + python3 -m build --wheel --skip-dependency-check --no-isolation } package() { - python -m installer --destdir="$pkgdir" dist/*.whl + #cd $builddir + python3 -m installer --destdir="$pkgdir" dist/*.whl } sha256sums=" diff --git a/README.md b/README.md index 21158d3..ff01a21 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ export PYTHONPATH="$${PYTHONPATH:-}:src" ## Alpine Packaging ```shell -pmbootstrap newapkbuild py3-nextcast -y -l MIT +pmbootstrap newapkbuild py3-nextcast -f -y -l MIT -u https://git.privacy1st.de/langfingaz/nextcast cat ~/.local/var/pmbootstrap/cache_git/pmaports/main/py3-nextcast/APKBUILD ``` @@ -39,3 +39,6 @@ pmbootstrap checksum py3-nextcast pmbootstrap build py3-nextcast ``` +```shell +pmbootstrap shutdown +``` diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..0abbd0a --- /dev/null +++ b/setup.py @@ -0,0 +1,4 @@ +# This file is required for `pip install` on Ubuntu 18.04. +# It loads `setup.cfg`. +from setuptools import setup +setup()