jcaiuwyo / cantera

Automatically exported from code.google.com/p/cantera
0 stars 0 forks source link

cantera 2.0: Need a way to specify where the python cantera site-package will be located #72

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
On some systems, mainly large unix multiuser machines,  the user doesn't have 
write priveledges to the python site-packages directory. The answer is to put 
the cantera python directories into the install_dir/lib directory:

   install_dir/lib/python2.6/site-packages

And then set the PYTHONPATH variable to include this directory.

Alternatively, a user may have more than one cantera python module or cantera 
installation active at a time (i.e., they're developing), and they want to 
locate the python stuff with the other cantera code.

Right now the scons code says that it's putting this in  
install_dir/lib/python2.6/site-packages, but it's actully being put in the 
default python site-packages dir.

There should be an option to choose between the two.

(redhat linux, python 2.6.4)

Original issue reported on code.google.com by hkmo...@gmail.com on 5 Apr 2012 at 5:37

GoogleCodeExporter commented 9 years ago

Original comment by yarmond on 10 Apr 2012 at 12:00

GoogleCodeExporter commented 9 years ago
Are you setting the "python_prefix" variable for SCons? I only see this 
behavior when python_prefix is unspecified.

I think it's best to keep "python_prefix" and "prefix" independent, as there 
are canonical locations on the PYTHONPATH for both system-wide installs (e.g. 
/usr/local/lib/pythonX.Y/site-packages) and user-local (e.g. 
~/.local/lib/pythonX.Y/site-packages) whereas there's not necessarily an 
obvious place to put the rest of Cantera.

Original comment by yarmond on 11 Apr 2012 at 4:10

GoogleCodeExporter commented 9 years ago
I just ran into this problem on r1421. Depending on where I wanted to install 
the Python libraries to, it did or did not work:

1. "python_prefix" unset:
Works fine, if you're allowed to write to the site-packages dir.

2. "python_prefix" == "prefix"
Also works fine.

3. "python_prefix" != "prefix"
Installation works fine. However, the SCons output at the end of "scons 
install" shows a wrong location for the python libraries, and the 
"prefix"/bin/setup_cantera file has the wrong path for the python libraries.

Hope this helps.

Original comment by thetruet...@googlemail.com on 20 Apr 2012 at 2:39

GoogleCodeExporter commented 9 years ago
The path reported by 'scons install' and the PYTHONPATH setting in 
setup_cantera are fixed in r1427. Does that resolve this issue?

Original comment by yarmond on 26 Apr 2012 at 9:23

GoogleCodeExporter commented 9 years ago
I'm closing this as I believe the issue is resolved by the changes in r1427. 
Feel free to re-open the issue and provide additional information if this is 
not correct.

Original comment by yarmond on 29 May 2012 at 7:26