Closed Bug 1155820 Opened 10 years ago Closed 10 years ago

Add pywin32 to the package

Categories

(Firefox Build System :: MozillaBuild, task)

x86
Windows 8.1
task
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: armenzg, Assigned: RyanVM)

References

()

Details

Attachments

(1 file, 1 obsolete file)

Attached patch install_pywin32.diff (obsolete) — Splinter Review
I see a lot of warning to build mozilla-build myself. This patch only adds the script which I use to install the win32api module (aka pywin32).
Attachment #8594118 - Flags: review?(ryanvm)
Comment on attachment 8594118 [details] [diff] [review] install_pywin32.diff Review of attachment 8594118 [details] [diff] [review]: ----------------------------------------------------------------- I'm fine with adding it, but please install it via pip during packaging like we do with the other python packages. http://hg.mozilla.org/mozilla-build/file/4a4c76abf4b8/packageit.py#l119
Attachment #8594118 - Flags: review?(ryanvm) → review-
As I mentioned on IRC, there is no working python package and I was not able to build it from the .zip file. Mozilla@Thinkpad ~/Downloads/pywin32-219/pywin32-219 $ python setup.py sdist Building pywin32 2.7.219.0 Traceback (most recent call last): File "setup.py", line 1929, in <module> """ % dirs).split(), File "setup.py", line 587, in __init__ if os.path.isfile(os.path.join(sdk_dir, "include", "activdbg.h")): File "c:\mozilla-build-test\python\lib\ntpath.py", line 64, in join result_drive, result_path = splitdrive(path) File "c:\mozilla-build-test\python\lib\ntpath.py", line 114, in splitdrive if len(p) > 1: TypeError: object of type 'NoneType' has no len() Mozilla@Thinkpad ~/Downloads/pywin32-219/pywin32-219 $ pip install -e . Obtaining file:///C:/Users/Mozilla/Downloads/pywin32-219/pywin32-219 Complete output from command python setup.py egg_info: Building pywin32 2.7.219.0 Traceback (most recent call last): File "<string>", line 20, in <module> File "C:\Users\Mozilla\Downloads\pywin32-219\pywin32-219\setup.py", line 1929, in <module> """ % dirs).split(), File "C:\Users\Mozilla\Downloads\pywin32-219\pywin32-219\setup.py", line 587, in __init__ if os.path.isfile(os.path.join(sdk_dir, "include", "activdbg.h")): File "c:\mozilla-build-test\python\lib\ntpath.py", line 64, in join result_drive, result_path = splitdrive(path) File "c:\mozilla-build-test\python\lib\ntpath.py", line 114, in splitdrive if len(p) > 1: TypeError: object of type 'NoneType' has no len() ---------------------------------------- â†[31m Command "python setup.py egg_info" failed with error code 1 in C:\Users\Mozilla\Downloads\p ywin32-219\pywin32-219â†[0m
I got this working. It adds 5MB to the size of the installer. Ouch.
I packaged the source archive into a bz2 file that python can then decompress on the fly during packaging. Seems to do the trick nicely.
Assignee: nobody → ryanvm
Attachment #8594118 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #8617052 - Flags: feedback?(armenzg)
Summary: Add script to install pywin32 → Add pywin32 to the package
This is the RC build of MozillaBuild 2.0, which includes pywin32. Mind trying it out to make sure things work as expected? :) http://people.mozilla.org/~rvandermeulen/MozillaBuildSetup2.0.0RC1.exe (82.1MB)
Flags: needinfo?(armenzg)
$ which python /c/mozilla-build/python/python.exe $ python /c/mozilla-build/python/Scripts/pywin32_testall.py Traceback (most recent call last): File "c:/mozilla-build/python/Scripts/pywin32_testall.py", line 5, in <module> import win32api ImportError: DLL load failed: The specified module could not be found. $ python Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import win32api Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: DLL load failed: The specified module could not be found. $ python /c/mozilla-build/python/Scripts/pywin32_postinstall.py -install Copied pythoncom27.dll to c:\mozilla-build\python\pythoncom27.dll Copied pythoncomloader27.dll to c:\mozilla-build\python\pythoncomloader27.dll Copied pywintypes27.dll to c:\mozilla-build\python\pywintypes27.dll You do not have the permissions to install COM objects. The sample COM objects were not registered. -> Software\Python\PythonCore\2.7\Help[None]=None -> Software\Python\PythonCore\2.7\Help\Pythonwin Reference[None]='c:\\mozilla-build\\python\\Lib\\site-packages\\PyWin32.chm' Pythonwin has been registered in context menu Can't install shortcuts - u'C:\\Users\\Mozilla\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Python 2.7' is not a folder ******************** WARNING ******************** It appears that the MFC DLL 'mfc90u.dll' is not installed Pythonwin will not work without this DLL, and I haven't had the time to package it in with the installer. You can download this DLL from: http://starship.python.net/crew/mhammond/win32/ ************************************************** The pywin32 extensions were successfully installed. $ find /c -name mfc*.dll /c/Program Files/Tableau/Tableau 8.1/bin/mfc100u.dll /c/Program Files/Tableau/Tableau 8.1/bin32/mfc100u.dll /c/Program Files (x86)/Garmin/Core Update Service/mfc100.dll /c/Program Files (x86)/Google/Drive/Microsoft.VC90.MFC/mfc90.dll /c/Program Files (x86)/Google/Drive/Microsoft.VC90.MFC/mfc90u.dll /c/Program Files (x86)/Google/Drive/Microsoft.VC90.MFC/mfcm90.dll /c/Program Files (x86)/Google/Drive/Microsoft.VC90.MFC/mfcm90u.dll /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/atlmfc/lib/amd64/mfcmifc80.dll /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/atlmfc/lib/mfcmifc80.dll /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/Debug_NonRedist/x64/Microsoft.VC120.Debu /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/Debug_NonRedist/x64/Microsoft.VC120.Debu /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/Debug_NonRedist/x86/Microsoft.VC120.Debu /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/Debug_NonRedist/x86/Microsoft.VC120.Debu /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/x64/Microsoft.VC120.MFC/mfc120u.dll /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/x64/Microsoft.VC120.MFC/mfcm120u.dll /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/x64/Microsoft.VC120.MFCLOC/mfc120chs.dll /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/x64/Microsoft.VC120.MFCLOC/mfc120cht.dll /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/x64/Microsoft.VC120.MFCLOC/mfc120deu.dll /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/x64/Microsoft.VC120.MFCLOC/mfc120enu.dll /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/x64/Microsoft.VC120.MFCLOC/mfc120esn.dll /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/x64/Microsoft.VC120.MFCLOC/mfc120fra.dll /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/x64/Microsoft.VC120.MFCLOC/mfc120ita.dll /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/x64/Microsoft.VC120.MFCLOC/mfc120jpn.dll /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/x64/Microsoft.VC120.MFCLOC/mfc120kor.dll /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/x64/Microsoft.VC120.MFCLOC/mfc120rus.dll /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/x86/Microsoft.VC120.MFC/mfc120u.dll /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/x86/Microsoft.VC120.MFC/mfcm120u.dll /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/x86/Microsoft.VC120.MFCLOC/mfc120chs.dll /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/x86/Microsoft.VC120.MFCLOC/mfc120cht.dll /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/x86/Microsoft.VC120.MFCLOC/mfc120deu.dll /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/x86/Microsoft.VC120.MFCLOC/mfc120enu.dll /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/x86/Microsoft.VC120.MFCLOC/mfc120esn.dll /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/x86/Microsoft.VC120.MFCLOC/mfc120fra.dll /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/x86/Microsoft.VC120.MFCLOC/mfc120ita.dll /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/x86/Microsoft.VC120.MFCLOC/mfc120jpn.dll /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/x86/Microsoft.VC120.MFCLOC/mfc120kor.dll /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/x86/Microsoft.VC120.MFCLOC/mfc120rus.dll
Flags: needinfo?(armenzg)
Discussed this on IRC with Armen. Given that this requires a postinstall process that needs to run on the host machine in order to function properly, I don't think this is something we can really ship out of the box.
No longer blocks: MozillaBuild2.0
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
Attachment #8617052 - Flags: feedback?(armenzg)
Product: mozilla.org → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: