Message167484
I've put together a patch adding the test requested. There is no problem on my Ubuntu machine with python 3.3.
There is a comment in the file saying Don't load the xx module more than once, I am unsure whether my patch (using a renamed c file) violates this?
One extremely minor nitpick that I'll mention is inconsistency with spaces in the module name. One can create a python file "my file.py" and can import it with __import__("my file"). I couldn't do the same for a C extension.
Building a C extension with distutils:
module_name = 'ex ample'
example_ext = Extension(module_name, [target_c])
dist = Distribution({'name': module_name, 'ext_modules': [example_ext]})
Doesn't work due to the import mechanism looks for a PyInit function with the new module name (including a space):
ImportError: dynamic module does not define init function (PyInit_ex ample)
I don't think this is worth making a ticket over. |
|
Date |
User |
Action |
Args |
2012-08-05 10:58:47 | Thorney | set | recipients:
+ Thorney, loewis, ceball, tarek, eric.araujo, ipatrol, alexis, fishdude |
2012-08-05 10:58:47 | Thorney | set | messageid: <1344164327.39.0.187481612786.issue4508@psf.upfronthosting.co.za> |
2012-08-05 10:58:46 | Thorney | link | issue4508 messages |
2012-08-05 10:58:46 | Thorney | create | |
|