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

Multiproject support #667

Closed
2 tasks done
tmirzoev opened this issue Nov 23, 2018 · 6 comments
Closed
2 tasks done

Multiproject support #667

tmirzoev opened this issue Nov 23, 2018 · 6 comments

Comments

@tmirzoev
Copy link

tmirzoev commented Nov 23, 2018

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

Hello!
From reading the docs and issues, it is rather unclear if Poetry supports working with multiple subprojects.

Like, I've got one big project A, which has several modules. I'd like to publish some of the modules as separate packages, and, preferably, with one command.

Sample project structure:
root_project_A:

  • module_1(should be packaged and published)
  • module_2 (should not be packaged)
  • module_3 (should be packaged and published)
  • pyproject.toml

How can I achieve this?
One solution is, of course, to make separate pyproject.toml for each of the modules to be packaged and run poetry build on each of them via some shell script. I could even make a poetry task for this.

But maybe there's some simpler solution?
I've read #161 #356 #167 and the subject is still a bit unclear.

@sdispater
Copy link
Member

This is not supported by Poetry and the recommended approach is to have separate pyproject.toml files.

@Conchylicultor
Copy link

@sdispater, is there any instruction on how to have two pyproject.toml on the same directory ? I would like to release two packages independently while avoiding deeply nested file hierarchy:

─ pyproject.toml
─ pyproject-2.toml
─ package1/
─ package2/

Rather than:

─ project1
   ├── pyproject.toml
   └── package1/
─ project2
   ├── pyproject.toml
   └── package2/

Another use case for which it would be useful to have two pyproject.toml in the same directory would be to release my_package (stable version) and my_package-nightly (released every night), each having their own name/version.

@finswimmer
Copy link
Member

Hello @Conchylicultor ,

if you want to release two packages independently it is absolutely best-practice to keep the project folder and therefor the pyproject.toml separated, IMO.

For your second use case: I guess this could be realized via the planned plugin system.

fin swimmer

@danieleades
Copy link
Contributor

another use-case for this-

i'm using Poetry to build gRPC bindings. I need to build multiple packages of bindings to be named and published separately, but the projects have identical dependencies, build scripts, test scripts, etc. They even share a common source directory (since the proto files form a single tree)

It would be really useful to have a single pyproject.toml file specifying multiple packages for this use case. The alternative (having a number of parallel projects) introduces a massive amount of duplication.

@sinoroc
Copy link

sinoroc commented Oct 28, 2020

Is this somehow related to the following?

I see that it is different, but I could also see some intersection between the two approaches for some use cases.

Copy link

github-actions bot commented Mar 2, 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 2, 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

No branches or pull requests

6 participants