-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Update package metadata #2226
Update package metadata #2226
Conversation
317f528
to
04fdc63
Compare
- run: | ||
name: Upgrade virtual environment tools | ||
command: | | ||
python -m pip install --upgrade pip virtualenv |
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.
PEP 660 (pip install -e
) landed in https://pip.pypa.io/en/stable/news/#v21-3
04fdc63
to
afa4d96
Compare
Thank you @ofek for the contribution. To be honest, I am not very familiar with What are your thoughts @freddyaboulton @aliabid94 @dawoodkhan82? |
Yup! Since v21-3 |
Thank you for the contribution @ofek ! I had filed an issue to track work similar to this #1662 and I'm glad you beat us to it. I don't know that much about hatchling either - I was thinking we'd use setuptools when I filed #1662 - but I'll check this out this week so I can see how it works and if this PR accidentally breaks anything in our current build process. \ |
Happy to help! Please let me know any feedback you may have for Hatchling. As I mentioned to someone else earlier today, some of the discussion about making that the new default starts here pypa/packaging.python.org#1031 (comment) I'll quote Henry who expressed the common sentiment:
Essentially. I did my best to learn the best and worst parts of other backends in order to implement Hatching, which is why it Just Works ™️ while at the same time being simpler to configure and easier to extend. |
@@ -0,0 +1,55 @@ | |||
[build-system] |
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.
@ofek There's a gradio/templates
directory that's created when the front-end code is built. We need to include it in the source and wheel distribution. Can you please make the change? Thank you!
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.
Sure! It doesn't by default because of .gitignore
:
# JS build
gradio/templates/cdn
gradio/templates/frontend
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.
Done
Thanks @ofek ! 😄 @abidlabs I tested it out today and I think everything is working. I uploaded version 3.3b1 so you can test it out. See it here. This is what I tested:
Anything else we should test? Otherwise looks good to me. CC @aliabd @aliabid94 |
LGTM, thanks @ofek! thanks for testing @freddyaboulton |
Awesome @ofek and @freddyaboulton! Very comprehensive testing, LGTM |
Description
Fixes #1662
Hello there! The Python packaging ecosystem has standardized on the interface for build backends (PEP 517/PEP 660) and the format for metadata declaration (PEP 621/PEP 631). As a result, the execution of
setup.py
files is now deprecated.So, I'm spending my free time updating important projects so that they are modernized and set an example for others 😄
Summary of changes
This implements PEP 621, obviating the need for
setup.py
andMANIFEST.in
. The build backendhatchling
(of which I am a maintainer in the PyPA) is now used as that is the default in the official Python packaging tutorial. Hatchling is available on all the major distribution channels such as Debian, Fedora, Arch Linux, conda-forge, Nixpkgs, Alpine Linux, FreeBSD/OpenBSD, Gentoo Linux, MacPorts, OpenEmbedded, Spack, MSYS2, etc.Notes
*.egg-info
frompython setup.py develop
; this is now fixedtest
directory ever since Add requirements.txt and test_files to source dist #1817 which clashes with other installed packages; this is now fixed and the wheel is ~1mb smallerFuture
Checklist: