Skip to content

Add build dependencies to fix pip install failures when installing from source #25

@chang-l

Description

@chang-l

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions