[issue993766] bdist_dumb and --relative on Windows fails
zouguangxian <[EMAIL PROTECTED]> added the comment: I encounter the same problem of Mark Hammond. I check the code in repository, the ensure_relative function in python25 is: def ensure_relative (path): """Take the full path 'path', and make it a relative path so it can be the second argument to os.path.join(). """ drive, path = os.path.splitdrive(path) if sys.platform == 'mac': return os.sep + path else: if path[0:1] == os.sep: path = drive + path[1:] return path I also checked python24, and didn't find the code which described by Patrice LACOUTURE in msg60533 (view). -- nosy: +weck ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue993766> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1455] VS2008, quick hack for distutils.msvccompiler
zouguangxian added the comment: I succeed in building python26 with msvc 2005. I create a tool to convert pcbuild9 to pcbuild8. 1. delete pcbuild8 2. copy pcbuild9 to pcbuild8 3. run norm.py in pcbuild8, norm.py will change the format flag. Added file: http://bugs.python.org/file8994/norm.py __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1455> __# -*- coding: UTF-8 -*- # vim: noexpandtab:nolist:sw=4 ts=4 sts=4: # $Id$ import os import sys import re top = '.' for root, dirs, files in os.walk(top): for name in files: path, ext = os.path.splitext( name ) if not ( ext and ext.lower() in ['.vcproj', '.sln'] ): continue filename = os.path.normpath( os.path.join( root, name ) ) print filename fin = open( filename, 'r' ) lines = fin.read() lines = re.sub( r'Version="9,00"', r'Version="8.00"', lines) lines = re.sub( r'Format Version 10.00', r'Format Version 9.00', lines) lines = re.sub( r'Visual Studio 2008', r'Visual Studio 2005', lines) fin.close() fout = open( filename, 'w' ) fout.write(lines) fout.close() break ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1455] VS2008, quick hack for distutils.msvccompiler
zouguangxian added the comment: Why don't use "Visual Studio 200x Command Prompt" to get a shell window with correct environment settings? In this way msvccompiler.py can get LIB, INCLUDE, LIBPATH, PATH with os.environ.get. -- nosy: +weck __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1455> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1465] building python 2.6 with VC Express 2008 Beta2
zouguangxian added the comment: hi tiran, thanks for your suggest. :-) what can i do in the next? it's my pleasure to contribute my effort to python. It's seems that directory configurations of Visual Studio 2005/Visual C Express 2008 are stored in C:\Documents and Settings\USERNAME\Local Settings\Application Data\Microsoft\VisualStudio\8.0\VCComponents.dat or C:\Documents and Settings\USERNAME\Local Settings\Application Data\Microsoft\VCExpress\9.0\VCComponents.dat devenv.exe/VCExpress.exe must be run first, this file will be created automatically. [VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directories] Include Dirs=$(VCInstallDir)include;$(VCInstallDir) atlmfc\include;$(WindowsSdkDir)\include;$(FrameworkSDKDir)include Reference Dirs=$(FrameworkDir)$(FrameworkVersion);$(VCInstallDir) atlmfc\lib;$(VCInstallDir)lib Library Dirs=$(VCInstallDir)lib;$(VCInstallDir) atlmfc\lib;$(VCInstallDir)atlmfc\lib\i386;$(WindowsSdkDir) \lib;$(FrameworkSDKDir)lib;$(VSInstallDir);$(VSInstallDir)lib Source Dirs=$(VCInstallDir)atlmfc\src\mfc;$(VCInstallDir) atlmfc\src\mfcm;$(VCInstallDir)atlmfc\src\atl;$(VCInstallDir)crt\src Exclude Dirs=$(VCInstallDir)include;$(VCInstallDir) atlmfc\include;$(WindowsSdkDir)\include;$(FrameworkSDKDir) include;$(FrameworkDir)$(FrameworkVersion);$(VCInstallDir) atlmfc\lib;$(VCInstallDir)lib Path Dirs=$(VCInstallDir)bin;$(WindowsSdkDir)\bin;$(VSInstallDir)Common7 \Tools\bin;$(VSInstallDir)Common7\tools;$(VSInstallDir)Common7 \ide;$(ProgramFiles)\HTML Help Workshop;$(FrameworkSDKDir) bin;$(FrameworkDir)$(FrameworkVersion);$(VSInstallDir);$(SystemRoot) \SysWow64;$(FxCopDir);$(PATH) SCons has done some work on detecting msvc compiler. :-) msi.py should extract msvcrxx.dll from *Merge Modules* or *redist* directory. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1465> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1465] building python 2.6 with VC Express 2008 Beta2
zouguangxian added the comment: patch of tix8.4.2 Added file: http://bugs.python.org/file8778/tix8.4.2.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1465> __Only in tix8.4.2/win/: Release diff -u Tix8.4.2-src/Tix8.4.2/win/makefile.vc tix8.4.2/win/makefile.vc --- Tix8.4.2-src/Tix8.4.2/win/makefile.vc Fri Nov 17 06:33:32 2006 +++ tix8.4.2/win/makefile.vcSun Nov 18 15:45:22 2007 @@ -122,8 +122,8 @@ link32 = "$(TOOLS32)\bin\link.exe" include32 = -I"$(TOOLS32)\include" -RMDIR = $(TCL_DIR)\win\rmd.bat -MKDIR = $(TCL_DIR)\win\mkd.bat +RMDIR = $(TK_DIR)\win\rmd.bat +MKDIR = $(TK_DIR)\win\mkd.bat RM = del # @@ -137,7 +137,7 @@ !ENDIF # declarations common to all linker options -lcommon= /NODEFAULTLIB /RELEASE /NOLOGO +lcommon= /RELEASE /NOLOGO # declarations for use on Intel i386, i486, and Pentium systems !IF "$(MACHINE)" == "IX86" @@ -222,6 +222,25 @@ TMPDIR = Debug !ENDIF +#-- +# MSVC8 (ships with Visual Studio 2005) generates a manifest +# file that we should link into the binaries. This is how. +#-- + +_VC_MANIFEST_EMBED_EXE= +_VC_MANIFEST_EMBED_DLL= +!if ![cl /Zs /Tc NUL 2>&1 | find "Version 12" > NUL] +VCVER=6 +!elseif ![cl /Zs /Tc NUL 2>&1 | find "Version 13" > NUL] +VCVER=7 +!elseif ![cl /Zs /Tc NUL 2>&1 | find "Version 14" > NUL] +VCVER=8 +_VC_MANIFEST_EMBED_EXE=if exist [EMAIL PROTECTED] mt -nologo -manifest [EMAIL PROTECTED] -outputresource:$@;1 +_VC_MANIFEST_EMBED_DLL=if exist [EMAIL PROTECTED] mt -nologo -manifest [EMAIL PROTECTED] -outputresource:$@;2 +!else +VCVER=0 +!endif + # # File and dir names for Tcl # @@ -232,6 +251,10 @@ TCL_TMPDIR = Debug !ENDIF +!IF $(VCVER) > 6 +TCL_TMPDIR =$(TCL_TMPDIR)_VC$(VCVER) +!ENDIF + !IF "$(TCL_PATCH)" == "" TCL_DIR= $(SRC_ROOT)\tcl$(TCL_MAJOR).$(TCL_MINOR) TK_DIR = $(SRC_ROOT)\tk$(TCL_MAJOR).$(TCL_MINOR) @@ -258,6 +281,10 @@ TK_TMPDIR = Debug !ELSE TK_TMPDIR = Release +!ENDIF + +!IF $(VCVER) > 6 +TK_TMPDIR =$(TK_TMPDIR)_VC$(VCVER) !ENDIF !IF "$(TK_PATCH)" == "" Only in tix8.4.2/win/: python.mak ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1465] building python 2.6 with VC Express 2008 Beta2
zouguangxian added the comment: patch of socketmodule.c. Added file: http://bugs.python.org/file8777/socketmodule.c.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1465> __Index: Modules/socketmodule.c === --- Modules/socketmodule.c (revision 59052) +++ Modules/socketmodule.c (working copy) @@ -297,9 +297,11 @@ #endif #ifndef HAVE_INET_PTON +#if !defined(NTDDI_VERSION) || (NTDDI_VERSION < NTDDI_LONGHORN) int inet_pton(int af, const char *src, void *dst); const char *inet_ntop(int af, const void *src, char *dst, socklen_t size); #endif +#endif #ifdef __APPLE__ /* On OS X, getaddrinfo returns no error indication of lookup @@ -5039,7 +5041,7 @@ #ifndef HAVE_INET_PTON - +#if !defined(NTDDI_VERSION) || (NTDDI_VERSION < NTDDI_LONGHORN) /* Simplistic emulation code for inet_pton that only works for IPv4 */ /* These are not exposed because they do not set errno properly */ @@ -5072,5 +5074,5 @@ /* Should set errno to EAFNOSUPPORT */ return NULL; } - #endif +#endif ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1464] inet_pton redefined while building with windows SDK 6.0
New submission from zouguangxian: in Microsoft SDKs\Windows\v6.0A\Include\ws2tcpip.h, inet_pton was defined when NTDDI_VERSION >= NTDDI_LONGHORN with the following lines: #if (NTDDI_VERSION >= NTDDI_LONGHORN) WINSOCK_API_LINKAGE INT WSAAPI inet_pton( __inINT Family, __inPCSTR pszAddrString, __out_bcount(sizeof(IN6_ADDR)) PVOID pAddrBuf ); ... ... so in socketmodule.c, inet_pton should not be defined in such a situation. -- components: Library (Lib) files: socketmodule.c.patch messages: 57639 nosy: weck severity: normal status: open title: inet_pton redefined while building with windows SDK 6.0 type: compile error versions: Python 2.6 Added file: http://bugs.python.org/file8775/socketmodule.c.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1464> __Index: socketmodule.c === --- socketmodule.c (revision 59052) +++ socketmodule.c (working copy) @@ -297,9 +297,11 @@ #endif #ifndef HAVE_INET_PTON +#if !defined(NTDDI_VERSION) || (NTDDI_VERSION < NTDDI_LONGHORN) int inet_pton(int af, const char *src, void *dst); const char *inet_ntop(int af, const void *src, char *dst, socklen_t size); #endif +#endif #ifdef __APPLE__ /* On OS X, getaddrinfo returns no error indication of lookup @@ -5039,7 +5041,7 @@ #ifndef HAVE_INET_PTON - +#if !defined(NTDDI_VERSION) || (NTDDI_VERSION < NTDDI_LONGHORN) /* Simplistic emulation code for inet_pton that only works for IPv4 */ /* These are not exposed because they do not set errno properly */ @@ -5072,5 +5074,5 @@ /* Should set errno to EAFNOSUPPORT */ return NULL; } - #endif +#endif ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1450] make modulator more general
New submission from zouguangxian: modulator may be outdated. i made a changement to make it use the new feature of PyTypeObject in Python2.5. for example, to support members, methods, new, init and etc. -- components: Demos and Tools files: modulator.patch messages: 57533 nosy: weck severity: normal status: open title: make modulator more general type: compile error versions: Python 2.5 Added file: http://bugs.python.org/file8755/modulator.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1450> __Index: genmodule.py === --- genmodule.py(revision 58978) +++ genmodule.py(working copy) @@ -27,7 +27,9 @@ # Names of functions in the object-description struct. # FUNCLIST = ['new', 'tp_dealloc', 'tp_print', 'tp_getattr', 'tp_setattr', -'tp_compare', 'tp_repr', 'tp_hash', 'tp_call', 'tp_str'] +'tp_compare', 'tp_repr', 'tp_hash', 'tp_call', 'tp_str', +'tp_methods', 'tp_members', 'tp_init', 'tp_new', 'tp_traverse', +'tp_clear'] TYPELIST = ['tp_as_number', 'tp_as_sequence', 'tp_as_mapping', 'structure'] # @@ -92,6 +94,7 @@ self.typelist = [] self.methodlist = [] self.funclist = ['new'] +self.memberlist = [] writer.__init__(self) def writecode(self, fp): @@ -100,10 +103,36 @@ self.writebody(fp) def writehead(self, fp): +saved = self.memberlist +new_ml = '' +for fn in self.memberlist: +self.member = fn +new_ml = new_ml + ( + 'XXX %s;\n' + %(fn)) +self.memberlist = new_ml self.addcode('object_head', fp) +self.memberlist = saved def writebody(self, fp): new_ml = '' +for fn in self.memberlist: +self.member = fn +print 'member', fn +self.addcode('object_member', fp) +new_ml = new_ml + ( + '{"%s",\tT_XXX, offsetof(%sObject,%s),\t0,\t%s_%s__doc__},\n' + %(fn, self.abbrev, fn, self.abbrev, fn)) +self.memberlist = new_ml + +if len(self.memberlist) > 0 : +self.addcode('object_mlist2', fp) + +# Add tp_members if we have methods +if self.memberlist and not 'tp_members' in self.funclist: +self.funclist.insert(0, 'tp_members') + +new_ml = '' for fn in self.methodlist: self.method = fn self.addcode('object_method', fp) @@ -113,9 +142,9 @@ self.methodlist = new_ml self.addcode('object_mlist', fp) -# Add getattr if we have methods -if self.methodlist and not 'tp_getattr' in self.funclist: -self.funclist.insert(0, 'tp_getattr') +# Add tp_methods if we have methods +if self.methodlist and not 'tp_methods' in self.funclist: +self.funclist.insert(0, 'tp_methods') for fn in FUNCLIST: setattr(self, fn, '0') @@ -133,6 +162,13 @@ self.funclist.remove('tp_setattr') self.tp_getattr = self.abbrev + '_getattr' self.tp_setattr = self.abbrev + '_setattr' + +if 'tp_dealloc' in self.funclist: +if 'tp_traverse' not in self.funclist: +self.funclist.insert(0, 'tp_traverse') +if 'tp_clear' not in self.funclist: +self.funclist.insert(0, 'tp_clear') + for fn in self.funclist: self.addcode('object_'+fn, fp) setattr(self, fn, '%s_%s'%(self.abbrev, fn[3:])) Index: modulator.py === --- modulator.py(revision 58978) +++ modulator.py(working copy) @@ -18,7 +18,7 @@ import sys, os if os.name <> 'mac': -sys.path.append(os.path.join(os.environ['HOME'], +sys.path.append(os.path.join(os.environ['HOMEPATH'], 'src/python/Tools/modulator')) from Tkinter import * @@ -108,7 +108,14 @@ if not fn: return +root, ext = os.path.splitext(fn) + fp = open(fn, 'w') +
[issue1449] make msi work the vs 2005(MSVC8)
New submission from zouguangxian: with vs 2003, msi.py get msvcr71.dll from msm. but with vs 2005, It's better to extract msvcr80.dll from %VCINTALLDIR%\redist\x86 \Microsoft.VC80.CRT\. In addition, it seems to extract file from Microsoft_VC80_CRT_x86.msm need upgrade MSI to 3.1, i am not sure. I 'PCbuild' to 'PCbuild8' in msi.py and add extract_msvcr80, that will make msi.py work with vs 2005. -- files: msi.patch messages: 57532 nosy: weck severity: normal status: open title: make msi work the vs 2005(MSVC8) type: compile error versions: Python 2.5 Added file: http://bugs.python.org/file8754/msi.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1449> __Index: msi.py === --- msi.py (revision 58978) +++ msi.py (working copy) @@ -1,7 +1,7 @@ # Python MSI Generator # (C) 2003 Martin v. Loewis # See "FOO" in comments refers to MSDN sections with the title FOO. -import msilib, schema, sequence, os, glob, time, re +import msilib, schema, sequence, os, glob, time, re, shutil from msilib import Feature, CAB, Directory, Dialog, Binary, add_data import uisample from win32com.client import constants @@ -25,7 +25,7 @@ # Is Tcl available at all? have_tcl = True # Where is sqlite3.dll located, relative to srcdir? -sqlite_dir = "../sqlite-source-3.3.4" +sqlite_dir = "../sqlite-3.5.2" try: from config import * @@ -101,6 +101,7 @@ # Using the same UUID is fine since these files are versioned, # so Installer will always keep the newest version. msvcr71_uuid = "{8666C8DD-D0B4-4B42-928E-A69E32FA5D4D}" +msvcr80_uuid = "{82a0ee70-92d0-11dc-a156-0015c53a55e7}" pythondll_uuid = { "24":"{9B81E618-2301-4035-AC77-75D9ABEB7301}", "25":"{2e41b118-38bd-4c1b-a840-6977efd1b911}" @@ -144,16 +145,16 @@ return True -# Target files (.def and .a) go in PCBuild directory -lib_file = os.path.join(srcdir, "PCBuild", "python%s%s.lib" % (major, minor)) -def_file = os.path.join(srcdir, "PCBuild", "python%s%s.def" % (major, minor)) +# Target files (.def and .a) go in PCBuild8 directory +lib_file = os.path.join(srcdir, "PCBuild8", "python%s%s.lib" % (major, minor)) +def_file = os.path.join(srcdir, "PCBuild8", "python%s%s.def" % (major, minor)) dll_file = "python%s%s.dll" % (major, minor) -mingw_lib = os.path.join(srcdir, "PCBuild", "libpython%s%s.a" % (major, minor)) +mingw_lib = os.path.join(srcdir, "PCBuild8", "libpython%s%s.a" % (major, minor)) have_mingw = build_mingw_lib(lib_file, def_file, dll_file, mingw_lib) # Determine the target architechture -dll_path = os.path.join(srcdir, "PCBuild", dll_file) +dll_path = os.path.join(srcdir, "PCBuild8", dll_file) msilib.set_arch_from_file(dll_path) if msilib.pe_type(dll_path) != msilib.pe_type("msisupport.dll"): raise SystemError, "msisupport.dll for incorrect architecture" @@ -827,6 +828,32 @@ return installer.FileVersion("msvcr71.dll", 0), \ installer.FileVersion("msvcr71.dll", 1) + +def extract_msvcr80(): +import _winreg +# Find the location of the merge modules +k = _winreg.OpenKey( +_winreg.HKEY_LOCAL_MACHINE, +r"Software\Microsoft\VisualStudio\8.0\Setup\VS") +prod_dir = _winreg.QueryValueEx(k, "ProductDir")[0] +_winreg.CloseKey(k) + +# Copy msvcr80* +dir = os.path.join(prod_dir, 'VC\\redist\\x86\\Microsoft.VC80.CRT') +files = glob.glob1(dir, "*CRT*") + glob.glob1(dir, "*VCR*") +for x in files: +print x +shutil.copy(os.path.join(dir, x), '.') + +dir = os.path.join(prod_dir, 'VC\\redist\\Debug_NonRedist\\x86\\Microsoft.VC80.DebugCRT') +files = glob.glob1(dir, "*CRT*") + glob.glob1(dir, "*VCR*") +for x in files: +print x +shutil.copy(os.path.join(dir, x), '.') + +# Find the version/language of msvcr80.dll +return '8.00.50727.42', 'english' + class PyDirectory(Directory): """By default, all components in the Python installer can run from source.""" @@ -844,19 +871,19 @@ root = PyDirectory(db, cab, None, srcdir, "TARGETDIR", "SourceDir") default_feature.set_current() if not msilib.Win64: -root.add_file("PCBuild/w9xpopen.exe") +root.add_file("PCBuild8/w9xpopen.exe") root.add_file("README.txt", src="README") root.add_file("NEWS.txt", src="Misc/NEWS") ro
[issue1447] patch to make msvccompiler.py work with vs 2005(MSVC8)
New submission from zouguangxian: It seems that the directory information of MSVC8 *just* can be got from environment variable instead of registry. This patch make me compile pywin32 with MSVC8(VS 2005). -- files: msvccompiler.py.diff messages: 57530 nosy: weck severity: normal status: open title: patch to make msvccompiler.py work with vs 2005(MSVC8) type: compile error versions: Python 2.5 Added file: http://bugs.python.org/file8752/msvccompiler.py.diff __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1447> __Index: Lib/distutils/msvccompiler.py === --- Lib/distutils/msvccompiler.py (revision 58978) +++ Lib/distutils/msvccompiler.py (working copy) @@ -262,6 +262,7 @@ self.mc = "mc.exe" else: self.__paths = self.get_msvc_paths("path") +print self.__paths if len (self.__paths) == 0: raise DistutilsPlatformError, \ @@ -610,6 +611,18 @@ if not _can_read_reg: return [] +path = path.upper() +if self.__version == 8: +if path == "PATH": +return string.split(os.environ["PATH"], ";") +elif path == "LIBRARY": +return string.split(os.environ["LIB"], ";") + \ +string.split(os.environ["LIBPATH"], ";") +elif path == "INCLUDE": +return string.split(os.environ["INCLUDE"], ";") + + +print self.__root, self.__version path = path + " dirs" if self.__version >= 7: key = (r"%s\%0.1f\VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directories" @@ -618,6 +631,7 @@ key = (r"%s\6.0\Build System\Components\Platforms" r"\Win32 (%s)\Directories" % (self.__root, platform)) +print key for base in HKEYS: d = read_values(base, key) if d: ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com