Add pyproject.toml declaring build-time dependencies#30
Open
starboy-3 wants to merge 1 commit into
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a
pyproject.tomlwith a PEP 518[build-system]table so that build-time dependencies (setuptools,wheel,torch) are installed into an isolated build environment beforesetup.pyruns.Why
setup.pyimportspackaging,wheel, andtorchat 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 arequirements.txt), it runssetup.pybefore any other listed dependency is available, so the imports fail.Adding a
pyproject.tomlis 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.