Setup.py not respecting package_dir during develop

Discussion in 'Python' started by disappearedng@gmail.com, Nov 24, 2012.

  1. Guest

    This is my current project setup:

    ..
    ├── README.md
    ├── build
    │ ├── bdist.macosx-10.8-intel
    │ └── lib
    ├── dist
    │ └── giordano-0.1-py2.7.egg
    ├── giordano.egg-info
    │ ├── PKG-INFO
    │ ├── SOURCES.txt
    │ ├── dependency_links.txt
    │ ├── not-zip-safe
    │ └── top_level.txt
    ├── requirements.txt
    ├── setup.py
    ├── src
    │ ├── giordano
    │ └── spider
    ├── test.txt
    └── venv
    ├── bin
    ├── include
    ├── lib
    └── share

    And this is my setup file:

    from setuptools import setup
    setup(name='giordano',
    version='0.1',
    packages=['giordano'],
    package_dir={'giordano': 'src/giordano'},
    zip_safe=False)

    When I do python setup.py install, I am able to `import giordano` in my code without problems.

    However, when I am doing python setup.py develop, this is the console output:

    [venv] fixSetup$ python setup.py develop
    running develop
    running egg_info
    writing giordano.egg-info/PKG-INFO
    writing top-level names to giordano.egg-info/top_level.txt
    writing dependency_links to giordano.egg-info/dependency_links.txt
    reading manifest file 'giordano.egg-info/SOURCES.txt'
    writing manifest file 'giordano.egg-info/SOURCES.txt'
    running build_ext
    Creating /Users/blah/Dropbox/projects/Giordano/venv/lib/python2.7/site-packages/giordano.egg-link (link to .)
    Removing giordano 0.1 from easy-install.pth file
    Adding giordano 0.1 to easy-install.pth file

    Installed /Users/blah/Dropbox/projects/Giordano
    Processing dependencies for giordano==0.1
    Finished processing dependencies for giordano==0.1

    This is what the .egg.link looks like:

    /Users/blah/Dropbox/projects/Giordano
    ..

    I can no longer `import giordano` in my code now.

    **If I `touch src/__init__.py`, I am able to `from src import giordano` anywhere outside of this directory. So I am 100% certain that the egg is pointing to here rather than what package_dir specified.**

    Any ideas why develop is not respecting package_dir?
     
    , Nov 24, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. peter

    distutils package_dir newbie

    peter, Aug 3, 2005, in forum: Python
    Replies:
    4
    Views:
    1,763
    peter
    Aug 3, 2005
  2. Steve Hershoff
    Replies:
    0
    Views:
    420
    Steve Hershoff
    Aug 9, 2006
  3. R. David Murray
    Replies:
    8
    Views:
    612
    Tim Chase
    Mar 27, 2009
  4. Terry Reedy
    Replies:
    1
    Views:
    335
    John Machin
    Mar 26, 2009
  5. Steve Hershoff

    DataGrid paging-- OnItemCommand not respecting page number?

    Steve Hershoff, Aug 9, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    211
    Steve Hershoff
    Aug 9, 2006
Loading...

Share This Page