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

add possibility to set the pyproject TOML from a custom path when running a command #7039

Closed
2 tasks done
DavidVujic opened this issue Nov 15, 2022 · 4 comments · Fixed by #6810
Closed
2 tasks done
Labels
kind/feature Feature requests/implementations status/triage This issue needs to be triaged

Comments

@DavidVujic
Copy link

  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the FAQ and general documentation and believe that my question is not already covered.

Feature Request

I think it would be a nice idea to make it possible for a Poetry command (the built-ins or from a plugin) to pass in the path to the actual pyproject.toml file.

Something like:

poetry build --path my_project/in/a/subfolder/pyproject.toml

This would be useful for scenarios when you have more than one project in a repository. With such a feature, you could run build commands from the repo top folder, instead of navigating down the directory structure.

I see two steps here:

  1. make it possible to set the pyproject property of the poetry instance. A command could then do:
self.poetry.pyproject = PyProjectTOML(custom_path)
  1. add a command option. The closest at hand would probably be the build command.
@neersighted
Copy link
Member

Addressed by #6810 already as best I can tell.

@DavidVujic
Copy link
Author

Addressed by #6810 already as best I can tell.

Great! ⭐

@damascene
Copy link

So we can now use:

poetry build --directory my_project/in/a/subfolder/

or:

poetry build -C my_project/in/a/subfolder/

considering that pyproject.toml location is:

my_project/in/a/subfolder/pyproject.toml

?

Copy link

github-actions bot commented Mar 1, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Feature requests/implementations status/triage This issue needs to be triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants