John J. Lee wrote: > On 11 Apr 2001, [iso-8859-2] Paweł Stołowski wrote: >> Now, when I put spam.py in ~/lib/python2.0, it works. But what should I >> do to make visible an extension module to the system (without cluttering >> global configuration)?. There are some Setup.* files in >> /usr/local/lib/python2.0/config/ (main python files) that list >> dependencies beetwen .py and extension modules; do I have to make a copy > [...] > Don't have a copy here to check, but if those 'Setup.*' files are setup.py > scripts, then no, you don't have to copy them anywhere -- see the > Distutils docs in the standard distribution of Python. If they're > something else, that I know not about, wait for somebody else to answer > the question. :) You don't need to copy them anywhere to make your > modules visible, though. > > For an extension module to be visible, it just has to be in sys.path. Yeah, I managed to achieve the goal! :) The problem was that *I thought*, that putting a compiled extension spam.so is the first step, and the second is to inform python not only where the modules lies, but also add something like: *share* spam spam.c to a Setup file, that was placed in /usr/local/lib/python2.0/config. And of course Setup file has nothing to do with users' extensions. It is only used by the makefiles provided with python (and may be used by users, too, to compile modules easily). The only thing an user has to do is to set PYTHONPATH to his own built extensions. That's all. Another example how one can make his life harder by himself :) Thanks for help, yogin -- ___________________________________________ Linux User #165389 ICQ #47602612 .Bydgoszcz -[http://www.komputery.bydgoszcz.pl/linux]-
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4