multiple packages are created when installing `nemo_toolkit`
Hello, when installing nemo using pip, files under multiple package names are created as shown below
mainly examples, scripts, and tests, these can be imported using import scripts for example which breaks any python project that uses the same import statement to import from a local folder and conflict with published PYPI packages with the same names, they cannot be deleted unless the folder is deleted using rm -rf or uninstalling the whole nemo package
This issue is caused by not passing the correct arguments to setuptools.find_packages(), I can open a PR to fix the issue if this behavior is not intended
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
not stale
This is an AI-generated response. Please verify.
You're right about the issue. When installing NeMo, directories like examples, scripts, and tests are being incorrectly packaged as importable Python packages, causing potential import conflicts with local folders of the same name.
This happens because the setup.py file is likely using setuptools.find_packages() without proper exclusion parameters. The fix would be to modify the setup.py file to use:
packages=find_packages(exclude=["examples", "scripts", "tests"])
Your offer to open a PR to fix this issue would be helpful, as this appears to be an oversight in the package configuration. This would prevent these development directories from being installed as importable packages while maintaining their availability in the source repository.