I'm trying to debug a complex situazion in which a *nspkg.pth file
creates a builtin package that brakes the import in a uwsgi process.

In this case I'm still working with Python2.7.

To be sure the package is correct I started with an "almost empty" one
(whose content is shown below) and I have this strage behaviour:
if I install using 'python setup.py install' everithing is ok, if I
install with pip the namespace seems a builtin:

   root@argo-stretch:/tmp/jmb.vega# python setup.py install
   root@argo-stretch:/tmp/jmb.vega# python -c 'import jmb; print(jmb)'
   <module 'jmb' from 

In this case the file 'jmb.vega-0.1-nspkg.pth' is NOT created
and the egg is added to 'easy-install.pth'

When doing the installation with pip

   root@argo-stretch:/tmp/jmb.vega# pip install .
   Processing /tmp/jmb.vega
   Requirement already satisfied: setuptools in 
/usr/lib/python2.7/dist-packages (from jmb.vega==0.1)
   Installing collected packages: jmb.vega
     Running setup.py install for jmb.vega ... done
   Successfully installed jmb.vega-0.1

the file 'jmb.tools-0.7-py2.7-nspkg.pth' is created and the modules
seems a built-in

   root@argo-stretch:/tmp/jmb.vega# (cd ; python -c 'import jmb; print(jmb)')
   <module 'jmb' (built-in)>

In the real case this is enought to break the import system of any
call to namespace 'jmb'.

the test package is

   ├── jmb
   │   ├── __init__.py
   │   └── vega
   │       └── __init__.py
   └── setup.py

sandro@bluff:/tmp/jmb.vega$ cat setup.py
from setuptools import setup, find_packages

    description='Test package',
    author='Alessandro Dentella',
    packages=find_packages(exclude=['tests', 'tests.*']),

While __init__ in jmb is:

sandro@bluff:/tmp/jmb.vega$ cat jmb/__init__.py

What's wrong with the configuration?
Why pip makes it a builtin package?

thanks in advance

Sandro Dentella  *:-)
http://trepalchi.it                Il portale degli artisti

http://www.reteisi.org             Soluzioni libere per le scuole
http://sqlkit.argolinux.org        SQLkit home page - PyGTK/python/sqlalchemy
Distutils-SIG maillist  -  Distutils-SIG@python.org

Reply via email to