diff --git a/.github/workflows/build-python-package.yml b/.github/workflows/build-python-package.yml index d7d8ac94a3..5e2ac152ec 100644 --- a/.github/workflows/build-python-package.yml +++ b/.github/workflows/build-python-package.yml @@ -75,7 +75,8 @@ jobs: name: Upload to PyPI needs: [build_wheels, build_sdist] runs-on: ubuntu-latest - if: github.ref == 'refs/heads/master' && github.event_name == 'push' +# if: github.ref == 'refs/heads/master' && github.event_name == 'push' + if: github.ref == 'refs/heads/master' && github.event_name == 'pull_request' steps: - uses: actions/checkout@v2 @@ -97,6 +98,8 @@ jobs: - name: Publish env: TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.pypi_password }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | - (cd ./src/runtime/python && curl -I --fail https://pypi.org/project/$(python setup.py --name)/$(python setup.py --version)/) || twine upload dist/* + ls -la ./dist/ # Debug: Check if wheels exist + echo "Attempting upload..." + twine upload --verbose --non-interactive --skip-existing dist/* \ No newline at end of file diff --git a/src/runtime/python/setup.py b/src/runtime/python/setup.py index fdc2fe8c5a..3a1e6dc5c2 100644 --- a/src/runtime/python/setup.py +++ b/src/runtime/python/setup.py @@ -1,4 +1,4 @@ -from distutils.core import setup, Extension +from setuptools import setup, Extension import os includes = os.getenv('EXTRA_INCLUDE_DIRS','').split(':') @@ -16,7 +16,7 @@ libraries = ['gu', 'pgf']) setup (name = 'pgf', - version = '1.0', + version = '1.1', description = 'Python bindings to the Grammatical Framework\'s PGF runtime', long_description="""\ Grammatical Framework (GF) is a programming language for multilingual grammar applications.