Commits

Anonymous committed 375833f Merge

CWS-TOOLING: integrate CWS pythonssldedux

  • Participants
  • Parent commits b0ae1b7, c06a222

Comments (0)

Files changed (6)

File python/Python-2.6.1.patch

 +#		{A1A295E5-463C-437F-81CA-1F32367685DA} = {A1A295E5-463C-437F-81CA-1F32367685DA}
 +#	EndProjectSection
 +#EndProject
-+#Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ssl", "_ssl.vcproj", "{C6E20F84-3247-4AD6-B051-B073268F73BA}"
-+#	ProjectSection(ProjectDependencies) = postProject
-+#		{B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}
-+#		{86937F53-C189-40EF-8CE8-8759D8E7D480} = {86937F53-C189-40EF-8CE8-8759D8E7D480}
-+#		{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
-+#	EndProjectSection
-+#EndProject
++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ssl", "_ssl.vcproj", "{C6E20F84-3247-4AD6-B051-B073268F73BA}"
++	ProjectSection(ProjectDependencies) = postProject
++		{B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}
++		{86937F53-C189-40EF-8CE8-8759D8E7D480} = {86937F53-C189-40EF-8CE8-8759D8E7D480}
++		{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
++	EndProjectSection
++EndProject
  Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcproj", "{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}"
  	ProjectSection(ProjectDependencies) = postProject
  		{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}

File python/Python-ssl.patch

+--- misc/Python-2.6.1/PCbuild/build_ssl.py	2009-11-02 08:24:35.140625000 +0000
++++ misc/build/Python-2.6.1/PCbuild/build_ssl.py	2009-11-02 08:25:11.750000000 +0000
+@@ -255,4 +255,4 @@
+     sys.exit(rc)
+ 
+ if __name__=='__main__':
+-    main()
++    sys.exit(0)
+--- misc/Python-2.6.1/PCbuild/_ssl.vcproj      2009-11-02 08:24:35.140625000 +0000
++++ misc/build/Python-2.6.1/PCbuild/_ssl.vcproj      2009-11-02 08:24:35.140625000 +0000
+@@ -43,7 +43,7 @@
+ 			/>
+ 			<Tool
+ 				Name="VCCLCompilerTool"
+-				AdditionalIncludeDirectories="$(opensslDir)\inc32"
++				AdditionalIncludeDirectories="$(SOLARVERSION)\$(INPATH)\inc$(UPDMINOREXT)\external"
+ 			/>
+ 			<Tool
+ 				Name="VCManagedResourceCompilerTool"
+@@ -57,7 +57,7 @@
+ 			/>
+ 			<Tool
+ 				Name="VCLinkerTool"
+-				AdditionalDependencies="ws2_32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"
++				AdditionalDependencies="ws2_32.lib $(SOLARVER)\$(INPATH)\lib$(UPDMINOREXT)\libeay32.lib $(SOLARVER)\$(INPATH)\lib$(UPDMINOREXT)\ssleay32.lib"
+ 			/>
+ 			<Tool
+ 				Name="VCALinkTool"
+@@ -106,7 +106,7 @@
+ 			/>
+ 			<Tool
+ 				Name="VCCLCompilerTool"
+-				AdditionalIncludeDirectories="$(opensslDir)\inc64"
++				AdditionalIncludeDirectories="$(SOLARVERSION)\$(INPATH)\inc$(UPDMINOREXT)\external"
+ 			/>
+ 			<Tool
+ 				Name="VCManagedResourceCompilerTool"
+@@ -120,7 +120,7 @@
+ 			/>
+ 			<Tool
+ 				Name="VCLinkerTool"
+-				AdditionalDependencies="ws2_32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"
++				AdditionalDependencies="ws2_32.lib $(SOLARVER)\$(INPATH)\lib$(UPDMINOREXT)\libeay32.lib $(SOLARVER)\$(INPATH)\lib$(UPDMINOREXT)\ssleay32.lib"
+ 			/>
+ 			<Tool
+ 				Name="VCALinkTool"
+@@ -169,7 +169,7 @@
+ 			/>
+ 			<Tool
+ 				Name="VCCLCompilerTool"
+-				AdditionalIncludeDirectories="$(opensslDir)\inc32"
++				AdditionalIncludeDirectories="$(SOLARVERSION)\$(INPATH)\inc$(UPDMINOREXT)\external"
+ 			/>
+ 			<Tool
+ 				Name="VCManagedResourceCompilerTool"
+@@ -183,7 +183,7 @@
+ 			/>
+ 			<Tool
+ 				Name="VCLinkerTool"
+-				AdditionalDependencies="ws2_32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"
++				AdditionalDependencies="ws2_32.lib $(SOLARVER)\$(INPATH)\lib$(UPDMINOREXT)\libeay32.lib $(SOLARVER)\$(INPATH)\lib$(UPDMINOREXT)\ssleay32.lib"
+ 			/>
+ 			<Tool
+ 				Name="VCALinkTool"
+@@ -233,7 +233,7 @@
+ 			/>
+ 			<Tool
+ 				Name="VCCLCompilerTool"
+-				AdditionalIncludeDirectories="$(opensslDir)\inc64"
++				AdditionalIncludeDirectories="$(SOLARVERSION)\$(INPATH)\inc$(UPDMINOREXT)\external"
+ 			/>
+ 			<Tool
+ 				Name="VCManagedResourceCompilerTool"
+@@ -247,7 +247,7 @@
+ 			/>
+ 			<Tool
+ 				Name="VCLinkerTool"
+-				AdditionalDependencies="ws2_32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"
++				AdditionalDependencies="ws2_32.lib $(SOLARVER)\$(INPATH)\lib$(UPDMINOREXT)\libeay32.lib $(SOLARVER)\$(INPATH)\lib$(UPDMINOREXT)\ssleay32.lib"
+ 			/>
+ 			<Tool
+ 				Name="VCALinkTool"
+@@ -296,7 +296,7 @@
+ 			/>
+ 			<Tool
+ 				Name="VCCLCompilerTool"
+-				AdditionalIncludeDirectories="$(opensslDir)\inc32"
++				AdditionalIncludeDirectories="$(SOLARVERSION)\$(INPATH)\inc$(UPDMINOREXT)\external"
+ 			/>
+ 			<Tool
+ 				Name="VCManagedResourceCompilerTool"
+@@ -310,7 +310,7 @@
+ 			/>
+ 			<Tool
+ 				Name="VCLinkerTool"
+-				AdditionalDependencies="ws2_32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"
++				AdditionalDependencies="ws2_32.lib $(SOLARVER)\$(INPATH)\lib$(UPDMINOREXT)\libeay32.lib $(SOLARVER)\$(INPATH)\lib$(UPDMINOREXT)\ssleay32.lib"
+ 			/>
+ 			<Tool
+ 				Name="VCALinkTool"
+@@ -360,7 +360,7 @@
+ 			/>
+ 			<Tool
+ 				Name="VCCLCompilerTool"
+-				AdditionalIncludeDirectories="$(opensslDir)\inc64"
++				AdditionalIncludeDirectories="$(SOLARVERSION)\$(INPATH)\inc$(UPDMINOREXT)\external"
+ 			/>
+ 			<Tool
+ 				Name="VCManagedResourceCompilerTool"
+@@ -374,7 +374,7 @@
+ 			/>
+ 			<Tool
+ 				Name="VCLinkerTool"
+-				AdditionalDependencies="ws2_32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"
++				AdditionalDependencies="ws2_32.lib $(SOLARVER)\$(INPATH)\lib$(UPDMINOREXT)\libeay32.lib $(SOLARVER)\$(INPATH)\lib$(UPDMINOREXT)\ssleay32.lib"
+ 				TargetMachine="17"
+ 			/>
+ 			<Tool
+@@ -424,7 +424,7 @@
+ 			/>
+ 			<Tool
+ 				Name="VCCLCompilerTool"
+-				AdditionalIncludeDirectories="$(opensslDir)\inc32"
++				AdditionalIncludeDirectories="$(SOLARVERSION)\$(INPATH)\inc$(UPDMINOREXT)\external"
+ 			/>
+ 			<Tool
+ 				Name="VCManagedResourceCompilerTool"
+@@ -438,7 +438,7 @@
+ 			/>
+ 			<Tool
+ 				Name="VCLinkerTool"
+-				AdditionalDependencies="ws2_32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"
++				AdditionalDependencies="ws2_32.lib $(SOLARVER)\$(INPATH)\lib$(UPDMINOREXT)\libeay32.lib $(SOLARVER)\$(INPATH)\lib$(UPDMINOREXT)\ssleay32.lib"
+ 			/>
+ 			<Tool
+ 				Name="VCALinkTool"
+@@ -488,7 +488,7 @@
+ 			/>
+ 			<Tool
+ 				Name="VCCLCompilerTool"
+-				AdditionalIncludeDirectories="$(opensslDir)\inc64"
++				AdditionalIncludeDirectories="$(SOLARVERSION)\$(INPATH)\inc$(UPDMINOREXT)\external"
+ 			/>
+ 			<Tool
+ 				Name="VCManagedResourceCompilerTool"
+@@ -502,7 +502,7 @@
+ 			/>
+ 			<Tool
+ 				Name="VCLinkerTool"
+-				AdditionalDependencies="ws2_32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"
++				AdditionalDependencies="ws2_32.lib $(SOLARVER)\$(INPATH)\lib$(UPDMINOREXT)\libeay32.lib $(SOLARVER)\$(INPATH)\lib$(UPDMINOREXT)\ssleay32.lib"
+ 				TargetMachine="17"
+ 			/>
+ 			<Tool
+--- misc/Python-2.6.1/setup.py	2009-11-02 10:12:43.000000000 +0000
++++ misc/build/Python-2.6.1/setup.py	2009-11-02 10:18:19.000000000 +0000
+@@ -612,7 +612,15 @@
+         exts.append( Extension('_socket', ['socketmodule.c'],
+                                depends = ['socketmodule.h']) )
+         # Detect SSL support for the socket module (via _ssl)
++        UPDMINOR = os.environ.get('UPDMINOREXT')
++        ooosslinc = os.environ.get('SOLARVERSION') + '/' + \
++            os.environ.get('INPATH') + '/' + \
++            'inc'
++        if UPDMINOR != None:
++            ooosslinc = ooosslinc + UPDMINOR
++        ooosslinc = ooosslinc + '/external/'
+         search_for_ssl_incs_in = [
++                              ooosslinc,
+                               '/usr/local/ssl/include',
+                               '/usr/contrib/ssl/include/'
+                              ]
+@@ -624,8 +632,15 @@
+                                ['/usr/kerberos/include'])
+             if krb5_h:
+                 ssl_incs += krb5_h
++        ooossllib = os.environ.get('SOLARVER') + '/' + \
++            os.environ.get('INPATH') + '/' + \
++            'lib'
++        if UPDMINOR != None:
++            ooosslinc = ooosslinc + UPDMINOR
++        ooosslinc = ooosslinc + '/'
+         ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
+-                                     ['/usr/local/ssl/lib',
++                                     [ooossllib,
++                                      '/usr/local/ssl/lib',
+                                       '/usr/contrib/ssl/lib/'
+                                      ] )
+ 
+--- misc/Python-2.6.1/Modules/Setup.dist	2009-12-17 15:16:50.000000000 +0000
++++ misc/build/Python-2.6.1/Modules/Setup.dist	2009-12-17 15:17:49.000000000 +0000
+@@ -248,14 +248,14 @@
+ # Message-Digest Algorithm, described in RFC 1321.  The necessary files
+ # md5.c and md5.h are included here.
+ 
+-#_md5 md5module.c md5.c
++_md5 md5module.c md5.c
+ 
+ 
+ # The _sha module implements the SHA checksum algorithms.
+ # (NIST's Secure Hash Algorithms.)
+-#_sha shamodule.c
+-#_sha256 sha256module.c
+-#_sha512 sha512module.c
++_sha shamodule.c
++_sha256 sha256module.c
++_sha512 sha512module.c
+ 
+ 
+ # SGI IRIX specific modules -- off by default.

File python/makefile.mk

 
 
 TARFILE_NAME=Python-$(PYVERSION)
-PATCH_FILES=Python-$(PYVERSION).patch
+PATCH_FILES=\
+	Python-$(PYVERSION).patch \
+	Python-ssl.patch
 
 CONFIGURE_DIR=
 

File python/prj/build.lst

-py	python	:	SO:so_prereq solenv NULL
+py	python	:	SO:so_prereq solenv OPENSSL:openssl NULL
 py	python			nmake	-	w,vc7	py_mkout NULL
 py	python			nmake	-	u	py_mkout NULL

File python/prj/d.lst

 ..\%__SRC%\misc\build\Python-2.6.1\PCbuild\python26.dll %_DEST%\bin%_EXT%\python26.dll
 ..\%__SRC%\misc\build\Python-2.6.1\PCbuild\python26.lib %_DEST%\lib%_EXT%\python26.lib
 ..\%__SRC%\misc\build\Python-2.6.1\PCbuild\_socket.pyd %_DEST%\lib%_EXT%\python\_socket.pyd
+..\%__SRC%\misc\build\Python-2.6.1\PCbuild\_ssl.pyd %_DEST%\lib%_EXT%\python\_ssl.pyd
 ..\%__SRC%\misc\build\Python-2.6.1\PCbuild\select.pyd %_DEST%\lib%_EXT%\python\select.pyd
 ..\%__SRC%\misc\build\Python-2.6.1\PCbuild\unicodedata.pyd %_DEST%\lib%_EXT%\python\unicodedata.pyd
 ..\%__SRC%\misc\build\Python-2.6.1\PCbuild\winsound.pyd %_DEST%\lib%_EXT%\python\winsound.pyd

File scripting/source/pyprov/mailmerge.py

 			self.server.starttls()
 			self.server.ehlo()
 
-		user = xAuthenticator.getUserName()
-		password = xAuthenticator.getPassword()
+		user = xAuthenticator.getUserName().encode('ascii')
+		password = xAuthenticator.getPassword().encode('ascii')
 		if user != '':
 			if dbg:
 				print >> sys.stderr, 'Logging in, username of', user
 			self.server = imaplib.IMAP4(server, port)
 		print >> sys.stderr, "AFTER"
 			
-		user = xAuthenticator.getUserName()
-		password = xAuthenticator.getPassword()
+		user = xAuthenticator.getUserName().encode('ascii')
+		password = xAuthenticator.getPassword().encode('ascii')
 		if user != '':
 			if dbg:
 				print >> sys.stderr, 'Logging in, username of', user
 			self.server = poplib.POP3(server, port)
 		print >> sys.stderr, "AFTER"
 			
-		user = xAuthenticator.getUserName()
-		password = xAuthenticator.getPassword()
+		user = xAuthenticator.getUserName().encode('ascii')
+		password = xAuthenticator.getPassword().encode('ascii')
 		if dbg:
 			print >> sys.stderr, 'Logging in, username of', user
 		self.server.user(user)