-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
CI: use pipx and build to simplify and remove a workaround #43157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,22 +33,10 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel | ||
|
||
# GH 39416 | ||
pip install numpy | ||
|
||
- name: Build pandas sdist | ||
run: | | ||
pip list | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i think we usually want this line so that we can see what versions are installed when debugging CI failures There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not the build environment. No version listed here would have anything to do with what you have inside the PEP 517 build environment. If you use pipx, as below, then even the version of build is not listed and the version of Python is unrelated. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've dropped setup-python, which should reduce confusion here, and added a |
||
python setup.py sdist --formats=gztar | ||
pipx run build --version | ||
pipx run build --sdist | ||
|
||
- uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the idea is to simulate core building and distributing this application. how does this improve the experience here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Artifact building should happen with
build
, as well.build
will respect PEP 518 requirements, rawsetup.py
commands cannot, which is why the workaround in #39416 was introduced. Making an SDist should be done withpip install build && python -m build --dist
(orpipx run build --sdist
), notpip install setuptools wheel numpy && python setup.py sdist --formats=gztar
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you replace with
pip install build && python -m build --dist
prefer to use the standard tools hereThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pipx is a standard tool, it's part of the PyPA, just like build, setuptools, and pip. I can change this if preferred, but then you are dependent on
setup-python@v2
, while pipx is not.