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 an option to set output directory on build #7208

Closed
wants to merge 1 commit into from

Conversation

Secrus
Copy link
Member

@Secrus Secrus commented Dec 16, 2022

Pull Request Check List

Waiting for: python-poetry/poetry-core#527
Resolves: #3586

  • Added tests for changed code.
  • Updated documentation for changed code.

The build command has currently no tests, not sure whether to start making them from here or make it a separate task.

@AdamWRichardson
Copy link

@Secrus Thanks for doing the frontend for me! I did similar changes locally but didn't know how I should test it so didn't push anything, do you have any thoughts on the testing?

@Secrus Secrus changed the title Add an option to set ouput directory on build Add an option to set output directory on build Jan 7, 2023
@Secrus Secrus mentioned this pull request Jan 15, 2023
src/poetry/console/commands/build.py Outdated Show resolved Hide resolved
@Secrus
Copy link
Member Author

Secrus commented Jan 27, 2023

Just so I don't forget it later: This change also requires changes to publishing process, since currently, the source directory for build artifacts is hardcoded in publishing code

@Secrus
Copy link
Member Author

Secrus commented Jan 27, 2023

@Secrus Thanks for doing the frontend for me! I did similar changes locally but didn't know how I should test it so didn't push anything, do you have any thoughts on the testing?

forgot to reply to you. I will probably create a test building one of our fixture projects and test whether it is created in the directory it was told to build in.

@@ -31,6 +32,6 @@ def handle(self) -> int:
)

builder = Builder(self.poetry)
builder.build(fmt, executable=env.python)
builder.build(fmt, executable=env.python, target_dir=self.option("output"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested it, but I'm afraid that now the default behavior would be to use a dist folder relative to the current working directory instead of relative to the pyproject.toml file.

Furthermore target_dir expects Path and not str :)

@fd0r
Copy link

fd0r commented Apr 11, 2023

Hello,

I saw that poetry-core 1.5.0 was released and I would like to contribute on this if I could/need be. 😄
@Secrus do you want to handle this PR or can I fork this PR to try to tackle this?

Best regards

@Secrus
Copy link
Member Author

Secrus commented Apr 18, 2023

@fd0r feel free to take this over.

@selevit
Copy link

selevit commented Aug 25, 2023

Would also love to have this feature.

@fd0r
Copy link

fd0r commented Aug 25, 2023

I didn't have much time to work on this recently, I'll try to free some time to finish this

@Secrus
Copy link
Member Author

Secrus commented Jan 2, 2024

Superseded by #8828

@Secrus Secrus closed this Jan 2, 2024
@Secrus Secrus deleted the build-output-frontend branch January 2, 2024 03:47
Copy link

github-actions bot commented Mar 3, 2024

This pull request 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 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

poetry build -o (was: allow configuring "dist" folder during build)
5 participants