From 6ad997c4511757e068e1864823a25b6ca3c6be73 Mon Sep 17 00:00:00 2001 From: Sung Yun <107272191+sungwy@users.noreply.github.com> Date: Fri, 22 Nov 2024 08:56:06 -0500 Subject: [PATCH 1/3] Create project-description.md --- bindings/python/project-description.md | 28 ++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 bindings/python/project-description.md diff --git a/bindings/python/project-description.md b/bindings/python/project-description.md new file mode 100644 index 0000000000..595c9bf593 --- /dev/null +++ b/bindings/python/project-description.md @@ -0,0 +1,28 @@ + + +# Pyiceberg Core + +This project is used to build an iceberg-rust powered core for pyiceberg, and intended for use only by pyiceberg. + +Install via PyPI: + +``` +pip install pyiceberg_core +``` From e18a6e08e568fbc27dcf2df577fc3e3ab6ca0677 Mon Sep 17 00:00:00 2001 From: Sung Yun <107272191+sungwy@users.noreply.github.com> Date: Fri, 22 Nov 2024 09:04:11 -0500 Subject: [PATCH 2/3] use project-description.md as pypi readme --- bindings/python/pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/bindings/python/pyproject.toml b/bindings/python/pyproject.toml index 79f7297a2e..058415a1bb 100644 --- a/bindings/python/pyproject.toml +++ b/bindings/python/pyproject.toml @@ -22,6 +22,7 @@ build-backend = "maturin" [project] name = "pyiceberg_core" version = "0.0.1" +readme = "project-description.md" classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", From e4197e5dee26e711aed324f5fd9c4b93ca6d07ee Mon Sep 17 00:00:00 2001 From: Sung Yun <107272191+sungwy@users.noreply.github.com> Date: Fri, 22 Nov 2024 09:16:45 -0500 Subject: [PATCH 3/3] fix release_python.yml --- .github/workflows/release_python.yml | 45 ++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release_python.yml b/.github/workflows/release_python.yml index 4c87e6d580..66d2541ae3 100644 --- a/.github/workflows/release_python.yml +++ b/.github/workflows/release_python.yml @@ -82,12 +82,40 @@ jobs: name: wheels path: bindings/python/dist - publish: - name: Publish Python 🐍 distribution 📦 + pypi-publish: + name: Publish Python 🐍 distribution 📦 to Pypi needs: [ sdist, linux ] runs-on: ubuntu-latest - # Only publish if it's a tag - if: "startsWith(github.ref, 'refs/tags/')" + # Only publish to PyPi if the tag is not a pre-release + if: ${{ startsWith(github.ref, 'refs/tags/') && !contains(github.ref, '-') }} + + environment: + name: pypi + url: https://pypi.org/p/pyiceberg_core + + permissions: + id-token: write # IMPORTANT: mandatory for trusted publishing + + steps: + - name: Download all the dists + uses: actions/download-artifact@v3 + with: + name: wheels + path: bindings/python/dist + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + + with: + skip-existing: true + packages-dir: bindings/python/dist + + testpypi-publish: + name: Publish Python 🐍 distribution 📦 to TestPypi + needs: [ sdist, linux ] + runs-on: ubuntu-latest + # Only publish to TestPyPi if the tag is a pre-release + if: ${{ startsWith(github.ref, 'refs/tags/') && contains(github.ref, '-')}} + environment: name: testpypi url: https://test.pypi.org/p/pyiceberg_core @@ -102,17 +130,8 @@ jobs: name: wheels path: bindings/python/dist - name: Publish to TestPyPI - # Only publish to TestPyPi if the tag is a pre-release - if: "contains(github.ref, '-')" uses: pypa/gh-action-pypi-publish@release/v1 with: repository-url: https://test.pypi.org/legacy/ skip-existing: true packages-dir: bindings/python/dist - - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - # Only publish to PyPi if the tag is not a pre-release - if: "!contains(github.ref, '-')" - with: - skip-existing: true - packages-dir: bindings/python/dist \ No newline at end of file