I have a namespace package with folder structure as: CompanyName\DepartmentName\SubDepartmentName\PkgName
Python 3.3 onwards supports namespace packages so I have not place the __init__.py
files in the following folders:
CompanyName
DepartmentName
SubDepartmentName
In the setup.py I have place the following piece of code setuptools.find_namespace_packages()
instead of setuptools.find_packages()
.
When I try to build the sdist, using the following commands:
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools wheel
python setup.py sdist
I get the following error:
package init file 'CompanyName\__init__.py' not found (or not a regular file)
package init file 'CompanyName\DepartmentName\__init__.py' not found (or not a regular file)
package init file 'CompanyName\DepartmentName\SubDepartmentName\__init__.py' not found (or not a regular file)
I have the task setup as part of azure devops pipeline's command line task and have set 'Fail on standard error' to true. The pipeline fails due to the above error.