vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Peter wrote: > Perl and Python programs must be installed in the language's installation > directory, period. I don't know about Perl, but this statement is absolutely false as far as Python modules are concerned. Python modules can be stored anywhere on your "python path", a list of searched directories which can be appended to using the PYTHONPATH environment variable, or at runtime from within the python program. As for where the modules will install by default, a setup.py script will place the modules in the appropriate site-packages directory for the python executable that is used to run the setup.py script. Python packages that include compilation of C code often provide a setup.py script that works this way. If not, there may be a configure option to specify which python you'd like to install to. A system might have more than one python installed, so a configure script cannot be expected to guess which one you intend to use. I've never installed pygtk specifically, so I can't speak to its relative brokeness in this regard. It is highly unlikely that mercurial installed to *both* /usr/lib and /usr/local/lib on its own. More likely, the installation was run twice, using each of two python executables. Hope that helps clear up the matter. Jeffrey |
| |||
| Jeffrey Froman <jeffrey@fro.man> wrote: > It is highly unlikely that mercurial installed to *both* /usr/lib > and /usr/local/lib on its own. More likely, the installation was run twice, > using each of two python executables. When I now look back at how mercurial was installed I see that the source package contains both a setup.py and a Makefile. My standardized installation does the following: if [ -f Makefile ]; then make install; else true; fi && \ if [ -f makefile ]; then make install; else true; fi && \ if [ -f setup.py ]; then python setup.py install; else true; fi && \ true So, in this case my guess is that both "python setup.py install" and "make install" was run. With their default settings they probably did choose to install in different directories. regards Henrik -- The address in the header is only to prevent spam. My real address is: hc1(at)poolhem.se Examples of addresses which go to spammers: root@localhost postmaster@localhost |
| ||||
| On Sun, 19 Aug 2007 09:36:07 -0700, Jeffrey Froman <jeffrey@fro.man> wrote: >Peter wrote: > >> Perl and Python programs must be installed in the language's installation >> directory, period. > >I don't know about Perl, but this statement is absolutely false as far as >Python modules are concerned. Python modules can be stored anywhere on >your "python path", >Jeffrey Same with Perl. When you install, a Perl binary is installed at /usr/bin/perl (or /usr/local/bin/perl ). When perl is invoked, it looks at it's "internally defined" build location, where all the modules are installed. (i.e. /usr/lib/perl5 ) When you install a Perl module, thru the normal install process, Perl will automatically store it in the correct location. If you want to "manually" install a module, you will need to copy it in to Perl's build directory manually. This may be what you are talking about, as your problem, and is risky, because Perl has a highly structured modules directory system. What you are supposed to do, is setup the ENV variable PERL5LIB In .bashrc export PERL5LIB=$PERL5LIB:/home/zentara/perl5lib Now you can manually put any modules in that directory. BUT.... don't confuse modules with programs. To run a Perl script, you usually make the shebang line point to perl, like the top line of script should be: #!/usr/bin/perl or maybe #!/usr/local/bin/perl or run perl scriptname (here perl is found in the path, usually /usr/bin/perl) and it takes the script as first argument on the commandline. So Perl scripts can be located anywhere on your system, just like a bash shell script. Hope that clears things up, zentara -- I'm not really a human, but I play one on earth. http://zentara.net/japh.html |