Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ jobs:

- name: Build Python Wheels
env:
build_number: ${{ inputs.rc }}
build_number: ${{ inputs.rc || '0' }}
python_version: ${{ matrix.python }}
MANYLINUX_GLIBC: ${{ inputs.glibc || '2_17' }}
run: |
/bin/bash ./docker/build-wheels.sh ${build_number} ${python_version}
/bin/bash ./docker/build-wheels.sh "${build_number}" "${python_version}"
ls ./dist

- name: Test Install
Expand All @@ -107,7 +107,6 @@ jobs:
upload:
runs-on: ubuntu-latest
needs: [build]
if: (github.event_name == 'workflow_dispatch')
steps:
- name: Download Artifacts
uses: actions/download-artifact@v8
Expand All @@ -125,13 +124,21 @@ jobs:
echo "Files to distribute:"
ls ./dist

- name: Check distributions
run: |
python3 -m pip install setuptools wheel twine
twine check --strict dist/*

- name: Test upload
if: (github.event_name != 'workflow_dispatch')
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
run: twine upload --verbose --repository testpypi --skip-existing dist/flux_python*

- name: Build and publish
if: (github.event_name == 'workflow_dispatch')
env:
TWINE_USERNAME: ${{ secrets.PYPI_USER }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASS }}
run: |
ls dist/
python3 -m pip install setuptools wheel
python3 -m pip install twine==6.0.1
python3 -m pip install --upgrade pkginfo
twine upload --skip-existing dist/flux_python*
run: twine upload --verbose --skip-existing dist/flux_python*
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

> 🐍️ You called me?

Hello! You've found the flux Python bindings, an experiment to build and deploy
Flux to Pypi without needing to store code alongside Flux. The goal of
this experiment is to test them separately. This was originally developed
Hello! You've found the flux Python bindings to build and deploy
Flux to Pypi without needing to store code alongside Flux. This was originally developed
at [vsoch/flux-python](https://github.com/vsoch/flux-python) and has
been ported here to automate more officially. The following guides might be useful
to you:
been ported here to automate more officially. The following guides might be useful to you:

- ⭐️ [Flux Framework Documentation](https://flux-framework.readthedocs.io)
- ⭐️ [Flux Projects](https://flux-framework.org)
Expand All @@ -17,7 +15,7 @@ to you:

## Helper Install

If you don't want to figure out your flux version and install with pip directory (per instructions in [manual install](#manual-install))
If you need to install on a system without Flux, please [target a wheel](https://pypi.org/project/flux-python/#files) (`.whl`) file directly that matches the version of Flux you intend to use it with. A vanilla `pip install` will try to compile from source, which requires Flux. If you don't want to figure out your flux version and install with pip directory (per instructions in [manual install](#manual-install))
we provide a helper script [install-flux-python.sh](script/install-flux-python.sh) that will:

1. Determine that Flux and Python are installed with pip
Expand Down
1 change: 1 addition & 0 deletions docker/build-wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ glibc=${MANYLINUX_GLIBC:-2_17}

# This is intended to run in the container
echo "Building Python version ${version}"
echo "Build number ${build_number}"

export PATH=/opt/conda/envs/build/bin:$PATH
export PYTHONPATH=/opt/conda/envs/build/lib/python${version}/site-packages
Expand Down