From f1c1d157b6fe0557f8cd77d50c2947c08fbd3f62 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Sun, 3 Aug 2025 17:25:52 +0200 Subject: [PATCH 1/3] minor fixes in uploading to PyPI --- .github/workflows/build-python-package.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-python-package.yml b/.github/workflows/build-python-package.yml index d7d8ac94a..1bea3082b 100644 --- a/.github/workflows/build-python-package.yml +++ b/.github/workflows/build-python-package.yml @@ -97,6 +97,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 From a218903a2da6401b7fa8d7719bfb1673f3f898a2 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Sun, 3 Aug 2025 17:26:26 +0200 Subject: [PATCH 2/3] use setuptools (so it works for 3.12+) + bump version to 1.1 --- src/runtime/python/setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/python/setup.py b/src/runtime/python/setup.py index fdc2fe8c5..3a1e6dc5c 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 @@ pgf_module = Extension('pgf', 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. From 7c6f53d003dab759cb841448f2e7e268b9714a32 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Fri, 8 Aug 2025 14:06:59 +0200 Subject: [PATCH 3/3] add macos-13 to build for intel mac --- .github/workflows/build-python-package.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-python-package.yml b/.github/workflows/build-python-package.yml index 1bea3082b..b2565eb05 100644 --- a/.github/workflows/build-python-package.yml +++ b/.github/workflows/build-python-package.yml @@ -13,10 +13,10 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-latest, macos-13] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - uses: actions/setup-python@v5 name: Install Python @@ -25,7 +25,7 @@ jobs: - name: Install cibuildwheel run: | - python -m pip install git+https://github.com/joerick/cibuildwheel.git@main + python -m pip install cibuildwheel - name: Install build tools for OSX if: startsWith(matrix.os, 'macos') @@ -56,9 +56,9 @@ jobs: name: Build source distribution runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v5 name: Install Python with: python-version: '3.10' @@ -78,7 +78,7 @@ jobs: if: github.ref == 'refs/heads/master' && github.event_name == 'push' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 @@ -99,6 +99,4 @@ jobs: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | - 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