Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: fix creation of artifacts when the outdir does not exist #274

Merged
merged 1 commit into from
Jan 27, 2023

Conversation

eli-schwartz
Copy link
Member

@eli-schwartz eli-schwartz commented Jan 27, 2023

PEP 517 does not specify whether sdist_directory or wheel_directory exist, and it may or may not do so.

Some projects that create it in advance, before calling our build_sdist and build_wheel hooks:

  • pip
  • pyproject-build
  • gpep517

Some projects that do not create it:

  • pdm

This may be a general problem in the ecosystem. Since nothing is specified, no one can assume anything -- the safest thing to do is have both the build backend and the build frontend create it, in order to ensure maximum compatibility between backends and frontends.

To make matters even more fun, pdm will delete the entire directory before invoking the build hooks. So even if you previously ran pyproject-build, pdm will delete the directory, then let meson-python fail because it doesn't exist.

Fixes #273

Verified

This commit was signed with the committer’s verified signature.
eli-schwartz Eli Schwartz
PEP 517 does not specify whether sdist_directory or wheel_directory
exist, and it may or may not do so.

Some projects that create it in advance, before calling our build_sdist
and build_wheel hooks:
- pip
- pyproject-build
- gpep517

Some projects that do not create it:
- pdm

This may be a general problem in the ecosystem. Since nothing is
specified, no one can assume anything -- the safest thing to do is have
both the build backend and the build frontend create it, in order to
ensure maximum compatibility between backends and frontends.

To make matters even more fun, pdm will delete the entire directory
before invoking the build hooks. So even if you previously ran
pyproject-build, pdm will delete the directory, then let meson-python
fail because it doesn't exist.
@FFY00 FFY00 merged commit 52143ab into mesonbuild:main Jan 27, 2023
@eli-schwartz eli-schwartz deleted the pdm branch January 27, 2023 01:02
@rgommers rgommers added the bug Something isn't working label Jan 27, 2023
@rgommers rgommers added this to the v0.13.0 milestone Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants