PMXBOT Log file Viewer

Help | Karma | Search:

#pypa logs for Saturday the 31st of October, 2015

(Back to #pypa overview) (Back to channel listing) (Animate logs)
[06:19:26] <glyph> am I lucky enough that someone's around to tell me what the heck is going on here? https://travis-ci.org/rackerlabs/mimic/jobs/88486237
[06:31:51] <glyph> filed: https://bitbucket.org/hpk42/tox/issues/281/force-dep-breaks-when-there-are-deps-that
[22:03:39] <zermanno> Hi, I have a package installed in the site-packages directory of a virtual environment. The package is composed of two pure python modules and one extension module (.so). If I import the package from the site-packages directory (the cwd is the 'site-packages') all works. If I import the package from elsewhere (but with the virtual environment active) the import fails as it cannot find the .so module. How is it supposed t
[22:03:40] <zermanno> o work the importation of an extension module? Does it follow the same rules as pure python modules?
[22:19:21] <ionelmc> zermanno: where exactly did you put the so?
[22:19:43] <zermanno> in the same directory as the __init__.py file
[22:19:53] <ionelmc> are you sure you're using the correct virtualenv? print sys.path to check
[22:20:11] <ionelmc> better, print sys.prefix
[22:20:45] <zermanno> ionelmc, Yes correct virtualenv. If I remove the import for the shared object, the pure modules work ok from everywhere
[22:21:31] <ionelmc> zermanno: pastebin some details
[22:21:44] <ionelmc> it's really hard to guess what's going oon
[22:21:58] <ionelmc> how are you building the so?
[22:22:05] <ionelmc> a reproducer is best
[22:22:14] <zermanno> ionelmc, I am building the so with a mix of cython and cmake
[22:23:01] <ionelmc> i'm out of my league there :)
[22:23:11] <zermanno> ionelmc, what type of details do you need?
[22:23:26] <ionelmc> minimal example that reproduces the issue
[22:23:28] <zermanno> the shared object works perfectly
[22:23:31] <zermanno> mm
[22:23:58] <zermanno> ionelmc, very difficult as it requires all the build chain for the so.
[22:24:29] <zermanno> ionelmc, I am wrong thinking that the rules for importing pure modules are the same for extension modules?
[22:24:38] <zermanno> ionelmc, like paths, ecc
[22:26:45] <ionelmc> all i know is that the module name you declare in the ext (Py_InitModule3/PyModule_Create) needs to be the full import name
[22:27:02] <ionelmc> like foo.bar if you have package foo with bar.so
[22:28:24] <zermanno> ionelmc, Where can I find documentation on how extension modules work at low-level?
[22:29:09] <ionelmc> i guess https://docs.python.org/3/extending/extending.html
[22:29:29] <ionelmc> not sure really
[22:30:00] <ionelmc> i'd go mucking around the cpython sourcecode to see whats going on, or ask on the mailing list?
[22:30:45] <ionelmc> although https://docs.python.org/3/extending/extending.html is pretty comprehensive
[22:31:21] <zermanno> ionelmc, I have been spamming the cython IRC channel and mailing list for a week and nobody knows how to dealt with modules compiled outside of setuptools
[22:31:34] <zermanno> ionelmc, I'll look at the documentation, thank you!