damnever / pigar

:coffee: A tool to generate requirements.txt for Python project, and more than that. (IT IS NOT A PACKAGE MANAGEMENT TOOL)

Home Page:https://damnever.github.io/pigar/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Namespace packages get collapsed into a single package

ns-ggeorgiev opened this issue · comments

Describe the bug
When two or more packages share namespace, the tools seems to believe that all of the files in the namespace belong to one of the packages (it seems like the first one alphabetically)

To Reproduce
Steps to reproduce the behavior:

  1. Create two packages as described here: https://packaging.python.org/en/latest/guides/packaging-namespace-packages/#pkgutil-style-namespace-packages

  2. Create app that imports files from both

  3. run the tool and observe the suggested list will not include one of the packages

Expected behavior
All packages that have imports should be included.

Could you please provide an environment with the minimum requirements to reproduce this issue?