[Distutils] buildout: referencing sub-project with bad directory form

John Calcote john.calcote at gmail.com
Thu Jan 26 19:49:12 CET 2012


Hi,

 

I'm new to buildout. The project I'm working on uses pywbem
(http://pywbem.sf.net), which seems to have some bad form in its project
directory structure. Since pywbem isn't up on PyPI, I've checked out the
project from sf.net as a subdirectory of my project. Here's a tree listing
of my project directory (the basic structure was built by paster using the
modern_project_template):

 

c:\...\my-project>tree /A

.

+---pywbem

|   +---irecv

|   \---testsuite

|       \---testmofs

\---src

    +---myproject

    \---my_project.egg-info

 

Note that the pywbem sub-directory has no src directory. Its setup.py looks
like this:

 

from distutils.core import setup, Extension

import sys, string, os

import shutil

 

import mof_compiler

mof_compiler._build()

 

args = {'name': 'pywbem',

        'author': 'Tim Potter',

        'author_email': 'tpot at hp.com',

        'description': 'Python WBEM client library',

        'long_description': __doc__,

        'platforms': ['any'],

        'url': 'http://pywbem.sf.net/',

        'version': '0.7.0',

        'license': 'LGPLv2',

        'packages': ['pywbem'],

        # Make packages in root dir appear in pywbem module

        'package_dir': {'pywbem': ''}, 

        # Make extensions in root dir appear in pywbem module

        'ext_package': 'pywbem',

        }

 

setup(**args)

 

The problem I'm having is that when I add pywbem as a devel directory to my
buildout.cfg file, the sys.path is configured to assume that pywbem has a
src directory so it can't find the module because '.' Is not in the
sys.path. Only my own 'src' directory - and 'pywbem', of course. 

 

I was about to reorganize the pywbem project a bit, but I thought I'd ask if
anyone has any ideas on how to get buildout to consume pywbem in its current
form. I don't own the project, and I have no developer rights to it, so I'd
like to make as few changes as possible to it.

 

Thanks in advance,

John Calcote

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20120126/0626c809/attachment-0001.html>


More information about the Distutils-SIG mailing list