Fix multiple packages build#292
Conversation
|
@python-poetry/triage |
|
Hey @lucasiscovici-Loreal, could you please add test(s) that cover your changes? Thanks a lot for your contribution 👍 fin swimmer |
|
@lucasiscovici-Loreal, thanks for the mention. I'm not yet clear what I need to be aware of, or what help I can offer. How can I help here? |
Hello @kurtmckee, my bad, I wanted to talk to the poetry maintainers |
f1022f7 to
3a1cdd4
Compare
Hello, @finswimmer, it's ok |
3a1cdd4 to
c59c8ec
Compare
|
Kudos, SonarCloud Quality Gate passed!
|
|
@abn @finswimmer hello when the new release please ? |
Resolves: multiple packages build
When there are multiple packages with the "from" keyword, the
poetry buildcommand, doesn't install the packages as expected.Ex:
In fact, when poetry build, its find all the files and directories inside the path specified by the keyword 'from' ('find_files_to_add' function from poetry/core/masonry/builders/builder.py#L157) .
Next, if it's a directory, it find all files and add them with the 'BuildIncludeFile' class using the current path (self._path).
BuildIncludeFile with self._path
poetry/core/masonry/builders/builder.py#L176-L180
If it's a file, it add it with the 'BuildIncludeFile' BUT using the 'specified from keyword' (include.base) if it is defined.
BuildIncludeFile with include.base
poetry/core/masonry/builders/builder.py#L188-L199
This Pr is intented to use the 'include.base' when it's the directory (if from is defined).
So only move up to the line #L172
And use
source_root=source_rootfor the 'BuildIncludeFile' class in the directory part (#L179).