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

pdm build may error out since the dist/ directory doesn't exist #1647

Closed
eli-schwartz opened this issue Jan 27, 2023 · 1 comment · Fixed by j178/pdm#1
Closed

pdm build may error out since the dist/ directory doesn't exist #1647

eli-schwartz opened this issue Jan 27, 2023 · 1 comment · Fixed by j178/pdm#1
Labels
🐛 bug Something isn't working

Comments

@eli-schwartz
Copy link

See e.g. mesonbuild/meson-python#273

Here's an example project: https://github.com/pyOpenSci/examplePy/tree/main/example6_pdm_meson

It uses pdm as a project manager, but meson-python as the pep517 compliant build backend. mkdir dist/ && pdm build --no-clean works. Remove the --no-clean flag and it fails.

PEP 517 doesn't say whose responsibility it is to create the sdist_directory / wheel_directory. Some frontends, such as build, create it for you. PDM doesn't, apparently. Also, some backends do create it for you, I guess (I have not researched this, I assume pdm-backend does because it's presumably frequently used with PDM, and one of the two must create it).

IMHO the only viable solution here is for both backends and frontends to create that directory, because they cannot rely on the other doing it. So PDM should start to create that directory.

@eli-schwartz eli-schwartz added the 🐛 bug Something isn't working label Jan 27, 2023
@eli-schwartz eli-schwartz changed the title pdm build may error out if the dist/ directory doesn't exist pdm build may error out when the dist/ directory doesn't exist Jan 27, 2023
@eli-schwartz eli-schwartz changed the title pdm build may error out when the dist/ directory doesn't exist pdm build may error out since the dist/ directory doesn't exist Jan 27, 2023
@lwasser
Copy link

lwasser commented Jan 27, 2023

hi 👋 @eli-schwartz @frostming !! Thank you for opening this issue. i plan to test a bit more later today given the fix now in the meson-python repo! i also am seeing here that i could use a flag --no-clean as well. i will experiment with that too later.

@frostming i'm playing with packaging workflows that will be ideal for those newer to packaging as a part of an organization called pyOpenSci that supports and provides peer review of scientific python packages . We are now working on a packaging guide that overviews the ecosystem of tools and which tools might be best for which users. I did not realize that PDM had a default behavior of removing the dist dir!

Many thanks for your work here on PDM. it seems to be a fantastic tool and I really appreciate the flexibility when selecting envt managers, etc!

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 a pull request may close this issue.

2 participants