diff --git a/Alpine/APKGBUILD b/Alpine/APKGBUILD new file mode 100644 index 0000000..4cdd4f6 --- /dev/null +++ b/Alpine/APKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: Daniel Langbein + +# 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 + +pkgname=py3-nextcast +pkgver=0.0.1 +pkgrel=1 +pkgdesc="Nextcloud Podcast Client" +url="https://git.privacy1st.de/langfingaz/nextcast" +arch="all" +license="MIT" +# Requirements for tests are not available in main +#options="!check" +# TODO: simple-term-menu +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" +builddir="$srcdir/nextcast-$pkgver" + +build() { + python -m build --wheel --no-isolation +} + +package() { + python -m installer --destdir="$pkgdir" dist/*.whl +} + +sha256sums=" +444b527dc4f2ef6460724a38cef3cebd9e0872c1 nextcast-0.0.1.tar.gz +" diff --git a/README.md b/README.md index 0474573..21158d3 100644 --- a/README.md +++ b/README.md @@ -24,3 +24,18 @@ export PYTHONPATH="$${PYTHONPATH:-}:src" ./src/nextcast/app_resume_playback.py ./src/nextcast/app_play_episode.py ``` + +## Alpine Packaging + +```shell +pmbootstrap newapkbuild py3-nextcast -y -l MIT +cat ~/.local/var/pmbootstrap/cache_git/pmaports/main/py3-nextcast/APKBUILD +``` + +```shell +cp Alpine/APKGBUILD ~/.local/var/pmbootstrap/cache_git/pmaports/main/py3-nextcast/APKBUILD +pmbootstrap apkbuild_parse py3-nextcast +pmbootstrap checksum py3-nextcast +pmbootstrap build py3-nextcast +``` + diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..c035a4f --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,8 @@ +# https://packaging.python.org/tutorials/packaging-projects/#creating-pyproject-toml + +[build-system] +requires = [ + "setuptools>=42", + "wheel" +] +build-backend = "setuptools.build_meta" diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..2f66274 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,36 @@ +; setup.cfg is the configuration file for setuptools. +; https://packaging.python.org/tutorials/packaging-projects/#configuring-metadata + +[metadata] +name = nextcast +version = 0.0.1 +author = Daniel Langbein +author_email = daniel@systemli.org +description = Nextcloud Podcast Client +long_description = file: README.md +long_description_content_type = text/markdown +url = https://git.privacy1st.de/langfingaz/nextcast +project_urls = + Bug Tracker = https://git.privacy1st.de/langfingaz/nextcast/issues + +; https://pypi.org/classifiers/ +classifiers = + Development Status :: 4 - Beta + Programming Language :: Python :: 3 + License :: OSI Approved :: MIT License + Operating System :: Unix + +[options] +package_dir = + = src +packages = find: +python_requires = >=3.6.9 + +[options.packages.find] +where = src + +[options.entry_points] +; https://setuptools.readthedocs.io/en/latest/userguide/entry_point.html +console_scripts= + nextcast = nextcast.app_play_episode:main + nextcast-resume = nextcast.app_resume_playback:main