Skip to content

Conversation

justinchuby
Copy link
Member

@justinchuby justinchuby commented Aug 31, 2023

Enable editable builds for pip install -e . by fixing a path not found error in setup.py.

Previously Develop calls BuildExt which assumes the directory {build_lib}/onnx exists because BuildPy would create it. However BuildPy is not called in editable build, thus not creating the directory for BuildExt to put the artifacts in. This change updates BuildExt to create the directory for its own use independent of previous steps.

  • Remove CreateVersion and moved the logic into a function to parameterize it
  • General cleanup and refactor logic

Tested with

pip install -e .
pip install .
python -m build
python -m build --sdist
python setup.py develop

Reference: pypa/setuptools#3606

Fixes #4539

justinchuby and others added 18 commits April 5, 2023 18:49
Signed-off-by: Justin Chu <justinchu@microsoft.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
@justinchuby justinchuby requested a review from a team as a code owner August 31, 2023 23:19
@justinchuby justinchuby marked this pull request as draft August 31, 2023 23:19
Signed-off-by: Justin Chu <justinchu@microsoft.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
@justinchuby justinchuby marked this pull request as ready for review September 5, 2023 17:32
@justinchuby justinchuby requested a review from jcwchen September 5, 2023 17:35
@jcwchen jcwchen added run release CIs Use this label to trigger release tests in CI topic: build Issues related to ONNX builds and packages labels Sep 5, 2023
Signed-off-by: Justin Chu <justinchu@microsoft.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
@justinchuby justinchuby force-pushed the justinchu/cleanup-setup-editable branch from a17d8ad to 156a62a Compare September 7, 2023 00:37
Signed-off-by: Justin Chu <justinchu@microsoft.com>
justinchuby and others added 4 commits September 6, 2023 18:13
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
@justinchuby
Copy link
Member Author

@jcwchen this should be ready

Signed-off-by: Justin Chu <justinchu@microsoft.com>
Signed-off-by: Justin Chu <justinchu@microsoft.com>
@justinchuby
Copy link
Member Author

Windows not working

Signed-off-by: Justin Chu <justinchu@microsoft.com>
@justinchuby justinchuby force-pushed the justinchu/cleanup-setup-editable branch from 242a562 to 61a2708 Compare September 7, 2023 18:37
@justinchuby justinchuby disabled auto-merge September 7, 2023 18:38
@justinchuby justinchuby changed the title Support editable builds Support Python editable builds Sep 7, 2023
@justinchuby justinchuby added this pull request to the merge queue Sep 7, 2023
Merged via the queue into onnx:main with commit a39995c Sep 7, 2023
@justinchuby justinchuby deleted the justinchu/cleanup-setup-editable branch September 7, 2023 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run release CIs Use this label to trigger release tests in CI topic: build Issues related to ONNX builds and packages
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Build error with the latest setuptool
3 participants