diff --git a/.github/workflows/aux.library.pypi.yml b/.github/workflows/aux.library.pypi.yml index 7874f90..123b843 100644 --- a/.github/workflows/aux.library.pypi.yml +++ b/.github/workflows/aux.library.pypi.yml @@ -1,38 +1,36 @@ -# This always runs atm -# no idea wtf is going on -#name: Publish library to PyPI -# -#on: -# push: -# paths: -# - 'auxiliary/malojalib/pyproject.toml' -# # When the version updates, this file changes -# # False positives only result in a failed push -# -#jobs: -# publish_to_pypi: -# name: Push Library to PyPI -# runs-on: ubuntu-latest -# steps: -# - name: Check out the repo -# uses: actions/checkout@v2 -# -# - name: Set up Python -# uses: actions/setup-python@v2 -# with: -# python-version: '3.x' -# -# - name: Install dependencies -# run: pip install build -# -# - name: Change directory -# run: cd auxiliary/malojalib -# -# - name: Build package -# run: python -m build -# -# - name: Publish to PyPI -# uses: pypa/gh-action-pypi-publish@release/v1 -# with: -# user: __token__ -# password: ${{ secrets.PYPI_API_TOKEN }} +name: Publish library to PyPI + +on: + push: + paths: + - 'auxiliary/malojalib/pyproject.toml' + # When the version updates, this file changes + # False positives only result in a failed push + +jobs: + publish_to_pypi: + name: Push Library to PyPI + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: Install dependencies + run: pip install build + + - name: Change directory + run: cd auxiliary/malojalib + + - name: Build package + run: python -m build + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/maloja/__pkginfo__.py b/maloja/__pkginfo__.py index 44cd429..7eafd7b 100644 --- a/maloja/__pkginfo__.py +++ b/maloja/__pkginfo__.py @@ -1,28 +1,11 @@ # This file has now been slighly repurposed and will simply give other parts of # the package access to some global meta-information about itself -try: - # from source - import toml - with open("./pyproject.toml") as filed: - metadata = toml.load(filed)['project'] - VERSION = metadata['version'] + "-dev" - HOMEPAGE = metadata['urls']['homepage'] - # this will give wrong info when the installed package is run, but we just - # happen to be in the directory of the project - # but this can't be helped I think -except: - - # package distributrion - from pkg_resources import get_distribution - pkg = get_distribution('maloja') # also contains a metadata - VERSION = pkg.version - - #urls = metadata.metadata('maloja').get_all('Project-URL') - #urls = [e.split(', ') for e in urls] - #HOMEPAGE = [e[1] for e in urls if e[0] == 'homepage'][0] - # hardcode this for now - HOMEPAGE = "https://github.com/krateng/maloja" +# you know what f*ck it +# this is hardcoded for now because of that damn project / package name discrepancy +# i'll fix it one day +VERSION = "2.14.4" +HOMEPAGE = "https://github.com/krateng/maloja" USER_AGENT = f"Maloja/{VERSION} ( {HOMEPAGE} )" diff --git a/pyproject.toml b/pyproject.toml index deaa3e4..2396536 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "maloja" pypi_name = "malojaserver" -version = "2.14.3" +version = "2.14.4" description = "Self-hosted music scrobble database" readme = "./README.md" requires-python = ">=3.6"