Comments (4)
Hi @tnielens, thank you for reporting this issue!
Can you explain a bit further? I don't understand the problem. Do you have examples of pyproject.toml
to share?
from poetry-multiproject-plugin.
I recommend the long thread in issue python-poetry/poetry#2270 :).
In some of the POCs listed in the issue, dependencies between published packages are done with regular poetry dependencies (as opposed to package
relative references used by poetry-multiproject-plugin).
From the example above:
pyproject.toml -> root aggregating project
package-a/ -> subackage a
package-a/package-a/ -> sources a here
package-a/pyproject.toml
package-b/ -> subpackage b
package-b/package-b/ -> sources b here
package-b/pyproject.toml
The way I undestand the doc of this plugin, if package-a
depends on package-b
, it must be declared the following way in package-a/pyproject.toml
.
[tool.poetry]
packages = [
{ include = "package-a", from = "." },
{ include = "package-b", from = "../package-b" }
]
If the package-a
wheel is built, it will inline package-b
. But I'd like the wheel package-a
not to inline package-b
, but to declare a dependency on it as a separate published package.
This can be almost achieved by using poetry path dependencies as in
[tool.poetry.dependencies]
package_b = {path = "../package-b", develop = true}
But the issue with this second approach is that the sdist and wheel built will include a relative reference to package-b
although I'd like to substitute it with a regular dependency with the project monoversion.
See python-poetry/poetry#2270 (comment) .
from poetry-multiproject-plugin.
Thank you for the clarification!
The use case for this plugin is to share code between services, apps or libraries. This can be done in several ways but it is recommended that the actual Python code to be shared lives outside of the project(s) themselves as suggested in the docs.
About packages:
I think this might be the confusing naming convention that is used in the Python community. packages
, as used in the [tool.poetry]
section is about the Python code put in folders (also known as namespace packages) - i.e. your Python code.
The things that are added in the [tool.poetry.dependencies]
section are third-party libraries. This is usually the things you install from PyPI, but can also be added (installed) from a local folder or from a git repository. Also, a library defines its own third-party dependencies. These things - the libraries - aren't handled by the MultiProject plugin, but Poetry does this thing pretty well already.
from poetry-multiproject-plugin.
I'll close this one, because I believe there is no action to be taken right now. Please reopen this issue if you don't agree and have ideas on how to proceed 🙏
from poetry-multiproject-plugin.
Related Issues (15)
- missing support for the new "--directory" option
- check-project: does not analyze code correctly
- check-project: missing mypy in venv
- Missing `-f` option in 1.2 HOT 3
- build-project command fails due to TOML decode error with Poetry 1.5.0 on Windows HOT 2
- Resolve dependencies from external package at build time HOT 7
- Check-project generates boatload of permission denied errors HOT 2
- Support for `{ include = "*", from = "path" }` syntax HOT 9
- Poly check can't understand pillow dependency HOT 1
- Make mypy an optional dependency or loosen the dep requirement HOT 15
- One use-case for including packages breaks with --with-top-namespace=top_namespace HOT 6
- Poetry groups and build-project HOT 2
- Broken dist build paths when collecting shared packages in workspace HOT 1
- another similar plugin HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from poetry-multiproject-plugin.