pytorch_scatter
pytorch_scatter copied to clipboard
Add build requirements in `pyproject.toml` to make installations easier
Closes #265
This pull request does the following:
- Adds
torchas a build requirement usingpyproject.tomlas described in https://setuptools.readthedocs.io/en/latest/build_meta.html. The use ofsetup.pyis getting towards the end of life, and using a combination of declarative setup metadata insetup.cfgandpyproject.tomlis the preferred way forwards. This means that iftorchisn't already installed before doingpip install torch-scatter, it gets installed. - Adds
torchas a install requirement (i.e., a dependency). This might be a bit redundant of 1, but some tools liketoxcreate a separate env for the build requirements, so this needs to be duplicated. - Adds an alternative testing scenario in which PyTorch is not installed before trying to
pip install torch-scatter. This demonstrates that with the first two changes, it's now possible to make an automated, single step installation oftorch-scatter.
Why is this important
Creating easily installable packages that depend on torch-scatter (that don't include the need for manual installation of torch + cuda) is not currently possible because pip's dependency resolver isn't aware of the fact that torch-scatter needs torch installed before even trying to build it.
Codecov Report
Merging #266 (d46aba3) into master (2f447cf) will not change coverage. The diff coverage is
n/a.
:exclamation: Current head d46aba3 differs from pull request most recent head 2a3f89e. Consider uploading reports for the commit 2a3f89e to get more accurate results
@@ Coverage Diff @@
## master #266 +/- ##
=======================================
Coverage 97.05% 97.05%
=======================================
Files 9 9
Lines 204 204
=======================================
Hits 198 198
Misses 6 6
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 2f447cf...2a3f89e. Read the comment docs.
Any idea why tests are failing?
any updates on this feature?
it would be great to just be able to do pip install torch-scatter, this would help a lot to automate environmet setup :)
This is likely not going to happen since pip install torch-scatter will pick up the local CUDA environment, not the default one provided by pip install torch. This will result in a lot of problems later on. We also want to discourage manual compilation and recommend installation from pre-built wheels.
This pull request had no activity for 6 months. It will be closed in 2 weeks unless there is some new activity.