"Frans Englich" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Hello, > > I have trouble installing a data directory which is not a child of my package > directory in the source directory. > > My source directory looks like this: > > ./setup.py > schemas/*.xsd > foo/*.py > > And when it's installed, it should look like: > > site-packages/foo/*.py > site-packages/foo/schemas/*.xsd > > In other words, schemas, from being a sibling of foo, became a child of foo. > > Now, how is this expressed in the setup.py? > > I tried this: > > setup( name="Foo", > packages=["foo"], > package_data={ "foo": ["../schemas/*.xsd"] }, > package_dir={ "foo": "foo"}, > [...] > > but it resulted in schemas being a package, not child of foo(!). > > I've read the relevant page in the reference manual, > http://www.python.org/doc/current/dist/node11.html > > but I can't find the trick. Any ideas? > > > Cheers, > > Frans >
If I interpret it correctly, "the files are expected to be part of the package in the source directories" means that you cannot specify a sibling directory as package data, so the easiest way is to make "schemas" child of foo. If this is not possible, you may check the 'data_files' option (http://www.python.org/doc/current/dist/node12.html). George -- http://mail.python.org/mailman/listinfo/python-list