Using repo as dependency results in partial install
jnv opened this issue · comments
Jan Vlnas commented
Hi, I'd like to use this project as a dependency via Poetry, however, when I install the package from git (since the version on PyPI is vastly outdated), it seems all the submodules are missing.
Reproduction steps:
- Create a new folder
- Setup new Poetry project:
poetry init
- Add this repo as dependency:
poetry add git+https://github.com/aiwaves-cn/agents.git
- Check the
site-packages/agents
and observe that only top-level Python files are included; in my case:
.
├── evolve.py
├── __init__.py
├── SOP.py
├── State.py
├── template.py
└── utils.py
I suspect this could be regression introduced in 2ae5457. I'm no distutils expert, but it seems specifying just packages = ['agents']
will omit all subpackages (e.g. agents.LLM
).
Perhaps one option to fix it would be to combine previously removed find_packages with package_dir like this?
packages=find_packages(where='src'),
package_dir={"": "src"}