View | Details | Raw Unified | Return to issue 123975
Collapse All | Expand All

(-)pyuno/inc/pyuno/pyuno.hxx (-1 / +4 lines)
Lines 80-88 Link Here
80
    preconditions: python has been initialized before and
80
    preconditions: python has been initialized before and
81
                   the global interpreter lock is held 
81
                   the global interpreter lock is held 
82
*/
82
*/
83
#if PY_MAJOR_VERSION >= 3
84
extern "C" PyMODINIT_FUNC PyInit_pyuno(void);
85
#else
83
extern "C" PY_DLLEXPORT void SAL_CALL initpyuno();
86
extern "C" PY_DLLEXPORT void SAL_CALL initpyuno();
87
#endif
84
88
85
86
namespace pyuno
89
namespace pyuno
87
{
90
{
88
91
(-)pyuno/source/loader/pythonloader.py (-3 / +2 lines)
Lines 21-27 Link Here
21
import uno
21
import uno
22
import unohelper
22
import unohelper
23
import sys
23
import sys
24
import imp
25
import os
24
import os
26
from com.sun.star.uno import Exception,RuntimeException
25
from com.sun.star.uno import Exception,RuntimeException
27
from com.sun.star.loader import XImplementationLoader
26
from com.sun.star.loader import XImplementationLoader
Lines 84-97 Link Here
84
                # did we load the module already ?
83
                # did we load the module already ?
85
                mod = g_loadedComponents.get( url )
84
                mod = g_loadedComponents.get( url )
86
                if not mod:
85
                if not mod:
87
                    mod = imp.new_module("uno_component")
86
                    mod = type(sys)("uno_component")
88
87
89
                    # check for pythonpath.zip beside .py files
88
                    # check for pythonpath.zip beside .py files
90
                    checkForPythonPathBesideComponent( url[0:url.rfind('/')] )
89
                    checkForPythonPathBesideComponent( url[0:url.rfind('/')] )
91
90
92
                    # read the file
91
                    # read the file
93
                    filename = unohelper.fileUrlToSystemPath( url )
92
                    filename = unohelper.fileUrlToSystemPath( url )
94
                    fileHandle = file( filename )
93
                    fileHandle = open( filename )
95
                    src = fileHandle.read().replace("\r","")
94
                    src = fileHandle.read().replace("\r","")
96
                    if not src.endswith( "\n" ):
95
                    if not src.endswith( "\n" ):
97
                        src = src + "\n"
96
                        src = src + "\n"
(-)pyuno/source/loader/pyuno_loader.cxx (+10 lines)
Lines 112-120 Link Here
112
{
112
{
113
    OUString systemPythonHome;
113
    OUString systemPythonHome;
114
    osl_getSystemPathFromFileURL( pythonHome.pData, &(systemPythonHome.pData) );
114
    osl_getSystemPathFromFileURL( pythonHome.pData, &(systemPythonHome.pData) );
115
#if PY_VERSION_HEX > 0x03010000
116
#if SIZEOF_WCHAR_T == 4
117
    rtl::OUString envVar(RTL_CONSTASCII_USTRINGPARAM("PYTHONHOME"));
118
    osl_setEnvironment(envVar.pData, systemPythonHome.pData);
119
#else
120
    rtl_uString_acquire( systemPythonHome.pData );
121
    Py_SetPythonHome( (wchar_t *)systemPythonHome.pData->buffer );
122
#endif
123
#else
115
    OString o = rtl::OUStringToOString( systemPythonHome, osl_getThreadTextEncoding() );
124
    OString o = rtl::OUStringToOString( systemPythonHome, osl_getThreadTextEncoding() );
116
    rtl_string_acquire(o.pData); // leak this string (thats the api!)
125
    rtl_string_acquire(o.pData); // leak this string (thats the api!)
117
    Py_SetPythonHome( o.pData->buffer);
126
    Py_SetPythonHome( o.pData->buffer);
127
#endif
118
}
128
}
119
129
120
static void prependPythonPath( const OUString & pythonPathBootstrap )
130
static void prependPythonPath( const OUString & pythonPathBootstrap )
(-)pyuno/source/module/pyuno.cxx (-2 / +2 lines)
Lines 615-621 Link Here
615
}
615
}
616
616
617
#if PY_MAJOR_VERSION >= 3
617
#if PY_MAJOR_VERSION >= 3
618
static PyObject *PyUNO_dir( PyObject *self, PyObject *that )
618
static PyObject *PyUNO_dir( PyObject *self, PyObject */* that */ )
619
{
619
{
620
    PyUNO* me;
620
    PyUNO* me;
621
    PyObject* member_list;
621
    PyObject* member_list;
Lines 703-709 Link Here
703
703
704
static struct PyMethodDef PyUNO_methods[] = {
704
static struct PyMethodDef PyUNO_methods[] = {
705
    { "__dir__", (PyCFunction)PyUNO_dir, METH_VARARGS, NULL},
705
    { "__dir__", (PyCFunction)PyUNO_dir, METH_VARARGS, NULL},
706
    { NULL, NULL }
706
    { NULL, NULL, 0, NULL }
707
};
707
};
708
708
709
#else
709
#else
(-)pyuno/source/module/pyuno_dlopenwrapper.c (+15 lines)
Lines 33-44 Link Here
33
#endif
33
#endif
34
#include <dlfcn.h>
34
#include <dlfcn.h>
35
35
36
#include <Python.h>
37
38
39
#if PY_MAJOR_VERSION >= 3
40
void PyInit_pyuno(void)
41
#else
36
void initpyuno ()
42
void initpyuno ()
43
#endif
37
{
44
{
38
    Dl_info dl_info;
45
    Dl_info dl_info;
39
    void (*func)(void);
46
    void (*func)(void);
40
47
48
#if PY_MAJOR_VERSION >= 3
49
    if (dladdr((void*)&PyInit_pyuno, &dl_info) != 0) { 
50
#else
41
    if (dladdr((void*)&initpyuno, &dl_info) != 0) { 
51
    if (dladdr((void*)&initpyuno, &dl_info) != 0) { 
52
#endif
42
        void* h = 0;
53
        void* h = 0;
43
	size_t len = strrchr(dl_info.dli_fname, '/') - dl_info.dli_fname + 1;
54
	size_t len = strrchr(dl_info.dli_fname, '/') - dl_info.dli_fname + 1;
44
	char* libname = malloc(len + RTL_CONSTASCII_LENGTH( SAL_DLLPREFIX "pyuno" SAL_DLLEXTENSION ) + 1);
55
	char* libname = malloc(len + RTL_CONSTASCII_LENGTH( SAL_DLLPREFIX "pyuno" SAL_DLLEXTENSION ) + 1);
Lines 49-55 Link Here
49
	free(libname);
60
	free(libname);
50
        if( h )
61
        if( h )
51
        {
62
        {
63
#if PY_MAJOR_VERSION >= 3
64
            func = (void (*)())dlsym (h, "PyInit_pyuno");
65
#else
52
            func = (void (*)())dlsym (h, "initpyuno");
66
            func = (void (*)())dlsym (h, "initpyuno");
67
#endif
53
            (func) ();
68
            (func) ();
54
        }
69
        }
55
    } 
70
    } 
(-)pyuno/source/module/pyuno_module.cxx (-1 / +5 lines)
Lines 740-746 Link Here
740
    const_cast< char * >("pyuno"),
740
    const_cast< char * >("pyuno"),
741
    NULL,
741
    NULL,
742
    -1,
742
    -1,
743
    PyUNOModule_methods
743
    PyUNOModule_methods, 
744
    NULL, 
745
    NULL, 
746
    NULL, 
747
    NULL
744
};
748
};
745
#endif
749
#endif
746
}
750
}
(-)pyuno/source/module/pyuno_type.cxx (-4 / +4 lines)
Lines 312-327 Link Here
312
                    OString enumElementName(
312
                    OString enumElementName(
313
                        OUStringToOString( pDesc->ppEnumNames[i], RTL_TEXTENCODING_ASCII_US) );
313
                        OUStringToOString( pDesc->ppEnumNames[i], RTL_TEXTENCODING_ASCII_US) );
314
#if PY_VERSION_HEX >= 0x03030000
314
#if PY_VERSION_HEX >= 0x03030000
315
                    const char *name = PyUnicode_AsUTF8(str);
315
                    const char *elementName = PyUnicode_AsUTF8(str);
316
#elif PY_MAJOR_VERSION > 3
316
#elif PY_MAJOR_VERSION > 3
317
                    PyRef *pUtf8( PyUnicode_AsUTF8String( str ), SAL_NO_ACQUIRE );
317
                    PyRef *pUtf8( PyUnicode_AsUTF8String( str ), SAL_NO_ACQUIRE );
318
                    const char *name = PyBytes_AsString( pUtf8.get() );
318
                    const char *elementName = PyBytes_AsString( pUtf8.get() );
319
#else
319
#else
320
                    const char *name = PyBytes_AsString(str);
320
                    const char *elementName = PyBytes_AsString(str);
321
#endif
321
#endif
322
                    PyDict_SetItemString(
322
                    PyDict_SetItemString(
323
                        dict, (char*)enumElementName.getStr(),
323
                        dict, (char*)enumElementName.getStr(),
324
                        PyUNO_Enum_new(name, enumElementName.getStr(), runtime ) );
324
                        PyUNO_Enum_new(elementName, enumElementName.getStr(), runtime ) );
325
                }
325
                }
326
            }
326
            }
327
            Py_INCREF( Py_None );
327
            Py_INCREF( Py_None );
(-)pyuno/zipcore/makefile.mk (-2 / +2 lines)
Lines 61-67 Link Here
61
FILES=\
61
FILES=\
62
	$(PYTHONBINARY)	\
62
	$(PYTHONBINARY)	\
63
	$(foreach,i,$(FINDLIBFILES) $(DESTROOT)$/lib$(i)) \
63
	$(foreach,i,$(FINDLIBFILES) $(DESTROOT)$/lib$(i)) \
64
	$(foreach,i,$(FINDINCFILES) $(DESTROOT)$/include$/python$(PYMAJOR).$(PYMINOR)$(i))
64
	$(foreach,i,$(FINDINCFILES) $(DESTROOT)$/include$/python$(PYMAJOR).$(PYMINOR)m$(i))
65
65
66
.IF "$(OS)" == "WNT"
66
.IF "$(OS)" == "WNT"
67
APP1TARGET = python
67
APP1TARGET = python
Lines 106-112 Link Here
106
	-rm -f $@
106
	-rm -f $@
107
	cat $< > $@
107
	cat $< > $@
108
108
109
$(DESTROOT)$/include$/python$(PYMAJOR).$(PYMINOR)%: $(SOLARINCDIR)$/python$/%
109
$(DESTROOT)$/include$/python$(PYMAJOR).$(PYMINOR)m%: $(SOLARINCDIR)$/python$/%
110
	-$(MKDIRHIER) $(@:d)
110
	-$(MKDIRHIER) $(@:d)
111
	-rm -f $@
111
	-rm -f $@
112
	cat $< > $@
112
	cat $< > $@
(-)python/makefile.mk (-4 / +4 lines)
Lines 42-57 Link Here
42
42
43
43
44
TARFILE_NAME=Python-$(PYVERSION)
44
TARFILE_NAME=Python-$(PYVERSION)
45
TARFILE_MD5=6334b666b7ff2038c761d7b27ba699c1
45
TARFILE_MD5=f3ebe34d4d8695bf889279b54673e10c
46
PATCH_FILES=\
46
PATCH_FILES=\
47
	python-solaris.patch \
48
	python-freebsd.patch \
49
	python-md5.patch \
47
	python-md5.patch \
50
	python-ssl.patch \
48
	python-ssl.patch \
51
	python-solver-before-std.patch \
49
	python-solver-before-std.patch \
52
	python-$(PYVERSION)-sysbase.patch \
50
	python-$(PYVERSION)-sysbase.patch \
53
	python-$(PYVERSION)-nohardlink.patch \
51
	python-$(PYVERSION)-nohardlink.patch \
54
	python-$(PYVERSION)-pcbuild.patch
52
	python-$(PYVERSION)-pcbuild.patch
53
#	python-solaris.patch \
54
#	python-freebsd.patch \
55
55
56
CONFIGURE_DIR=
56
CONFIGURE_DIR=
57
57
Lines 109-115 Link Here
109
#.ENDIF #"$(WINDOWS_VISTA_PSDK)"!=""
109
#.ENDIF #"$(WINDOWS_VISTA_PSDK)"!=""
110
#.ENDIF
110
#.ENDIF
111
111
112
BUILD_DIR=PCbuild
112
BUILD_DIR=PC$/VS9.0
113
113
114
# Build python executable and then runs a minimal script. Running the minimal script
114
# Build python executable and then runs a minimal script. Running the minimal script
115
# ensures that certain *.pyc files are generated which would otherwise be created on
115
# ensures that certain *.pyc files are generated which would otherwise be created on
(-)python/prj/d.lst (-85 / +130 lines)
Lines 1-114 Link Here
1
mkdir: %_DEST%\lib%_EXT%\python
1
mkdir: %_DEST%\lib%_EXT%\python
2
mkdir: %_DEST%\lib%_EXT%\python\lib-old
2
mkdir: %_DEST%\lib%_EXT%\python\collections
3
mkdir: %_DEST%\lib%_EXT%\python\lib-tk
3
mkdir: %_DEST%\lib%_EXT%\python\concurrent
4
mkdir: %_DEST%\lib%_EXT%\python\site-packages
4
mkdir: %_DEST%\lib%_EXT%\python\concurrent\futures
5
mkdir: %_DEST%\lib%_EXT%\python\encodings
5
mkdir: %_DEST%\lib%_EXT%\python\ctypes
6
mkdir: %_DEST%\lib%_EXT%\python\ctypes\macholib
7
mkdir: %_DEST%\lib%_EXT%\python\ctypes\test
8
mkdir: %_DEST%\lib%_EXT%\python\curses
9
mkdir: %_DEST%\lib%_EXT%\python\dbm
10
mkdir: %_DEST%\lib%_EXT%\python\distutils
11
mkdir: %_DEST%\lib%_EXT%\python\distutils\command
12
mkdir: %_DEST%\lib%_EXT%\python\distutils\tests
6
mkdir: %_DEST%\lib%_EXT%\python\email
13
mkdir: %_DEST%\lib%_EXT%\python\email
7
mkdir: %_DEST%\lib%_EXT%\python\email\mime
14
mkdir: %_DEST%\lib%_EXT%\python\email\mime
8
mkdir: %_DEST%\lib%_EXT%\python\compiler
15
mkdir: %_DEST%\lib%_EXT%\python\encodings
9
mkdir: %_DEST%\lib%_EXT%\python\hotshot
16
mkdir: %_DEST%\lib%_EXT%\python\html
10
mkdir: %_DEST%\lib%_EXT%\python\distutils
17
mkdir: %_DEST%\lib%_EXT%\python\http
11
mkdir: %_DEST%\lib%_EXT%\python\distutils\command
12
mkdir: %_DEST%\lib%_EXT%\python\xml
13
mkdir: %_DEST%\lib%_EXT%\python\xml\dom
14
mkdir: %_DEST%\lib%_EXT%\python\xml\parsers
15
mkdir: %_DEST%\lib%_EXT%\python\xml\sax
16
mkdir: %_DEST%\lib%_EXT%\python\xml\etree
17
mkdir: %_DEST%\lib%_EXT%\python\curses
18
mkdir: %_DEST%\lib%_EXT%\python\plat-linux2
19
mkdir: %_DEST%\lib%_EXT%\python\config
20
mkdir: %_DEST%\lib%_EXT%\python\lib-dynload
21
mkdir: %_DEST%\lib%_EXT%\python\bsddb
22
mkdir: %_DEST%\lib%_EXT%\python\logging
23
mkdir: %_DEST%\lib%_EXT%\python\idlelib
18
mkdir: %_DEST%\lib%_EXT%\python\idlelib
24
mkdir: %_DEST%\lib%_EXT%\python\idlelib\Icons
19
mkdir: %_DEST%\lib%_EXT%\python\idlelib\Icons
25
mkdir: %_DEST%\lib%_EXT%\python\wsgiref
20
mkdir: %_DEST%\lib%_EXT%\python\importlib
26
mkdir: %_DEST%\lib%_EXT%\python\json
21
mkdir: %_DEST%\lib%_EXT%\python\json
27
mkdir: %_DEST%\lib%_EXT%\python\lib2to3
22
mkdir: %_DEST%\lib%_EXT%\python\lib2to3
28
mkdir: %_DEST%\lib%_EXT%\python\lib2to3\fixes
23
mkdir: %_DEST%\lib%_EXT%\python\lib2to3\fixes
29
mkdir: %_DEST%\lib%_EXT%\python\lib2to3\pgen2
24
mkdir: %_DEST%\lib%_EXT%\python\lib2to3\pgen2
30
mkdir: %_DEST%\lib%_EXT%\python\sqlite3
25
mkdir: %_DEST%\lib%_EXT%\python\lib2to3\tests
31
mkdir: %_DEST%\lib%_EXT%\python\ctypes
26
mkdir: %_DEST%\lib%_EXT%\python\lib2to3\tests\data
32
mkdir: %_DEST%\lib%_EXT%\python\ctypes\macholib
27
mkdir: %_DEST%\lib%_EXT%\python\lib2to3\tests\data\fixers
33
mkdir: %_DEST%\lib%_EXT%\python\importlib
28
mkdir: %_DEST%\lib%_EXT%\python\lib2to3\tests\data\fixers\myfixes
29
mkdir: %_DEST%\lib%_EXT%\python\logging
34
mkdir: %_DEST%\lib%_EXT%\python\multiprocessing
30
mkdir: %_DEST%\lib%_EXT%\python\multiprocessing
35
mkdir: %_DEST%\lib%_EXT%\python\multiprocessing\dummy
31
mkdir: %_DEST%\lib%_EXT%\python\multiprocessing\dummy
32
mkdir: %_DEST%\lib%_EXT%\python\pydoc_data
33
mkdir: %_DEST%\lib%_EXT%\python\site-packages
34
mkdir: %_DEST%\lib%_EXT%\python\sqlite3
35
mkdir: %_DEST%\lib%_EXT%\python\sqlite3\test
36
mkdir: %_DEST%\lib%_EXT%\python\tkinter
37
mkdir: %_DEST%\lib%_EXT%\python\tkinter\test
38
mkdir: %_DEST%\lib%_EXT%\python\tkinter\test\test_tkinter
39
mkdir: %_DEST%\lib%_EXT%\python\tkinter\test\test_ttk
40
mkdir: %_DEST%\lib%_EXT%\python\turtledemo
36
mkdir: %_DEST%\lib%_EXT%\python\unittest
41
mkdir: %_DEST%\lib%_EXT%\python\unittest
37
mkdir: %_DEST%\lib%_EXT%\python\python2.7\config
42
mkdir: %_DEST%\lib%_EXT%\python\unittest\test
43
mkdir: %_DEST%\lib%_EXT%\python\unittest\test\testmock
44
mkdir: %_DEST%\lib%_EXT%\python\urllib
45
mkdir: %_DEST%\lib%_EXT%\python\venv
46
mkdir: %_DEST%\lib%_EXT%\python\venv\scripts
47
mkdir: %_DEST%\lib%_EXT%\python\venv\scripts\nt
48
mkdir: %_DEST%\lib%_EXT%\python\venv\scripts\posix
49
mkdir: %_DEST%\lib%_EXT%\python\wsgiref
50
mkdir: %_DEST%\lib%_EXT%\python\xml
51
mkdir: %_DEST%\lib%_EXT%\python\xml\dom
52
mkdir: %_DEST%\lib%_EXT%\python\xml\etree
53
mkdir: %_DEST%\lib%_EXT%\python\xml\parsers
54
mkdir: %_DEST%\lib%_EXT%\python\xml\sax
55
mkdir: %_DEST%\lib%_EXT%\python\xmlrpc
56
mkdir: %_DEST%\lib%_EXT%\python\plat-linux
57
mkdir: %_DEST%\lib%_EXT%\python\config-3.3m
58
mkdir: %_DEST%\lib%_EXT%\python\lib-dynload
38
59
39
..\%__SRC%\misc\build\Python-2.7.5\Lib\* %_DEST%\lib%_EXT%\python\*
60
..\%__SRC%\misc\build\Python-3.3.3\Lib\* %_DEST%\lib%_EXT%\python\*
40
..\%__SRC%\misc\build\Python-2.7.5\Lib\lib-old\* %_DEST%\lib%_EXT%\python\lib-old\*
61
..\%__SRC%\misc\build\Python-3.3.3\Lib\collections\* %_DEST%\lib%_EXT%\python\collections\*
41
..\%__SRC%\misc\build\Python-2.7.5\Lib\lib-tk\* %_DEST%\lib%_EXT%\python\lib-tk\*
62
..\%__SRC%\misc\build\Python-3.3.3\Lib\concurrent\* %_DEST%\lib%_EXT%\python\concurrent\*
42
..\%__SRC%\misc\build\Python-2.7.5\Lib\site-packages\* %_DEST%\lib%_EXT%\python\site-packages\*
63
..\%__SRC%\misc\build\Python-3.3.3\Lib\concurrent\futures\* %_DEST%\lib%_EXT%\python\concurrent\futures\*
43
..\%__SRC%\misc\build\Python-2.7.5\Lib\encodings\* %_DEST%\lib%_EXT%\python\encodings\*
64
..\%__SRC%\misc\build\Python-3.3.3\Lib\ctypes\* %_DEST%\lib%_EXT%\python\ctypes\*
44
..\%__SRC%\misc\build\Python-2.7.5\Lib\email\* %_DEST%\lib%_EXT%\python\email\*
65
..\%__SRC%\misc\build\Python-3.3.3\Lib\ctypes\macholib\* %_DEST%\lib%_EXT%\python\ctypes\macholib\*
45
..\%__SRC%\misc\build\Python-2.7.5\Lib\email\mime\* %_DEST%\lib%_EXT%\python\email\mime\*
66
..\%__SRC%\misc\build\Python-3.3.3\Lib\ctypes\test\* %_DEST%\lib%_EXT%\python\ctypes\test\*
46
..\%__SRC%\misc\build\Python-2.7.5\Lib\compiler\* %_DEST%\lib%_EXT%\python\compiler\*
67
..\%__SRC%\misc\build\Python-3.3.3\Lib\curses\* %_DEST%\lib%_EXT%\python\curses\*
47
..\%__SRC%\misc\build\Python-2.7.5\Lib\hotshot\* %_DEST%\lib%_EXT%\python\hotshot\*
68
..\%__SRC%\misc\build\Python-3.3.3\Lib\dbm\* %_DEST%\lib%_EXT%\python\dbm\*
48
..\%__SRC%\misc\build\Python-2.7.5\Lib\distutils\* %_DEST%\lib%_EXT%\python\distutils\*
69
..\%__SRC%\misc\build\Python-3.3.3\Lib\distutils\* %_DEST%\lib%_EXT%\python\distutils\*
49
..\%__SRC%\misc\build\Python-2.7.5\Lib\distutils\command\* %_DEST%\lib%_EXT%\python\distutils\command\*
70
..\%__SRC%\misc\build\Python-3.3.3\Lib\distutils\command\* %_DEST%\lib%_EXT%\python\distutils\command\*
50
..\%__SRC%\misc\build\Python-2.7.5\Lib\xml\* %_DEST%\lib%_EXT%\python\xml\*
71
..\%__SRC%\misc\build\Python-3.3.3\Lib\distutils\tests\* %_DEST%\lib%_EXT%\python\distutils\tests\*
51
..\%__SRC%\misc\build\Python-2.7.5\Lib\xml\dom\* %_DEST%\lib%_EXT%\python\xml\dom\*
72
..\%__SRC%\misc\build\Python-3.3.3\Lib\email\* %_DEST%\lib%_EXT%\python\email\*
52
..\%__SRC%\misc\build\Python-2.7.5\Lib\xml\parsers\* %_DEST%\lib%_EXT%\python\xml\parsers\*
73
..\%__SRC%\misc\build\Python-3.3.3\Lib\email\mime\* %_DEST%\lib%_EXT%\python\email\mime\*
53
..\%__SRC%\misc\build\Python-2.7.5\Lib\xml\sax\* %_DEST%\lib%_EXT%\python\xml\sax\*
74
..\%__SRC%\misc\build\Python-3.3.3\Lib\encodings\* %_DEST%\lib%_EXT%\python\encodings\*
54
..\%__SRC%\misc\build\Python-2.7.5\Lib\curses\* %_DEST%\lib%_EXT%\python\curses\*
75
..\%__SRC%\misc\build\Python-3.3.3\Lib\html\* %_DEST%\lib%_EXT%\python\html\*
55
..\%__SRC%\misc\build\Python-2.7.5\Lib\plat-linux2\* %_DEST%\lib%_EXT%\python\plat-linux2\*
76
..\%__SRC%\misc\build\Python-3.3.3\Lib\http\* %_DEST%\lib%_EXT%\python\http\*
56
..\%__SRC%\misc\build\Python-2.7.5\Lib\config\* %_DEST%\lib%_EXT%\python\config\*
77
..\%__SRC%\misc\build\Python-3.3.3\Lib\http\* %_DEST%\lib%_EXT%\python\http\*
57
..\%__SRC%\misc\build\Python-2.7.5\Lib\bsddb\* %_DEST%\lib%_EXT%\python\bsddb\*
78
..\%__SRC%\misc\build\Python-3.3.3\Lib\idlelib\* %_DEST%\lib%_EXT%\python\idlelib\*
58
..\%__SRC%\misc\build\Python-2.7.5\Lib\logging\* %_DEST%\lib%_EXT%\python\logging\*
79
..\%__SRC%\misc\build\Python-3.3.3\Lib\idlelib\Icons\* %_DEST%\lib%_EXT%\python\idlelib\Icons\*
59
..\%__SRC%\misc\build\Python-2.7.5\Lib\idlelib\* %_DEST%\lib%_EXT%\python\idlelib\*
80
..\%__SRC%\misc\build\Python-3.3.3\Lib\importlib\* %_DEST%\lib%_EXT%\python\importlib\*
60
..\%__SRC%\misc\build\Python-2.7.5\Lib\idlelib\Icons\* %_DEST%\lib%_EXT%\python\idlelib\Icons\*
81
..\%__SRC%\misc\build\Python-3.3.3\Lib\json\* %_DEST%\lib%_EXT%\python\json\*
61
..\%__SRC%\misc\build\Python-2.7.5\Lib\wsgiref\* %_DEST%\lib%_EXT%\python\wsgiref\*
82
..\%__SRC%\misc\build\Python-3.3.3\Lib\lib2to3\* %_DEST%\lib%_EXT%\python\lib2to3\*
62
..\%__SRC%\misc\build\Python-2.7.5\Lib\json\* %_DEST%\lib%_EXT%\python\json\*
83
..\%__SRC%\misc\build\Python-3.3.3\Lib\lib2to3\fixes\* %_DEST%\lib%_EXT%\python\lib2to3\fixes\*
63
..\%__SRC%\misc\build\Python-2.7.5\Lib\lib2to3\* %_DEST%\lib%_EXT%\python\lib2to3\*
84
..\%__SRC%\misc\build\Python-3.3.3\Lib\lib2to3\pgen2\* %_DEST%\lib%_EXT%\python\lib2to3\pgen2\*
64
..\%__SRC%\misc\build\Python-2.7.5\Lib\lib2to3\fixes\* %_DEST%\lib%_EXT%\python\lib2to3\fixes\*
85
..\%__SRC%\misc\build\Python-3.3.3\Lib\lib2to3\tests\* %_DEST%\lib%_EXT%\python\lib2to3\tests\*
65
..\%__SRC%\misc\build\Python-2.7.5\Lib\lib2to3\pgen2\* %_DEST%\lib%_EXT%\python\lib2to3\pgen2\*
86
..\%__SRC%\misc\build\Python-3.3.3\Lib\lib2to3\tests\data\* %_DEST%\lib%_EXT%\python\lib2to3\tests\data\*
66
..\%__SRC%\misc\build\Python-2.7.5\Lib\sqlite3\* %_DEST%\lib%_EXT%\python\sqlite3\*
87
..\%__SRC%\misc\build\Python-3.3.3\Lib\lib2to3\tests\data\fixers\* %_DEST%\lib%_EXT%\python\lib2to3\tests\data\fixers\*
67
..\%__SRC%\misc\build\Python-2.7.5\Lib\ctypes\* %_DEST%\lib%_EXT%\python\ctypes\*
88
..\%__SRC%\misc\build\Python-3.3.3\Lib\lib2to3\tests\data\fixers\myfixes\* %_DEST%\lib%_EXT%\python\lib2to3\tests\data\fixers\myfixes\*
68
..\%__SRC%\misc\build\Python-2.7.5\Lib\ctypes\macholib\* %_DEST%\lib%_EXT%\python\ctypes\macholib\*
89
..\%__SRC%\misc\build\Python-3.3.3\Lib\logging\* %_DEST%\lib%_EXT%\python\logging\*
69
..\%__SRC%\misc\build\Python-2.7.5\Lib\xml\etree\* %_DEST%\lib%_EXT%\python\xml\etree
90
..\%__SRC%\misc\build\Python-3.3.3\Lib\multiprocessing\* %_DEST%\lib%_EXT%\python\multiprocessing\*
70
..\%__SRC%\misc\build\Python-2.7.5\Lib\xml\etree\* %_DEST%\lib%_EXT%\python\xml\etree
91
..\%__SRC%\misc\build\Python-3.3.3\Lib\multiprocessing\dummy\* %_DEST%\lib%_EXT%\python\multiprocessing\dummy\*
71
..\%__SRC%\misc\build\Python-2.7.5\Lib\importlib\* %_DEST%\lib%_EXT%\python\importlib\*
92
..\%__SRC%\misc\build\Python-3.3.3\Lib\pydoc_data\* %_DEST%\lib%_EXT%\python\pydoc_data\*
72
..\%__SRC%\misc\build\Python-2.7.5\Lib\multiprocessing\* %_DEST%\lib%_EXT%\python\multiprocessing\*
93
..\%__SRC%\misc\build\Python-3.3.3\Lib\site-packages\* %_DEST%\lib%_EXT%\python\site-packages\*
73
..\%__SRC%\misc\build\Python-2.7.5\Lib\multiprocessing\dummy\* %_DEST%\lib%_EXT%\python\multiprocessing\dummy\*
94
..\%__SRC%\misc\build\Python-3.3.3\Lib\sqlite3\* %_DEST%\lib%_EXT%\python\sqlite3\*
74
..\%__SRC%\misc\build\Python-2.7.5\Lib\unittest\* %_DEST%\lib%_EXT%\python\unittest\*
95
..\%__SRC%\misc\build\Python-3.3.3\Lib\sqlite3\test\* %_DEST%\lib%_EXT%\python\sqlite3\test\*
75
..\%__SRC%\misc\build\Python-2.7.5\Makefile %_DEST%\lib%_EXT%\python\python2.7\config\Makefile
96
..\%__SRC%\misc\build\Python-3.3.3\Lib\tkinter\* %_DEST%\lib%_EXT%\python\tkinter\*
76
..\%__SRC%\misc\build\python-inst\lib\python2.7\_sysconfigdata.py %_DEST%\lib%_EXT%\python\_sysconfigdata.py
97
..\%__SRC%\misc\build\Python-3.3.3\Lib\tkinter\test\* %_DEST%\lib%_EXT%\python\tkinter\test\*
98
..\%__SRC%\misc\build\Python-3.3.3\Lib\tkinter\test\test_tkinter\* %_DEST%\lib%_EXT%\python\tkinter\test\test_tkinter\*
99
..\%__SRC%\misc\build\Python-3.3.3\Lib\tkinter\test\test_ttk\* %_DEST%\lib%_EXT%\python\tkinter\test\test_ttk\*
100
..\%__SRC%\misc\build\Python-3.3.3\Lib\turtledemo\* %_DEST%\lib%_EXT%\python\turtledemo\*
101
..\%__SRC%\misc\build\Python-3.3.3\Lib\unittest\* %_DEST%\lib%_EXT%\python\unittest\*
102
..\%__SRC%\misc\build\Python-3.3.3\Lib\unittest\test\* %_DEST%\lib%_EXT%\python\unittest\test\*
103
..\%__SRC%\misc\build\Python-3.3.3\Lib\unittest\test\testmock\* %_DEST%\lib%_EXT%\python\unittest\test\testmock\*
104
..\%__SRC%\misc\build\Python-3.3.3\Lib\urllib\* %_DEST%\lib%_EXT%\python\urllib\*
105
..\%__SRC%\misc\build\Python-3.3.3\Lib\venv\* %_DEST%\lib%_EXT%\python\venv\*
106
..\%__SRC%\misc\build\Python-3.3.3\Lib\venv\scripts\nt\* %_DEST%\lib%_EXT%\python\venv\scripts\nt\*
107
..\%__SRC%\misc\build\Python-3.3.3\Lib\venv\scripts\posix\* %_DEST%\lib%_EXT%\python\venv\scripts\posix\*
108
..\%__SRC%\misc\build\Python-3.3.3\Lib\wsgiref\* %_DEST%\lib%_EXT%\python\wsgiref\*
109
..\%__SRC%\misc\build\Python-3.3.3\Lib\xml\* %_DEST%\lib%_EXT%\python\xml\*
110
..\%__SRC%\misc\build\Python-3.3.3\Lib\xml\dom\* %_DEST%\lib%_EXT%\python\xml\dom\*
111
..\%__SRC%\misc\build\Python-3.3.3\Lib\xml\etree\* %_DEST%\lib%_EXT%\python\xml\etree
112
..\%__SRC%\misc\build\Python-3.3.3\Lib\xml\parsers\* %_DEST%\lib%_EXT%\python\xml\parsers\*
113
..\%__SRC%\misc\build\Python-3.3.3\Lib\xml\sax\* %_DEST%\lib%_EXT%\python\xml\sax\*
114
..\%__SRC%\misc\build\Python-3.3.3\Lib\xmlrpc\* %_DEST%\lib%_EXT%\python\xmlrpc\*
115
116
..\%__SRC%\misc\build\Python-3.3.3\Makefile %_DEST%\lib%_EXT%\python\config-3.3m\Makefile
77
..\pyversion.mk %_DEST%\inc%_EXT%\pyversion.mk
117
..\pyversion.mk %_DEST%\inc%_EXT%\pyversion.mk
118
..\%__SRC%\misc\build\Python-3.3.3\Include\* %_DEST%\inc%_EXT%\python\*
78
119
79
..\%__SRC%\misc\build\Python-2.7.5\Include\* %_DEST%\inc%_EXT%\python\*
80
81
#unix ONLY !
120
#unix ONLY !
121
..\%__SRC%\misc\build\python-inst\lib\python3.3\_sysconfigdata.py %_DEST%\lib%_EXT%\python\_sysconfigdata.py
122
..\%__SRC%\misc\build\Python-3.3.3\Lib\plat-linux\* %_DEST%\lib%_EXT%\python\plat-linux\*
82
..\%__SRC%\misc\build\python-inst\bin\python %_DEST%\bin%_EXT%\python
123
..\%__SRC%\misc\build\python-inst\bin\python %_DEST%\bin%_EXT%\python
83
..\%__SRC%\misc\build\Python-2.7.5\pyconfig.h %_DEST%\inc%_EXT%\python\pyconfig.h
124
..\%__SRC%\misc\build\Python-3.3.3\pyconfig.h %_DEST%\inc%_EXT%\python\pyconfig.h
84
..\%__SRC%\misc\build\python-inst\lib\python2.7\lib-dynload\* %_DEST%\lib%_EXT%\python\lib-dynload\*
125
..\%__SRC%\misc\build\python-inst\lib\python3.3\lib-dynload\* %_DEST%\lib%_EXT%\python\lib-dynload\*
85
..\%__SRC%\misc\build\python-inst\bin\python2.7 %_DEST%\bin%_EXT%\python
126
..\%__SRC%\misc\build\python-inst\bin\python3.3 %_DEST%\bin%_EXT%\python
86
..\%__SRC%\misc\build\python-inst\lib\libpython2.7.so.1.0 %_DEST%\lib%_EXT%\libpython2.7.so.1.0
127
..\%__SRC%\misc\build\python-inst\lib\libpython3.3m.so.1.0 %_DEST%\lib%_EXT%\libpython3.3m.so.1.0
87
symlink: %_DEST%\lib%_EXT%\libpython2.7.so.1.0 %_DEST%\lib%_EXT%\libpython2.7.so
128
symlink: %_DEST%\lib%_EXT%\libpython3.3m.so.1.0 %_DEST%\lib%_EXT%\libpython3.3m.so
88
129
89
# MacOS X
130
# MacOS X
90
..\%__SRC%\misc\build\python-inst\lib\libpython2.7.dylib %_DEST%\lib%_EXT%\libpython2.7.dylib
131
..\%__SRC%\misc\build\python-inst\lib\libpython2.7.dylib %_DEST%\lib%_EXT%\libpython2.7.dylib
91
132
92
#MingW ONLY !
133
#MingW ONLY !
93
..\%__SRC%\misc\build\python-inst\bin\python.exe %_DEST%\bin%_EXT%\python.exe
134
..\%__SRC%\misc\build\python-inst\bin\python.exe %_DEST%\bin%_EXT%\python.exe
94
..\%__SRC%\misc\build\Python-2.7.5\libpython2.7.dll %_DEST%\bin%_EXT%\libpython2.7.dll
135
..\%__SRC%\misc\build\Python-3.3.3\libpython2.7.dll %_DEST%\bin%_EXT%\libpython2.7.dll
95
136
96
# WINDOWS ONLY !
137
# WINDOWS ONLY !
97
..\%__SRC%\misc\build\pyconfig.h %_DEST%\inc%_EXT%\python\pyconfig.h
138
..\%__SRC%\misc\build\pyconfig.h %_DEST%\inc%_EXT%\python\pyconfig.h
98
..\%__SRC%\misc\build\Python-2.7.5\PCbuild\python.exe %_DEST%\bin%_EXT%\python.exe
139
..\%__SRC%\misc\build\Python-3.3.3\PC\VS9.0\python.exe %_DEST%\bin%_EXT%\python.exe
99
..\%__SRC%\misc\build\Python-2.7.5\PCbuild\python27.dll %_DEST%\bin%_EXT%\python27.dll
140
..\%__SRC%\misc\build\Python-3.3.3\PC\VS9.0\python33.dll %_DEST%\bin%_EXT%\python33.dll
100
..\%__SRC%\misc\build\Python-2.7.5\PCbuild\python27.lib %_DEST%\lib%_EXT%\python27.lib
141
..\%__SRC%\misc\build\Python-3.3.3\PC\VS9.0\python33.lib %_DEST%\lib%_EXT%\python33.lib
101
..\%__SRC%\misc\build\Python-2.7.5\PCbuild\_socket.pyd %_DEST%\lib%_EXT%\python\_socket.pyd
142
..\%__SRC%\misc\build\Python-3.3.3\PC\VS9.0\_ctypes.pyd %_DEST%\lib%_EXT%\python\_ctypes.pyd
102
..\%__SRC%\misc\build\Python-2.7.5\PCbuild\_ssl.pyd %_DEST%\lib%_EXT%\python\_ssl.pyd
143
..\%__SRC%\misc\build\Python-3.3.3\PC\VS9.0\_ctypes_test.pyd %_DEST%\lib%_EXT%\python\_ctypes_test.pyd
103
..\%__SRC%\misc\build\Python-2.7.5\PCbuild\select.pyd %_DEST%\lib%_EXT%\python\select.pyd
144
..\%__SRC%\misc\build\Python-3.3.3\PC\VS9.0\_decimal.pyd %_DEST%\lib%_EXT%\python\_decimal.pyd
104
..\%__SRC%\misc\build\Python-2.7.5\PCbuild\unicodedata.pyd %_DEST%\lib%_EXT%\python\unicodedata.pyd
145
..\%__SRC%\misc\build\Python-3.3.3\PC\VS9.0\_elementtree.pyd %_DEST%\lib%_EXT%\python\_elementtree.pyd
105
..\%__SRC%\misc\build\Python-2.7.5\PCbuild\winsound.pyd %_DEST%\lib%_EXT%\python\winsound.pyd
146
..\%__SRC%\misc\build\Python-3.3.3\PC\VS9.0\_msi.pyd %_DEST%\lib%_EXT%\python\_msi.pyd
106
..\%__SRC%\misc\build\Python-2.7.5\PCbuild\pyexpat.pyd %_DEST%\lib%_EXT%\python\pyexpat.pyd
147
..\%__SRC%\misc\build\Python-3.3.3\PC\VS9.0\_multiprocessing.pyd %_DEST%\lib%_EXT%\python\_multiprocessing.pyd
107
..\%__SRC%\misc\build\Python-2.7.5\PCbuild\_testcapi.pyd %_DEST%\lib%_EXT%\python\_testcapi.pyd
148
..\%__SRC%\misc\build\Python-3.3.3\PC\VS9.0\_socket.pyd %_DEST%\lib%_EXT%\python\_socket.pyd
108
..\%__SRC%\misc\build\Python-2.7.5\PCbuild\_multiprocessing.pyd %_DEST%\lib%_EXT%\python\_multiprocessing.pyd
149
..\%__SRC%\misc\build\Python-3.3.3\PC\VS9.0\_ssl.pyd %_DEST%\lib%_EXT%\python\_ssl.pyd
109
..\%__SRC%\misc\build\Python-2.7.5\PCbuild\_msi.pyd %_DEST%\lib%_EXT%\python\_msi.pyd
150
..\%__SRC%\misc\build\Python-3.3.3\PC\VS9.0\_testbuffer.pyd %_DEST%\lib%_EXT%\python\_testbuffer.pyd
110
..\%__SRC%\misc\build\Python-2.7.5\PCbuild\_elementtree.pyd %_DEST%\lib%_EXT%\python\_elementtree.pyd
151
..\%__SRC%\misc\build\Python-3.3.3\PC\VS9.0\_testcapi.pyd %_DEST%\lib%_EXT%\python\_testcapi.pyd
111
..\%__SRC%\misc\build\Python-2.7.5\PCbuild\_ctypes.pyd %_DEST%\lib%_EXT%\python\_ctypes.pyd
152
..\%__SRC%\misc\build\Python-3.3.3\PC\VS9.0\pyexpat.pyd %_DEST%\lib%_EXT%\python\pyexpat.pyd
153
..\%__SRC%\misc\build\Python-3.3.3\PC\VS9.0\select.pyd %_DEST%\lib%_EXT%\python\select.pyd
154
..\%__SRC%\misc\build\Python-3.3.3\PC\VS9.0\unicodedata.pyd %_DEST%\lib%_EXT%\python\unicodedata.pyd
155
..\%__SRC%\misc\build\Python-3.3.3\PC\VS9.0\winsound.pyd %_DEST%\lib%_EXT%\python\winsound.pyd
156
..\%__SRC%\misc\build\Python-3.3.3\PC\VS9.0\xxlimited.pyd %_DEST%\lib%_EXT%\python\xxlimited.pyd
112
157
113
#linklib: libpython.so.*.*.*
158
#linklib: libpython.so.*.*.*
114
159
(-)python/python-md5.patch (-1 / +4 lines)
Line 0 Link Here
1
--- misc/Python-3.3.3/Makefile.pre.in	2013-12-31 12:01:38.252698826 +0900
Line 0 Link Here
1
--- misc/Python-3.3.3/configure	2013-11-17 16:23:09.000000000 +0900
Line 0 Link Here
1
diff -rumisc/Python-3.3.3/PC/VS9.0/_bz2.vcproj misc/build/Python-3.3.3/PC/VS9.0/_bz2.vcproj
2
---misc/Python-3.3.3/PC/VS9.0/_bz2.vcproj	2013-11-17 16:23:04.000000000 +0900
Lines 1-22 Link Here
1
diff -ru misc/Python-2.7.5/Modules/Setup.dist misc/build/Python-2.7.5/Modules/Setup.dist
(-)python/python-solver-before-std.patch
Lines 1-6 Link Here
(-)- misc/Python-2.7.5/setup.py (-10 / +9 lines)
Lines 14-21 Link Here
14
             f = os.path.join(sysroot, dir[1:], filename)
14
             f = os.path.join(sysroot, dir[1:], filename)
15
 
15
 
16
-        if os.path.exists(f): return []
16
-        if os.path.exists(f): return []
17
+        if os.path.exists(f):
17
+        if os.path.exists(f): return [dir]
18
+            return [dir]
19
 
18
 
20
-    # Check the additional directories
19
-    # Check the additional directories
21
-    for dir in paths:
20
-    for dir in paths:
Lines 35-41 Link Here
35
 
34
 
36
 def find_library_file(compiler, libname, std_dirs, paths):
35
 def find_library_file(compiler, libname, std_dirs, paths):
37
-    result = compiler.find_library_file(std_dirs + paths, libname)
36
-    result = compiler.find_library_file(std_dirs + paths, libname)
38
+    result = compiler.find_library_file(paths+std_dirs, libname)
37
+    result = compiler.find_library_file(paths + std_dirs, libname)
39
     if result is None:
38
     if result is None:
40
         return None
39
         return None
41
 
40
 
Lines 54-60 Link Here
54
         if host_platform == 'darwin' and is_macosx_sdk_path(p):
53
         if host_platform == 'darwin' and is_macosx_sdk_path(p):
55
             if os.path.join(sysroot, p[1:]) == dirname:
54
             if os.path.join(sysroot, p[1:]) == dirname:
56
-                return [ ]
55
-                return [ ]
57
+                return [ p ]
56
+                return [p]
58
 
57
 
59
         if p == dirname:
58
         if p == dirname:
60
-            return [ ]
59
-            return [ ]
Lines 71-85 Link Here
71
         if host_platform == 'darwin' and is_macosx_sdk_path(p):
70
         if host_platform == 'darwin' and is_macosx_sdk_path(p):
72
             if os.path.join(sysroot, p[1:]) == dirname:
71
             if os.path.join(sysroot, p[1:]) == dirname:
73
-                return [ p ]
72
-                return [ p ]
74
+                return [ ]
73
+                return []
75
 
74
 
76
         if p == dirname:
75
         if p == dirname:
77
-            return [p]
76
-            return [p]
78
+            return [ ]
77
+            return []
79
     else:
78
     else:
80
         assert False, "Internal error: Path not found in std_dirs or paths"
79
         assert False, "Internal error: Path not found in std_dirs or paths"
81
 
80
 
82
@@ -819,6 +820,7 @@
81
@@ -777,6 +777,7 @@
83
             exts.append( Extension('_ssl', ['_ssl.c'],
82
             exts.append( Extension('_ssl', ['_ssl.c'],
84
                                    include_dirs = ssl_incs,
83
                                    include_dirs = ssl_incs,
85
                                    library_dirs = ssl_libs,
84
                                    library_dirs = ssl_libs,
Lines 87-97 Link Here
87
                                    libraries = ['ssl', 'crypto'],
86
                                    libraries = ['ssl', 'crypto'],
88
                                    depends = ['socketmodule.h']), )
87
                                    depends = ['socketmodule.h']), )
89
         else:
88
         else:
90
@@ -858,6 +860,7 @@
89
@@ -818,6 +819,7 @@
91
                 exts.append( Extension('_hashlib', ['_hashopenssl.c'],
90
                                        depends = ['hashlib.h'],
92
                                        include_dirs = ssl_incs,
91
                                        include_dirs = ssl_incs,
93
                                        library_dirs = ssl_libs,
92
                                        library_dirs = ssl_libs,
94
+                                       extra_link_args = ['-Wl,--exclude-libs,ALL'],
93
+                                       extra_link_args = ['-Wl,--exclude-libs,ALL'],
95
                                        libraries = ['ssl', 'crypto']) )
94
                                        libraries = ['ssl', 'crypto']) )
96
             else:
95
             else:
97
                 print ("warning: openssl 0x%08x is too old for _hashlib" %
96
                 print("warning: openssl 0x%08x is too old for _hashlib" %
(-)python/python-ssl.patch (-1 lines)
Lines 1-16 Link Here
1
diff -ru misc/Python-2.7.5/PCbuild/build_ssl.py misc/build/Python-2.7.5/PCbuild/build_ssl.py
(-)- misc/Python-2.7.5/setup.py (-3 / +3 lines)
Lines 22-32 Link Here
22
+            ooosslinc = ooosslinc + UPDMINOR
22
+            ooosslinc = ooosslinc + UPDMINOR
23
+        ooosslinc = ooosslinc + '/external/'
23
+        ooosslinc = ooosslinc + '/external/'
24
         search_for_ssl_incs_in = [
24
         search_for_ssl_incs_in = [
25
+                              ooosslinc,
25
+                              ooosslinc, 
26
                               '/usr/local/ssl/include',
26
                               '/usr/local/ssl/include',
27
                               '/usr/contrib/ssl/include/'
27
                               '/usr/contrib/ssl/include/'
28
                              ]
28
                              ]
29
@@ -714,8 +722,15 @@
29
@@ -752,8 +760,15 @@
30
                                ['/usr/kerberos/include'])
30
                                ['/usr/kerberos/include'])
31
             if krb5_h:
31
             if krb5_h:
32
                 ssl_incs += krb5_h
32
                 ssl_incs += krb5_h
Lines 38-44 Link Here
38
+        ooosslinc = ooosslinc + '/'
38
+        ooosslinc = ooosslinc + '/'
39
         ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
39
         ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
40
-                                     ['/usr/local/ssl/lib',
40
-                                     ['/usr/local/ssl/lib',
41
+                                     [ooossllib,
41
+                                     [ooossllib, 
42
+                                      '/usr/local/ssl/lib',
42
+                                      '/usr/local/ssl/lib',
43
                                       '/usr/contrib/ssl/lib/'
43
                                       '/usr/contrib/ssl/lib/'
44
                                      ] )
44
                                      ] )
(-)python/pyversion.mk (-5 / +5 lines)
Lines 20-37 Link Here
20
# *************************************************************
20
# *************************************************************
21
# when you want to change the python version, you must update the d.lst
21
# when you want to change the python version, you must update the d.lst
22
# in the python project accordingly !!!
22
# in the python project accordingly !!!
23
PYMAJOR=2
23
PYMAJOR=3
24
PYMINOR=7
24
PYMINOR=3
25
PYMICRO=5
25
PYMICRO=3
26
PYVERSION=$(PYMAJOR).$(PYMINOR).$(PYMICRO)
26
PYVERSION=$(PYMAJOR).$(PYMINOR).$(PYMICRO)
27
27
28
.IF "$(GUI)" == "UNX"
28
.IF "$(GUI)" == "UNX"
29
.IF "$(OS)" == "MACOSX"
29
.IF "$(OS)" == "MACOSX"
30
PY_FULL_DLL_NAME=libpython$(PYMAJOR).$(PYMINOR).dylib
30
PY_FULL_DLL_NAME=libpython$(PYMAJOR).$(PYMINOR).dylib
31
.ELSE
31
.ELSE
32
PY_FULL_DLL_NAME=libpython$(PYMAJOR).$(PYMINOR).so.1.0
32
PY_FULL_DLL_NAME=libpython$(PYMAJOR).$(PYMINOR)m.so.1.0
33
.ENDIF
33
.ENDIF
34
PYTHONLIB=-lpython$(PYMAJOR).$(PYMINOR)
34
PYTHONLIB=-lpython$(PYMAJOR).$(PYMINOR)m
35
.ELIF "$(GUI)" == "OS2"
35
.ELIF "$(GUI)" == "OS2"
36
PY_FULL_DLL_NAME=python$(PYMAJOR)$(PYMINOR).dll
36
PY_FULL_DLL_NAME=python$(PYMAJOR)$(PYMINOR).dll
37
PYTHONLIB=python$(PYMAJOR)$(PYMINOR).lib
37
PYTHONLIB=python$(PYMAJOR)$(PYMINOR).lib
(-)scripting/source/pyprov/pythonscript.py (-10 / +16 lines)
Lines 24-30 Link Here
24
import unohelper
24
import unohelper
25
import sys
25
import sys
26
import os
26
import os
27
import imp
28
import time
27
import time
29
import ast
28
import ast
30
29
Lines 56-62 Link Here
56
#-------------------------------------------------------------------
55
#-------------------------------------------------------------------
57
56
58
def encfile(uni):
57
def encfile(uni):
59
    return uni.encode( sys.getfilesystemencoding())
58
    if not isinstance(uni, str):
59
        return uni.encode(sys.getfilesystemencoding())
60
    return uni
60
61
61
def lastException2String():
62
def lastException2String():
62
    (excType,excInstance,excTraceback) = sys.exc_info()
63
    (excType,excInstance,excTraceback) = sys.exc_info()
Lines 81-87 Link Here
81
            userInstallation =  pathSubst.getSubstituteVariableValue( "user" )
82
            userInstallation =  pathSubst.getSubstituteVariableValue( "user" )
82
            if len( userInstallation ) > 0:
83
            if len( userInstallation ) > 0:
83
                systemPath = uno.fileUrlToSystemPath( userInstallation + "/Scripts/python/log.txt" )
84
                systemPath = uno.fileUrlToSystemPath( userInstallation + "/Scripts/python/log.txt" )
84
                ret = file( systemPath , "a" )
85
                ret = open( systemPath , "a" )
85
        except Exception as e:
86
        except Exception as e:
86
            print("Exception during creation of pythonscript logfile: "+ lastException2String() + "\n, delagating log to stdout\n")
87
            print("Exception during creation of pythonscript logfile: "+ lastException2String() + "\n, delagating log to stdout\n")
87
    return ret
88
    return ret
Lines 153-159 Link Here
153
BLOCK_SIZE = 65536
154
BLOCK_SIZE = 65536
154
def readTextFromStream( inputStream ):
155
def readTextFromStream( inputStream ):
155
    # read the file
156
    # read the file
156
    code = uno.ByteSequence( "" )
157
    code = uno.ByteSequence( bytes() if sys.version_info.major >= 3 else "" )
157
    while True:
158
    while True:
158
        read,out = inputStream.readBytes( None , BLOCK_SIZE )
159
        read,out = inputStream.readBytes( None , BLOCK_SIZE )
159
        code = code + out
160
        code = code + out
Lines 238-246 Link Here
238
           newDate.HundredthSeconds > oldDate.HundredthSeconds
239
           newDate.HundredthSeconds > oldDate.HundredthSeconds
239
240
240
def ensureSourceState( code ):
241
def ensureSourceState( code ):
241
    if not code.endswith( "\n" ):
242
    if isinstance(code, str):
242
        code = code + "\n"
243
        if not code.endswith( "\n" ):
243
    code = code.replace( "\r", "" )
244
            code = code + "\n"
245
        code = code.replace( "\r", "" )
246
    else:
247
        if not code.endswith(bytes("\n", "utf-8")):
248
            code = code + bytes("\n", "utf-8")
249
        code = code.replace(bytes("\r", "utf-8"), bytes("", "utf-8"))
244
    return code
250
    return code
245
251
246
252
Lines 437-445 Link Here
437
            src = ensureSourceState( src )
443
            src = ensureSourceState( src )
438
444
439
            # execute the module
445
            # execute the module
440
            entry = ModuleEntry( lastRead, imp.new_module("ooo_script_framework") )
446
            entry = ModuleEntry( lastRead, type(sys)("ooo_script_framework") )
441
            entry.module.__dict__[GLOBAL_SCRIPTCONTEXT_NAME] = self.scriptContext
447
            entry.module.__dict__[GLOBAL_SCRIPTCONTEXT_NAME] = self.scriptContext
442
448
            
443
            code = None
449
            code = None
444
            if url.startswith( "file:" ):
450
            if url.startswith( "file:" ):
445
                code = compile( src, encfile(uno.fileUrlToSystemPath( url ) ), "exec" )
451
                code = compile( src, encfile(uno.fileUrlToSystemPath( url ) ), "exec" )
Lines 531-537 Link Here
531
            if event.ActionCommand == "Run":
537
            if event.ActionCommand == "Run":
532
                code = self.editor.getControl("EditorTextField").getText()
538
                code = self.editor.getControl("EditorTextField").getText()
533
                code = ensureSourceState( code )
539
                code = ensureSourceState( code )
534
                mod = imp.new_module("ooo_script_framework")
540
                mod = type(sys)("ooo_script_framework")
535
                mod.__dict__[GLOBAL_SCRIPTCONTEXT_NAME] = self.provCtx.scriptContext
541
                mod.__dict__[GLOBAL_SCRIPTCONTEXT_NAME] = self.provCtx.scriptContext
536
                exec(code, mod.__dict__)
542
                exec(code, mod.__dict__)
537
                values = mod.__dict__.get( CALLABLE_CONTAINER_NAME , None )
543
                values = mod.__dict__.get( CALLABLE_CONTAINER_NAME , None )
(-)external_deps.lst (-3 / +3 lines)
Lines 199-207 Link Here
199
    URL2 = $(OOO_EXTRAS)$(MD5)-$(name)
199
    URL2 = $(OOO_EXTRAS)$(MD5)-$(name)
200
200
201
if (SYSTEM_PYTHON != YES)
201
if (SYSTEM_PYTHON != YES)
202
    MD5 =  6334b666b7ff2038c761d7b27ba699c1
202
    MD5 =  f3ebe34d4d8695bf889279b54673e10c
203
    name = Python-2.7.5.tar.bz2
203
    name = Python-3.3.3.tar.bz2
204
    URL1 = http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tar.bz2
204
    URL1 = http://www.python.org/ftp/python/3.3.3/Python-3.3.3.tar.bz2
205
    URL2 = $(OOO_EXTRAS)$(MD5)-$(name)
205
    URL2 = $(OOO_EXTRAS)$(MD5)-$(name)
206
206
207
if (SYSTEM_BOOST!=YES || (OS==SOLARIS && COM!=GCC))
207
if (SYSTEM_BOOST!=YES || (OS==SOLARIS && COM!=GCC))
(-)scp2/source/python/profileitem_python.scp (-6 / +3 lines)
Lines 67-89 Link Here
67
  #ifdef UNX
67
  #ifdef UNX
68
    #ifdef MACOSX
68
    #ifdef MACOSX
69
    #define FRAMEWORKLIB CONCAT4($ORIGIN/OOoPython.framework/Versions/,PYMAJMIN,/lib/python,PYMAJMIN)
69
    #define FRAMEWORKLIB CONCAT4($ORIGIN/OOoPython.framework/Versions/,PYMAJMIN,/lib/python,PYMAJMIN)
70
    Value = CONCAT4(FRAMEWORKLIB FRAMEWORKLIB,
70
    Value = CONCAT3(FRAMEWORKLIB FRAMEWORKLIB,
71
		   /lib-dynload FRAMEWORKLIB,
71
		   /lib-dynload FRAMEWORKLIB,
72
		   /lib-tk FRAMEWORKLIB,
73
		   /site-packages $ORIGIN);
72
		   /site-packages $ORIGIN);
74
    #else
73
    #else
75
    Value = CONCAT9($ORIGIN/python-core-,PYVERSION,
74
    Value = CONCAT7($ORIGIN/python-core-,PYVERSION,
76
		   /lib $ORIGIN/python-core-,PYVERSION,
75
		   /lib $ORIGIN/python-core-,PYVERSION,
77
		   /lib/lib-dynload $ORIGIN/python-core-,PYVERSION,
76
		   /lib/lib-dynload $ORIGIN/python-core-,PYVERSION,
78
		   /lib/lib-tk $ORIGIN/python-core-,PYVERSION,
79
		   /lib/site-packages $ORIGIN);
77
		   /lib/site-packages $ORIGIN);
80
    #endif
78
    #endif
81
  #else
79
  #else
82
   #ifdef _gcc3
80
   #ifdef _gcc3
83
    Value = STRING(CONCAT9($ORIGIN/python-core-,PYVERSION,
81
    Value = STRING(CONCAT7($ORIGIN/python-core-,PYVERSION,
84
		   /lib $ORIGIN/python-core-,PYVERSION,
82
		   /lib $ORIGIN/python-core-,PYVERSION,
85
		   /lib/lib-dynload $ORIGIN/python-core-,PYVERSION,
83
		   /lib/lib-dynload $ORIGIN/python-core-,PYVERSION,
86
		   /lib/lib-tk $ORIGIN/python-core-,PYVERSION,
87
		   /lib/site-packages $ORIGIN));
84
		   /lib/site-packages $ORIGIN));
88
   #else
85
   #else
89
    Value = STRING(CONCAT5($ORIGIN/python-core-,PYVERSION,
86
    Value = STRING(CONCAT5($ORIGIN/python-core-,PYVERSION,

Return to issue 123975