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

Feature Request: add a hatch build cli option to override the [tool.hatch.build.directory] config entry #1260

Closed
douardda opened this issue Feb 14, 2024 · 4 comments

Comments

@douardda
Copy link

A usage of this would be someone trying to build a package from a read-only device (e.g. from a RO mounted volume in a docker session). Currently it will fail with an OSError if the option [tool.hatch.build.directory] is not set to some RW location, and it will work just fine (according build plugins do the right thing as well I suppose) when setting this option in the pyproject.toml file to e.g. /tmp/dist.

It would be nice to specify it from the cli (option + environment variable) so it does not requires the pyproject file to be modified to work.

@douardda
Copy link
Author

BTW this config option does not appear to be documented currently

@ofek
Copy link
Collaborator

ofek commented Feb 14, 2024

The option from the CLI takes precedence as documented here: https://hatch.pypa.io/latest/config/build/#output-directory

@douardda
Copy link
Author

douardda commented Feb 14, 2024

The option from the CLI takes precedence as documented here: https://hatch.pypa.io/latest/config/build/#output-directory

Ah yes it's documented there, don't know why I missed it... Thanks.

But I don't see the 'option from the CLI takes precedence' part in this...

Oh! the [LOCATION] parameter of the hatch build command is the output directory! Gheez I also missed that! I thought it was the path to the source directory (à la pip install)! Thanks! (but oh so yeah for #1245).

Let's close this issue then. Thanks again.

@ofek
Copy link
Collaborator

ofek commented Feb 14, 2024

Happy to help!

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

No branches or pull requests

2 participants