* gps.texi:

Add documentation for GPS_PYTHONHOME.

* gnatcoll-python.adb:
(Py_SetPythonHome): New binding.

* gnatcoll-python.ads:
(Py_SetPythonHome): Declare.

* gnatcoll-scripts-python.adb:
(Register_Python_Scripting): New parameters Program_Name and Python_Home.

* gnatcoll-scripts-python.ads:
(Register_Python_Scripting): New parameters Program_Name and Python_Home,
 allowing finer control on the initialization of the Python interpreter.

* gps-main.adb:
(Init_Settings): Do not modify PYTHONHOME.
(Finish_Setup): Likewise.

* python_module.adb:
(Register_Module): Set the Python home explicitely, either to the directory
 pointed to by GPS_PYTHONHOME if it is set, or to the install dir.

For JA20-017.




git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@166155 936e1b1b-40f2-da11-902a-00137254ae57
This commit is contained in:
Nicolas Setton
2010-10-20 14:58:09 +00:00
parent 5e849765ea
commit abf012ab4b
4 changed files with 42 additions and 10 deletions

View File

@@ -1,7 +1,7 @@
-----------------------------------------------------------------------
-- G N A T C O L L --
-- --
-- Copyright (C) 2003-2009, AdaCore --
-- Copyright (C) 2003-2010, AdaCore --
-- --
-- GPS is free software; you can redistribute it and/or modify it --
-- under the terms of the GNU General Public License as published by --
@@ -34,8 +34,17 @@ package GNATCOLL.Scripts.Python is
procedure Register_Python_Scripting
(Repo : Scripts.Scripts_Repository;
Module : String);
Module : String;
Program_Name : String := "python";
Python_Home : String := "");
-- All commands and classes will be added in the specified module.
--
-- Program_Name should be the name of the program registering Python
-- scripting. The interpreter will resove run-time libraries relative to
-- this executable.
--
-- If Python_Home is non-empty, it will be used as home, and libraries will
-- be searched for in <Python_Home>/lib/python<version>
procedure Unregister_Python_Scripting
(Repo : Scripts.Scripts_Repository);