This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kxroberto
Recipients kxroberto, tarek
Date 2009-05-10.14:31:30
SpamBayes Score 1.4050367e-07
Marked as misclassified No
Message-id <1241965893.41.0.569280780062.issue5977@psf.upfronthosting.co.za>
In-reply-to
Content
its with any .pyx (Cython) module , when after pyximport.install() and
injection of --inplace option a .pyx module is imported.

the relevant lines in pyxbuild.py are

        dist.run_commands()
        return dist.get_command_obj("build_ext").get_outputs()[0]

which use the buggy "get_outputs" and shall return the full path of
built module to pyximport.py :

    so_path = pyxbuild.pyx_to_dll(pyxfilename, extension_mod,
                                  build_in_temp=build_in_temp,
                                  pyxbuild_dir=pyxbuild_dir,
                                  setup_args=sargs )
    assert os.path.exists(so_path), "Cannot find: %s" % so_path

=> crash with "Cannot find..." before pyximport.load_module goes to
import it.

-

A stripped down test case should perhaps 'build_ext' any arbitrary
extension module with --inplace ( a option of base command 'build' ) and
something like ...

dist.get_command_obj("build_ext").inplace=1
dist.run_commands()
so_path = dist.get_command_obj("build_ext").get_outputs()[0]
assert os.path.isfile(so_path) and os.path.dirname(so_path) in ('','.')

... will produce a invalid so_path: not pointing to actual locally
in-place built xy.pyd/.so, but to a non-existing or old file in the
build folders
History
Date User Action Args
2009-05-10 14:31:33kxrobertosetrecipients: + kxroberto, tarek
2009-05-10 14:31:33kxrobertosetmessageid: <1241965893.41.0.569280780062.issue5977@psf.upfronthosting.co.za>
2009-05-10 14:31:31kxrobertolinkissue5977 messages
2009-05-10 14:31:30kxrobertocreate