Skip to content

Conversation

@bobleesj
Copy link
Contributor

@bobleesj bobleesj commented Nov 6, 2025

Fixes scikit-package/scikit-package#632

Just like on test-on-pr, this PR grabs the latest Python version from .pyproject.toml

@bobleesj bobleesj changed the title ci: use pyprojec.toml Python version for build wheel, deploy docs, release ci: use pyproject.toml Python version for build wheel, deploy docs, release Nov 6, 2025
Copy link
Contributor Author

@bobleesj bobleesj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2025-11-05 at 6 56 19 PM

@sbillinge ready for review. just like test-on-pr, user can also mnually specifiy the python version in the .yml file

default: 'PROJECT_NAME'
required: true
type: string
python_version:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this .yml is for non-pure Python - use the pyython-version from the main _build-wheel-..yml file.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bobleesj do we need a comment in the code with this information so we don't forget in the future? Not sure, just asking.

maintainer_github_username: ${{ inputs.maintainer_github_username }}

build-wheel:
get-python-version:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this .yml is for the main entry point for when git push upstream <tag> is called.

like in test-on-pr, we grab the latest Python version.

default: false
required: true
type: boolean
python_version:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for builidng wheel, use the Python version passed from the top level

description: 'Python version for Conda environment'
default: 3.14
required: false
description: 'Python version to use for building documentation'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for building docs, again, same logic.

uses: actions/setup-python@v5
with:
python-version: '3.14'
python-version: ${{ inputs.python_version }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for uploading to PyPI, again same logic. use the Python version passed from the main build-wheel-upload .yml file

@bobleesj
Copy link
Contributor Author

bobleesj commented Nov 6, 2025

@sbillinge ready for review

@sbillinge sbillinge merged commit 8a808c7 into scikit-package:main Nov 7, 2025
1 check passed
sbillinge added a commit that referenced this pull request Nov 7, 2025
Merge pull request #203 from bobleesj/build-get-pt-version

v0
@bobleesj bobleesj deleted the build-get-pt-version branch November 7, 2025 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: python version from pyproject.toml needed on the build workflow?

2 participants