The current setup.py imports wheel and torch at the module level:
from wheel.bdist_wheel import bdist_wheel as _bdist_wheel
import torch
This causes installation failures when pip tries to install the package from source (e.g., via git URL in requirements.txt).
Pip collects metadata for all packages before installing any dependencies. This means pip executes setup.py before wheel and torch are available in the environment, e.g., even when torch and wheel are listed in requirements.txt, as follows:
...
torch
wheel
...
git+https://github.com/Dao-AILab/fast-hadamard-transform.git
the installation fails.
Can we add torch + wheel (and other necessary pkgs), maybe in pyproject.toml, to declare build-time dependencies? Thanks