[Distutils] custom egg metadata
"Lutz Pälike"
lutz_p at gmx.net
Mon Jan 8 15:11:53 CET 2007
I have some problems customizing the egg building process.
I want to add a custom file to the egg metadata and the documentation says
a egg_info.writers entry should work, but it looks like my definition is not evaluated. I tried to trace this down and found some more information.
This is how my args to setup look like:
{'entry_points': {
'distutils.setup_keywords':
['xyz_settings=setuptools.dist:assert_string_list'],
'egg_info.writers':
['xyz_settings.txt = setuptools.command.egg_info:write_arg']
},
'name': u'XYZ_Project',
'description': 'My XYZ Project',
'package_dir': {'': 'data/project'},
'packages': ['XYZ_Project'],
'version': '0.1'
'xyz_settings' : [
"Line 1",
"Line 2"
]
}
Now if i step through the building process in the debugger i get the following:
- distutils/dist.py:236: UserWarning: Unknown distribution option: 'xyz_settings'
- if i step until 'setuptools/command/egg_info.py(169)run()'
i see the following line:
for ep in iter_entry_points('egg_info.writers')
so this looks like the place where my 'egg_info.writers' definition is
evaluated, but if i inspect iter_entry_points('egg_info.writers')
i get the following:
[
EntryPoint.parse('requires.txt = setuptools.command.egg_info:write_requirements'),
EntryPoint.parse('PKG-INFO = setuptools.command.egg_info:write_pkg_info'),
EntryPoint.parse('eager_resources.txt = setuptools.command.egg_info:overwrite_arg'),
EntryPoint.parse('namespace_packages.txt = setuptools.command.egg_info:overwrite_arg'),
EntryPoint.parse('top_level.txt = setuptools.command.egg_info:write_toplevel_names'),
EntryPoint.parse('dependency_links.txt = setuptools.command.egg_info:overwrite_arg'),
EntryPoint.parse('entry_points.txt = setuptools.command.egg_info:write_entries'),
EntryPoint.parse('depends.txt = setuptools.command.egg_info:warn_depends_obsolete')
]
There appears no definition of xyz_settings.txt ?
Am i missing something here ?
If i look closer inside iter_entry_points()
i see the following code:
for dist in self:
entries = dist.get_entry_map(group)
if i inspect the list of Distributions in self
i get all the Distributions i installed via easy_install
to my system but not the package i am currently building.
So how is this supposed to work ?
Should'nt the Distribution i am building be in this list?
How are my entry points found then if not?
Sorry if this is obvious, but i would be glad if somebody
could give some more information here.
Thanks,
Lutz Paelike
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
More information about the Distutils-SIG
mailing list