-
Notifications
You must be signed in to change notification settings - Fork 147
Modernized packaging metadata #143
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
base: main
Are you sure you want to change the base?
Conversation
I just managed to build it in the build isolation, which is required for reproducible build and distributing wheels to others. You can see what I've done at https://github.com/woct0rdho/SageAttention pybind11 is also required when building it. It's tricky to specify both torch (with index URL at download.pytorch.org ) and pybind11 (not in that index URL) in the build-time dependencies, and the easiest way I could think of is to use simpleindex |
I don't know how you did it, as when I try the same, I just get: |
Adding |
Besides, don't you need to point to a torch version specific to your installed CUDA version? |
setup.py imports CUDA_HOME from torch, so you must install torch+the correct CUDA version in the build isolation (I guess it's also possible to modify setup.py so it can build with torch+cpu downloaded from PyPI, then we don't need two index URLs. But anyway, if we want to build with nightly torch, then we still need two index URLs) |
Yes, that's exactly what I just said, right? |
Yes exactly |
Yeah, so this is why I left |
This adds a standard
pyproject.toml
, allowing the package to be installed according to the instructions in README (which previously required undocumented steps like installingpackaging
andtorch
beforehand and using the--no-build-isolation
flag. This flag is now documented, and build requirements have been specified. This PR also allows you to build an sdist for distribution on the PyPI by bypassing the GPU detection when building metadata only or an sdist.