-
Notifications
You must be signed in to change notification settings - Fork 23
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
chore(build): migrate to pyproject.toml
for packaging
#97
chore(build): migrate to pyproject.toml
for packaging
#97
Conversation
Thanks for this PR! I'll try to have a look as soon as I can. In the meantime, can you have a look the CI that seems to be failing? Thanks again 🚀 |
Addressed in 495b8a8, it was a typo 😅 |
Ok seems like that fixed it! 🚀 |
Also maybe it's worth mentioning but with |
That's strange, in theory it should be a single squashed commit anyway. |
Happy to do it if necessary. Can you try running capybara on this PR? Previously the GitHub CI had ran successfully however when attempting to merge, capybara was throwing an error. Can you try to run capybara on this PR? Incase there is an error I'll open another PR with an empty pyproject |
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.
Thanks for the PR, only a few minor things before approving 😄
I addressed the comments in the recent commits. |
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.
Thanks a lot, let's see what Copybara tells us ahah 😄
I have a copybara failure, I'll look into it asap. |
Hey @claudiofantacci, I'm assuming this is because of a lack of |
My Copybara is probably setup differently 😄 |
Ok, I've prepared internal changes that we're testing to get this PR through, see #98 🚀 In the meantime, can you please update |
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.
Ok the #98 is in, can you rebase and update the README.md
?
Sorry for the delay, I updated the |
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.
Amazing, thanks!
Thanks for seeing this through @claudiofantacci. Cheers 😄 🥂 |
Mirrors work done in:
pyproject.toml
for building package optax#513setup.py
from publishing CI optax#737pyproject.toml
is the new standard for packaging python packages,setup.py
is now deprecated (first introduced in PEP 518 and later expanded in PEP 517, PEP 621 and PEP 660). This PR proposes to switch from the legacysetup.py
method in favour ofpyproject.toml
. This would lead to a overall better project structure because all requirements would be managed within a singlepyproject.toml
file instead of 4 separate text files. It also allows for dynamic version allocation (reads automatically from/__init__.py
).Changes proposed by this PR can be summarized as follows :-
setup.py
in favour ofpyproject.toml
for packaging and update thetest.sh
script appropriately.cache
andcache-dependency-path
and different build commands for uploading to pypi.requirements*.txt
andMANIFEST.in
.