Skip to content
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

🔧 MAINTAIN: Use pyproject-build for package deployment #177

Merged
merged 3 commits into from
Dec 1, 2021

Conversation

hukkin
Copy link
Contributor

@hukkin hukkin commented Oct 28, 2021

@codecov
Copy link

codecov bot commented Oct 28, 2021

Codecov Report

Merging #177 (1850483) into master (bb6cf6e) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #177   +/-   ##
=======================================
  Coverage   96.08%   96.08%           
=======================================
  Files          61       61           
  Lines        3273     3273           
=======================================
  Hits         3145     3145           
  Misses        128      128           
Flag Coverage Δ
pytests 96.08% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bb6cf6e...1850483. Read the comment docs.

@chrisjsewell
Copy link
Member

Thanks @hukkin, didn't know about this

Hey @pradyunsg, would you mind quickly confirming that this is now the "canonical" way to build packages? (before I roll it out to other packages)

@hukkin
Copy link
Contributor Author

hukkin commented Dec 1, 2021

I'm not pradyunsg 😄 , but the "canonical" replacements for direct setup.py invocations can be found in the Paul Ganssle blog post I linked (the table at the very bottom).

With PEP660 being a thing now (basically editable installs for PEP 517 packages) we could now also remove the setup.py since we only left it there for pip install -e . compatibility. We'd need to move to flit however, because setuptools does not support the PEP yet, flit does.

@chrisjsewell
Copy link
Member

I'm not pradyunsg 😄 , but the "canonical" replacements for direct setup.py invocations can be found in the Paul Ganssle blog post I linked (the table at the very bottom).

Oh its not that I don't trust you lol, but pradsyung is a maintainer of pip, so it's nice to "hear it from the horse's mouth", before I start changing this across all my many repos 😅

We'd need to move to flit however

yeh no, I tried this in some other repos (like https://github.com/aiidateam/archive-path), but there is a really annoying development issue for me; you have to use tox isolated_build = True (https://tox.wiki/en/latest/config.html#conf-isolated_build), which then means when "navigating" with e.g. VS Code pylance, it redirects to the built code rather than the source code (if that makes sense). It drives me crazy 😬

@hukkin
Copy link
Contributor Author

hukkin commented Dec 1, 2021

but there is a really annoying development issue for me; you have to use tox isolated_build = True

Hmm, I suspect you may have issues in the future with further deprecations/removals related to legacy builds. And tox 4 will default to isolated builds. Maybe you want to configure tox to test source instead of built package (skip_install in tox). I don't think this is a recommended way, but may be the only way to have tooling work as you want in the future.

@chrisjsewell
Copy link
Member

Hmm, I suspect you may have issues in the future with further deprecations/removals related to legacy builds. And tox 4 will default to isolated builds.

well I'll cross that bridge when I come to it lol; I'm sure I'm not the only one using a workflow including tox+vs code

@pradyunsg
Copy link
Member

Yea, using build instead of setup.py directly is a good idea. It also makes sure that your wheels are built from the sdist, which is a good thing.

@chrisjsewell
Copy link
Member

thanks, just wanted to double-check!

@chrisjsewell chrisjsewell changed the title 🔧 MAINTAIN: Avoid running setup.py directly 🔧 MAINTAIN: Use pyproject-build for package deployment Dec 1, 2021
@chrisjsewell chrisjsewell merged commit 2863ebb into executablebooks:master Dec 1, 2021
@hukkin hukkin deleted the avoid-setuppy-run branch December 1, 2021 18:32
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.

3 participants