-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for including modules from different locations (#108)
* Fix for including modules from different locations When we define multiple packages from different source locations, Poetry currently only uses the last specified from= location. This patch adds explicit paths to package_dir for additional packages. This fixes python-poetry/poetry#1811, fixes python-poetry/poetry#2354, and possibly even python-poetry/poetry#2450. * Test the fix for including modules from different locations When we try to include moduleA from libA and moduleB from libB then package_dir in the generated setup.py must to contain either one or both `"moduleA": "libA/moduleA"` or `"moduleB": "libB/moduleB"` so we are able to find both modules when building the source dist. `ns["package_dir"].keys() == {"", "module_b"}` should always be true, so we don't have to test for module_a in `ns["package_dir"]`.
- Loading branch information
Showing
5 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
15 changes: 15 additions & 0 deletions
15
tests/masonry/builders/fixtures/split_source/pyproject.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[tool.poetry] | ||
name = "split-source" | ||
version = "0.1" | ||
description = "Combine packages from different locations." | ||
authors = [ | ||
"Jan Harkes <jaharkes@cs.cmu.edu>" | ||
] | ||
license = "MIT" | ||
packages = [ | ||
{ include = "module_a", from = "lib_a" }, | ||
{ include = "module_b", from = "lib_b" }, | ||
] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.6" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters