Skip to content

Add pyproject.toml declaring build-time dependencies#30

Open
starboy-3 wants to merge 1 commit into
Dao-AILab:masterfrom
starboy-3:fix/add-pyproject-toml-build-deps
Open

Add pyproject.toml declaring build-time dependencies#30
starboy-3 wants to merge 1 commit into
Dao-AILab:masterfrom
starboy-3:fix/add-pyproject-toml-build-deps

Conversation

@starboy-3

Copy link
Copy Markdown

What

Adds a pyproject.toml with a PEP 518 [build-system] table so that build-time dependencies (setuptools, wheel, torch) are installed into an isolated build environment before setup.py runs.

Why

setup.py imports packaging, wheel, and torch at module level. When pip collects metadata for a source install (e.g. pip install git+https://github.com/Dao-AILab/fast-hadamard-transform.git, or when this repo is listed in a requirements.txt), it runs setup.py before any other listed dependency is available, so the imports fail.

Adding a pyproject.toml is the standard PEP 518 fix and matches the existing pattern in the sibling repo Dao-AILab/causal-conv1d (byte-for-byte identical to this PR).

Fixes #25.

setup.py imports packaging, wheel, and torch at module level, which causes
pip metadata collection to fail when installing from source (e.g. via a
git+https URL) before those packages are available in the environment.

This adds a PEP 518 [build-system] table so pip installs the build
dependencies into an isolated build environment first. The list matches
the pattern already used in Dao-AILab/causal-conv1d.

Fixes Dao-AILab#25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant