[EMAIL PROTECTED] wrote:
> if package_dir is set to say "src" in setup.py than .egg-info files are
> generated in the src/ directory.
>
> this is unknown to create_distro.py
>
> if os.path.exists(os.path.join(output_dir, 'setup.py')):
> self.run_command(sys.executable, 'setup.py', 'egg_info',
> cwd=output_dir,
> # This shouldn't be necessary, but a bug in
> setuptools 0.6c3 is causing a (not entirely fatal) problem that I don't want
> to fix right now:
> expect_returncode=True)
> elif self.verbose > 1:
> print 'No setup.py (cannot run egg_info)'
>
> output_dir = os.path.join(output_dir, package_src)
> egg_info_dir = pluginlib.egg_info_dir(output_dir, dist_name)
>
> as a very bad hack I look for vars.get('package_dir) and join the subdir,
> perhaps walking the tree search for a directory ending in .egg-info would work
>
> am I just missing something obvious?
I hadn't really thought about generating setup.py files like this. This
can only really happen if package_dir is created in a generated
setup.py, and none of the setup.py files created by existing templates
include setup(package_dir=...).
Without parsing setup.py (or maybe running a subprocess to get the
information from it) it's hard to detect package_dir. I think your
technique is the best that can be done, if you want to submit a patch to
that effect.
--
Ian Bicking | [EMAIL PROTECTED] | http://blog.ianbicking.org
_______________________________________________
Paste-users mailing list
[email protected]
http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users