-
-
Notifications
You must be signed in to change notification settings - Fork 423
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
Moved the metadata into PEP 621
-compliant pyproject.toml
.
#1157
Conversation
Thanks, but I think we'll stick to setup.py until pyproject.toml can extract the version from |
It is a feature not of |
@KOLANICH I think it's great that you can do |
|
That sounds like a roundabout solution, but I'm willing to consider it. |
See https://scikit-hep.org/developer/pep621#versioning for an example with hatchling (which works with setuptools_scm). Most of https://scikit-hep.org/developer/packaging#git-tags-official-pypa-method is valid if you want to stick with setuptools, just ignore the setup.cfg mentions. :) |
c2defcf
to
3b29fe0
Compare
nearley = ["js2py"] | ||
atomic_cache = ["atomicwrites"] | ||
|
||
[tool.setuptools] |
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.
Hatching handles this better, IMO, and works even if some limits setuptools<60 in a non isolated environment (cough, NumPy, cough)
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.
FYI, from what I gather, the next version of setuptools is making tool.setuptools
non-provisional.
I heard something about it (only a bit, I have not yet lurked about the issue), but I think it is an issue of
Thanks for noting this, I'll fix it. |
3b29fe0
to
51e6916
Compare
51e6916
to
c334bf7
Compare
c334bf7
to
e6930bb
Compare
e6930bb
to
f2b5758
Compare
Cool, that looks elegant! Do you think the transition will be entirely seamless, or are there any details to be aware of? |
It depends on your assumptions on Python and Every change breaks someone's workflow and there is ain't no such a thing as "seamless". |
This is the first time I hear of Is there a guide or tutorial for transitioning from setup.py, for those of us who are out of scope? ;) |
Here are the docs: https://pypa-build.readthedocs.io/en/latest/
If one wants to migrate other projects, I recommend to do the following 2-step process (I did it myself for all my projects, and also for this one):
After each step manual tweaking of the configuration may be needed and you should be sure that the project builds. It is better to introduce |
There’s also https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html https://scikit-hep.org/developer is a good place for modern packaging suggestions. Also I’m fond of Many PyPA packages have moved, like packaging and wheel. So it’s pretty safe. |
And personally I almost always use |
Hello! Sorry it took me this long to look into this. Thank you for the info and the links. I found scikit hep especially interesting. I'm generally in favor of the change. Just one question - if I understand correctly, users are now expected to run "pytest" instead of "setup.py test". Does it mean we should also include pytest in the dev-requirements? Or is it up to the user to install it, or use pipx run pytest? |
FYI, scikit-hep.org/developer has been mostly migrated to https://learn.scientific-python.org/development/ Yes, Usually you don't want use pipx for pytest, since pytest imports your package, its requirements, and plugins; it's more like a library than an app. In some simple cases it does work, but it's generally designed to run alongside your package. |
My approach to testing is writing test suites using vanilla |
So, everyone okay with merging this as-is? We can add a [test] extra in a separate PR. @MegaIng Feel free to chime in too, if you have something to add. |
I don't have a lot of concrete experience with this stuff and therefore don't have anything to add. I am okay with merging. |
Thanks everyone! |
No description provided.