diff --git a/PyWin32/PyWin32-logo.png b/PyWin32/PyWin32-logo.png new file mode 100644 index 0000000..d42c54f Binary files /dev/null and b/PyWin32/PyWin32-logo.png differ diff --git a/PyWin32/PyWin32.nuspec b/PyWin32/PyWin32.nuspec new file mode 100644 index 0000000..ba3902f --- /dev/null +++ b/PyWin32/PyWin32.nuspec @@ -0,0 +1,153 @@ + + + + PyWin32 + Python for Windows Extensions + 218.0 + Mark Hammond + Ethan Brown + Python for Windows Extensions adds a number of extensions allowing interaction with Win32 APIs and COM. This package should work for Python 2.3, 2.4, 2.5, 2.6, 2.7, 3.1, 3.2, 3.3 or 3.4 + Additional documentation can be found at ActiveState + + http://docs.activestate.com/activepython/2.7/pywin32/PyWin32.HTML + + http://sourceforge.net/projects/pywin32/ + Python Windows extensions + http://en.wikipedia.org/wiki/Python_Software_Foundation_License + false + https://github.com/Iristyle/ChocolateyPackages/raw/master/PyWin32/PyWin32-logo.png + Since build 218: +---------------- +* win32com.shell + Add interfaces IFileOperation and IFileOperationProgressSink + +* win32com.propsys + Add interfaces IPropertyChange, IPropertyChangeArray, and IObjectWithPropertyKey + Add functions PSCreateSimplePropertyChange, PSCreatePropertyChangeArray, and SHSetDefaultProperties + +Since build 217: +---------------- +* mapiutil.py GetPropTagName has been modified to return the fully qualified + PT_UNICODE and PT_STRING8 type name. Added optional argument to override + rawType default in GetMapiTypeName. (Nick Czeczulin) + +* Fix the count of replaced terms in Pythonwin's search/replace (rupole). + +* Fix obscure issues in the Pythonwin code browser and other uses of the + "hierlist" widget (rupole). + +* Fix a crash using a COM "record" that holds an array (rupole). + +* Fix error return in win32gui.GetClassName (rupole). + +* Some misc fixed to win32timezone (Jason R. Coombs). + +* Some fixes to win32com gencache for Python 3.x (Tim Golden) + +* Fix ActiveScript exception hresults. + +* RegQueryValueEx now return an empty list for blank REG_MULTI_SZ + (rupole via bug #3531456) + +* Add win32pdh.AddEnglishCounter (rupole via feature request #3529527) + +* Fix post_install script use of the registry (rupole via bug #3536122) + +* Python 3.3 version is built with VS2010. + +* win32com.shell - added function SHCreateStreamOnFileEx and + interfaces IShellItem2, IEnumShellItems, IApplicationDocumentLists, + IApplicationDestinations, ITaskbarList, IEnumObjects, + IKnownFolder, IKnownFolderManager, IObjectArray, IObjectCollection, + ICustomDestinationList, and IShellLibrary; enhance SHAddToRecentDocs. + +* win32com.propsys - Many Property System interfaces and functions added + +* pythoncom - added StgCreateStorageEx + +* win32com.client - + Fix iteration of objects that don't declare an enumerator in their typelib + Validate syntax of constants written to makepy generated files + +* win32file - Add GetFileInformationByHandleEx, ReOpenFile and OpenFileById, + SetFileInformationByHandle. SetFileTime() has an extra param to allow UTC + time to be specified. + +* win32api - Allow UpdateResource to remove a resource + +Since build 216: +---------------- +* ISAPI extension works with Python 3.x + +* Python service module will now have their directory added to the start + of sys.path rather than the end to avoid cryptic error messages if a + module of the same name is already on the path (rvolpe via #3194663) + +* Various Pythonwin autocomplete enhancements (kxroberto via #3468282 and + Oliver Tengler via #3433953) + +* The Pythonwin editor now remembers previous searches made in this session. + (patch #3468280 from kxroberto). + +* The LOGFONT struct implementation (win32util) was extended to support the + full LOGFONT struct as published by Microsoft. This includes changes to + win32util.LogFontToDict and win32util.DictToLogFont. (Feature request + 3433757 by Kris Hardy) + +* Remove some duplicated menu code from pythonwin which should avoid + having py2exe pulling in most of the pythonwin framework in some cases + (patch 3433527 from kxroberto.) + +* A new win32com.client.VARIANT object can be used for advanced control over + the parameter types passed to some COM methods. See the documentation in + win32com/HTML/variant.html (also included in the help file) + +* The win32com.adsi and win32com.mapi packages have been upgraded to work on + Python 3.x and as a result, there is a slight risk that regressions to + these packages have been introduced in the Python 2.x versions. Please + file a bug if any problems are found. + +* Pythonwin now warns, but allows you to continue, when saving a file with + an invalid encoding line (bug 3139486) + +* Fix win32com.client.WithEvents on py3k (bug 3199843) + +* When passing integers/unsigned integers to COM objects which did not fit + into 32bits, OverflowErrors were silently discarded and -1 was silently + passed. This has been fixed for signed integers (an OverflowError is now + raised) and unsigned integers now allow for values with the high-bit set to + be passed correctly. + +* Fix win32com.client.WithEvents() on py3k. + +* makepy may have generated syntax errors if 'helpstring' elements in typelibs + had strange quoting or slashes (bug 3199631) + +* Fixed that in some cases win32file.GetOpenFileName and GetSaveFileName + could have returned trailing garbage after an embedded NULL character. + (bug 3277647) + +* Some functions which accepted a DWORD did not accept long integers which + fit in 32bits with the most signficant bit set (eg, 0x80000000). + +* Source-code management moved from CVS to Mercurual. + +* win32com.shell - Added SHCreateShellItem and fixed some 64bit issues. + +* win32evtlog - Added some of the new event log functions introduced in + Vista/Windows 7 + +* win32service - Added EnumServicesStatusEx, and support startup type + "delayed" for Python services + +* win32net - Fix a problem with NetFileEnum on 64-bit (bug #3376041) + + + + + + + + + + diff --git a/PyWin32/tools/chocolateyInstall.ps1 b/PyWin32/tools/chocolateyInstall.ps1 new file mode 100644 index 0000000..548be12 --- /dev/null +++ b/PyWin32/tools/chocolateyInstall.ps1 @@ -0,0 +1,98 @@ +$package = 'PyWin32' + +try { + # python.exe should be in PATH based on + #simulate the unix command for finding things in path + #http://stackoverflow.com/questions/63805/equivalent-of-nix-which-command-in-powershell + function Which([string]$cmd) + { + Get-Command -ErrorAction "SilentlyContinue" $cmd | + Select -ExpandProperty Definition + } + + + # Use PYTHONHOME if it exists, or fallback to 'Where' to search PATH + if ($Env:PYTHONHOME) { $localPython = Join-Path $Env:PYTHONHOME 'python.exe' } + + if (!$Env:PYTHONHOME -or !(Test-Path $localPython)) + { $localPython = Which python.exe } + + if (!(Test-Path $localPython)) + { + Write-ChocolateyFailure 'PyWin32 requires a Python runtime to install' + return + } + + $pythonRoot = Split-Path $localPython + + $sitePackages = (Join-Path (Join-Path $pythonRoot 'Lib') 'site-packages') + if (!(Test-Path $sitePackages)) + { + Write-ChocolateyFailure 'Could not find Python site-packages directory' + return + } + + $7zip = Which 7z.exe + # guess that a bad install didn't put it in PATH + if (!$7zip) + { + $7zip = $Env:ProgramFiles, ${Env:ProgramFiles(x86)} | + % { Join-Path (Join-Path $_ '7-zip') '7z.exe' } | + ? { Test-Path $_ } | + Select -First 1 + } + if (!(Test-Path $7zip)) + { + Write-ChocolateyFailure 'PyWin32 requires 7zip to silently install' + return + } + + $pythonVersion = &$localPython --version 2>&1 + + $simpleVersion = $pythonVersion | + Select-String -Pattern '^.*\s+(\d\.\d)(\.\d+){0,1}$' | + % { $_.Matches.Groups[1].Value } + + # http://www.jordanrinke.com/2011/06/22/pywin32-silent-install/ + + $destination = Join-Path $Env:Temp "pywin32-218.$simpleVersion.exe" + $params = @{ + packageName = $package; + fileFullPath = $destination; + url = "http://sourceforge.net/projects/pywin32/files/pywin32/Build%20218/pywin32-218.win32-py$simpleVersion.exe/download"; + url64bit = "http://sourceforge.net/projects/pywin32/files/pywin32/Build%20218/pywin32-218.win-amd64-py$simpleVersion.exe/download"; + } + + # no special 64-bit for these python versions + if ('2.5', '2.4', '2.3' -contains $simpleVersion) + { + $params.url64bit = $params.url + } + + Get-ChocolateyWebFile @params + + $pyWin32Temp = Join-Path $Env:Temp 'pywin32-temp' + &$7zip x $destination "-o$pyWin32Temp" + + 'PLATLIB', 'SCRIPTS' | + % { Join-Path $pywin32Temp $_ } | + Get-ChildItem | + Move-Item -Destination $sitePackages + + # some files are copied to c:\windows\system32 + $installPyWin32Script = @" + Push-Location '$sitePackages' + &'$localPython' pywin32_postinstall.py `-install + Remove-Item .\pywin32_postinstall.py +"@ + + Start-ChocolateyProcessAsAdmin $installPyWin32Script + + $pyWin32Temp, $destination | + Remove-Item -Recurse -ErrorAction SilentlyContinue + + Write-ChocolateySuccess $package +} catch { + Write-ChocolateyFailure $package "$($_.Exception.Message)" + throw +}