When both --module-prefix and --binding-root options are used together, the following exception appears:
Exception generating bindings: [Errno 2] No such file or directory: 'TestPrefix/init.py'
Traceback (most recent call last):
File "/alma/ACS-8.1/Python/bin/pyxbgen", line 70, in <module>
modules = generator.bindingModules()
File "/alma/ACS-8.1/Python/lib/python2.5/site-packages/pyxb/binding/generate.py", line 2388, in bindingModules
self.bindingModules = self.buildBindingModules()
File "/alma/ACS-8.1/Python/lib/python2.5/site-packages/pyxb/binding/generate.py", line 2302, in buildBindingModules
nsm = NamespaceModule(self, mr, mr_scc)
File "/alma/ACS-8.1/Python/lib/python2.5/site-packages/pyxb/binding/generate.py", line 1292, in init
self._setModulePath(generator.modulePathData(self))
File "/alma/ACS-8.1/Python/lib/python2.5/site-packages/pyxb/binding/generate.py", line 1542, in modulePathData
file(init_path, 'w')
IOError: [Errno 2] No such file or directory: 'TestPrefix/init.py'
It appears that the path information given by the binding-root option is not applied to the file name generated for the package init.py file. The generated binding file is written to the correct location however.
I've attached a script that demonstrates the fault.
Tarball containing script that demonstrates the reported fault
Fixed in [2102]. There were other problems, especially when --write-for-customization was mixed in. I added a test based on your bug report; thanks.
This will be in 1.1.1. If you have a pressing need for the fix, let me know and I'll expedite the release.