hpcugent/vsc-utils

__init__.py does not call declare_namespace()

Closed this issue · 4 comments

When installing vsc-utils using pip install git+https://github.com/hpcugent/vsc-utils, I run into the following error:

Downloading/unpacking git+https://github.com/hpcugent/vsc-utils
  Cloning https://github.com/hpcugent/vsc-utils to /var/folders/ft/8y0tpv191vsd0hvtzrd_c3kr0000gn/T/pip-xq_lYT-build
  Running setup.py (path:/var/folders/ft/8y0tpv191vsd0hvtzrd_c3kr0000gn/T/pip-xq_lYT-build/setup.py) egg_info for package from git+https://github.com/hpcugent/vsc-utils
    New target = {'maintainer': 'Andy Georges;Stijn De Weirdt', 'name': 'vsc-utils', 'namespace_packages': ['vsc', 'vsc.utils'], 'cmdclass': {'bdist_rpm': <class vsc.install.shared_setup.vsc_bdist_rpm at 0x10c814d70>, 'egg_info': <class vsc.install.shared_setup.vsc_egg_info at 0x10c814bf0>, 'install_scripts': <class vsc.install.shared_setup.vsc_install_scripts at 0x10c814cb0>}, 'author': 'Andy Georges;Stijn De Weirdt', 'download_url': 'https://github.com/hpcugent/vsc-utils', 'maintainer_email': 'andy.georges@ugent.be;stijn.deweirdt@ugent.be', 'url': 'https://github.com/hpcugent/vsc-utils', 'version': '1.6', 'scripts': [], 'author_email': 'andy.georges@ugent.be;stijn.deweirdt@ugent.be', 'install_requires': ['vsc-base >= 1.6.3', 'lockfile >= 0.9.1', 'netifaces', 'jsonpickle', 'crypto'], 'packages': ['vsc', 'vsc.utils'], 'package_dir': {'': 'lib'}}
    error: Namespace package problem: vsc is a namespace package, but its
    __init__.py does not call declare_namespace()! Please fix it.
    (See the setuptools manual under "Namespace Packages" for details.)

    Complete output from command python setup.py egg_info:
    New target = {'maintainer': 'Andy Georges;Stijn De Weirdt', 'name': 'vsc-utils', 'namespace_packages': ['vsc', 'vsc.utils'], 'cmdclass': {'bdist_rpm': <class vsc.install.shared_setup.vsc_bdist_rpm at 0x10c814d70>, 'egg_info': <class vsc.install.shared_setup.vsc_egg_info at 0x10c814bf0>, 'install_scripts': <class vsc.install.shared_setup.vsc_install_scripts at 0x10c814cb0>}, 'author': 'Andy Georges;Stijn De Weirdt', 'download_url': 'https://github.com/hpcugent/vsc-utils', 'maintainer_email': 'andy.georges@ugent.be;stijn.deweirdt@ugent.be', 'url': 'https://github.com/hpcugent/vsc-utils', 'version': '1.6', 'scripts': [], 'author_email': 'andy.georges@ugent.be;stijn.deweirdt@ugent.be', 'install_requires': ['vsc-base >= 1.6.3', 'lockfile >= 0.9.1', 'netifaces', 'jsonpickle', 'crypto'], 'packages': ['vsc', 'vsc.utils'], 'package_dir': {'': 'lib'}}

running egg_info

creating pip-egg-info/vsc_utils.egg-info

writing requirements to pip-egg-info/vsc_utils.egg-info/requires.txt

writing pip-egg-info/vsc_utils.egg-info/PKG-INFO

writing namespace_packages to pip-egg-info/vsc_utils.egg-info/namespace_packages.txt

writing top-level names to pip-egg-info/vsc_utils.egg-info/top_level.txt

writing dependency_links to pip-egg-info/vsc_utils.egg-info/dependency_links.txt

writing manifest file 'pip-egg-info/vsc_utils.egg-info/SOURCES.txt'

warning: manifest_maker: standard file '-c' not found

error: Namespace package problem: vsc is a namespace package, but its

__init__.py does not call declare_namespace()! Please fix it.

(See the setuptools manual under "Namespace Packages" for details.)

please open a pull request.

also, evaluate how this affects spreading the vsc namespace across multiple directories, since that's quite important

does the extend_path trick still work when declare_namespace is used?

Actually, don't use pip

the __init__.py has

__path__ = extend_path(__path__, __name__)  #@ReservedAssignment

in it, which is enought.

Pip should not complain here, try using easy_install ;-)

easy_install results in the same error:

Downloading https://github.com/Silox/vsc-utils/archive/master.tar.gz
Processing master.tar.gz
Writing /var/folders/ft/8y0tpv191vsd0hvtzrd_c3kr0000gn/T/easy_install-SEaDS7/vsc-utils-master/setup.cfg
Running vsc-utils-master/setup.py -q bdist_egg --dist-dir /var/folders/ft/8y0tpv191vsd0hvtzrd_c3kr0000gn/T/easy_install-SEaDS7/vsc-utils-master/egg-dist-tmp-F2kLws
New target = {'maintainer': 'Andy Georges;Stijn De Weirdt', 'name': 'vsc-utils', 'namespace_packages': ['vsc', 'vsc.utils'], 'cmdclass': {'bdist_rpm': <class vsc.install.shared_setup.vsc_bdist_rpm at 0x10cf21d70>, 'egg_info': <class vsc.install.shared_setup.vsc_egg_info at 0x10cf21bf0>, 'install_scripts': <class vsc.install.shared_setup.vsc_install_scripts at 0x10cf21cb0>}, 'author': 'Andy Georges;Stijn De Weirdt', 'download_url': 'https://github.com/hpcugent/vsc-utils', 'maintainer_email': 'andy.georges@ugent.be;stijn.deweirdt@ugent.be', 'url': 'https://github.com/hpcugent/vsc-utils', 'version': '1.6', 'scripts': [], 'author_email': 'andy.georges@ugent.be;stijn.deweirdt@ugent.be', 'install_requires': ['vsc-base >= 1.6.3', 'lockfile >= 0.9.1', 'netifaces', 'jsonpickle', 'crypto'], 'packages': ['vsc', 'vsc.utils'], 'package_dir': {'': 'lib'}}
error: Setup script exited with error: Namespace package problem: vsc is a namespace package, but its
__init__.py does not call declare_namespace()! Please fix it.
(See the setuptools manual under "Namespace Packages" for details.)