|
Link Here
|
| 712 |
|
712 |
|
| 713 |
# Build the 'stub' code. |
713 |
# Build the 'stub' code. |
| 714 |
cppcode = self.cpptemplate % {"moduledir": self.data_dir, |
714 |
cppcode = self.cpptemplate % {"moduledir": self.data_dir, |
|
|
715 |
"extramodule": os.getenv("EXTRA_MODULE_DIR"), |
| 715 |
"modulename": modulename, |
716 |
"modulename": modulename, |
| 716 |
"factoryfunction": factoryfunction, |
717 |
"factoryfunction": factoryfunction, |
| 717 |
"python_version": python_version} |
718 |
"python_version": python_version} |
|
Link Here
|
| 854 |
#include <sip.h> |
855 |
#include <sip.h> |
| 855 |
|
856 |
|
| 856 |
#define MODULE_DIR "%(moduledir)s" |
857 |
#define MODULE_DIR "%(moduledir)s" |
|
|
858 |
#define EXTRA_MODULE_DIR "%(extramodule)s" |
| 857 |
#define MODULE_NAME "%(modulename)s" |
859 |
#define MODULE_NAME "%(modulename)s" |
| 858 |
#define FACTORY "%(factoryfunction)s" |
860 |
#define FACTORY "%(factoryfunction)s" |
| 859 |
#define CPP_FACTORY %(factoryfunction)s |
861 |
#define CPP_FACTORY %(factoryfunction)s |
|
Link Here
|
| 903 |
if(!pyize->appendToSysPath (path.latin1 ())) { |
905 |
if(!pyize->appendToSysPath (path.latin1 ())) { |
| 904 |
return report_error ("***Failed to set sys.path\n"); |
906 |
return report_error ("***Failed to set sys.path\n"); |
| 905 |
} |
907 |
} |
|
|
908 |
|
| 909 |
// Add the extra path to the python script to the interpreter search path. |
| 910 |
TQString extrapath = TQString(EXTRA_MODULE_DIR); |
| 911 |
if(!pyize->appendToSysPath (extrapath.latin1 ())) { |
| 912 |
return report_error ("***Failed to set extra sys.path\n"); |
| 913 |
} |
| 906 |
|
914 |
|
| 907 |
// Load the Python script. |
915 |
// Load the Python script. |
| 908 |
PyObject *pyModule = pyize->importModule ((char *)script.latin1 ()); |
916 |
PyObject *pyModule = pyize->importModule ((char *)script.latin1 ()); |