How can I include all packages from src
automatically ?
#3923
-
I am currently doing this: (using the # pyproject.toml
name = "custom-learn-p"
packages = [
{include = "another_p",from="src"},
{include = "custom_learn_p",from="src"}
] is there a way to automatically include all the packages inside src, except the excluded ones obviously? Like, below is the # setup.py
setup(
[...]
packages=find_packages(where="src"),
package_dir={"": "src"},
) I am planning to use the I would love to know more about effectively using the If you have some experience with packaging in this layout, with Thanks a lot for your time. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
AFAIK there is no equivalent to Question: Why do you want multiple packages within one project? While this is possible, the usage is a bit surprisingly for the end-user. ("I installed package_a but have to use |
Beta Was this translation helpful? Give feedback.
AFAIK there is no equivalent to
find_packages
inpoetry
. You either have to name the packages like the project and put them into the root folder orsrc
folder. Than poetry can autodetect than. Or add them explicit in thepyproject.toml
("Explicit is better than implicit").Question: Why do you want multiple packages within one project? While this is possible, the usage is a bit surprisingly for the end-user. ("I installed package_a but have to use
import package_b
?". I would suggest to have only one main package and put the other packages as subpackages into it. So all packages share the same namespace (package.subpackage_a, package.subpackage_b, ...). Or if the content of these packages …