[issue6716] Windows install error when choosing to compile .py files

2010-03-15 Thread pds

pds  added the comment:

To loewis:

I'm sorry for submitting multiple issues in a single bug report.
Also, currently, I'm afraid I don't have a testing environment for your MSI 
build.

To other members who might follow this issue:

Please specify problem numbers when reporting.

Thanks.

--

___
Python tracker 
<http://bugs.python.org/issue6716>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6716] Windows install error when choosing to compile .py files

2009-08-17 Thread pds

New submission from pds :

There seem to be 3 problems in Python 3.1.1rc1 Windows installer package.

1. Command line argument of compileall.py seems wrong.
2. UnicodeEncodeError occurs depending on code page.
3. Syntax errors.

First, I tried to install Python 3.1.1rc1 just by double-clicking the
Windows msi installer package file, python-3.1.1rc1.msi, as an
administrator account, with the following environment and settings.

Operating System version: Windows XP Professional SP3 (Japanese version)
Install options: Install for all users
Destination directory: C:\Python31
Advanced options: Enable "Compile .py files to byte code after installation"

Then the following dialog message appeared during installation.

There is a problem with this Windows Installer package. A program run as
part of the setup did not finish as expected. Contact your support
personnel or package vendor.

Despite the message, installation of Python interpreter seemed completed
because the programs were registered in Windows start menu.
So I uninstalled Python 3.1.1rc1 to make sure the system to be clean,
and retried installation with the following command from command prompt
so I could see the log file later.

msiexec /i python-3.1.1rc1.msi /L*v python-3.1.1rc1.log

Installation failed again, and the following is the part of the log file
(python-3.1.1rc1.log).

MSI (s) (18:50) [15:08:25:096]: Note: 1: 1722 2: CompilePyc 3:
C:\Python31\python.exe 4: -Wi "C:\Python31\Lib\compileall.py" -f -x
bad_coding|badsyntax|site-packages|py2_ "C:\Python31\Lib" 
MSI (s) (18:50) [15:08:25:096]: Note: 1: 2262 2: Error 3: -2147287038 
Error 1722. There is a problem with this Windows Installer package. A
program run as part of the setup did not finish as expected. Contact
your support personnel or package vendor.  Action CompilePyc, location:
C:\Python31\python.exe, command: -Wi "C:\Python31\Lib\compileall.py" -f
-x bad_coding|badsyntax|site-packages|py2_ "C:\Python31\Lib" 
MSI (s) (18:50) [15:10:58:677]: Note: 1: 2262 2: Error 3: -2147287038 
MSI (s) (18:50) [15:10:58:677]: Product: Python 3.1.1rc1 -- Error 1722.
There is a problem with this Windows Installer package. A program run as
part of the setup did not finish as expected. Contact your support
personnel or package vendor.  Action CompilePyc, location:
C:\Python31\python.exe, command: -Wi "C:\Python31\Lib\compileall.py" -f
-x bad_coding|badsyntax|site-packages|py2_ "C:\Python31\Lib" 

Also, installation completes normally if I choose not to compile .py
files in advanced options setting during the installer's setup dialog.

--
Problem 1: Command line argument of compileall.py seems wrong.

Because installation fails if I choose to compile .py files during
installation, I tried to compile .py files manually after installation
(without compilation) completes.

After finishing installation without compiling .py files, I did the
following command from Windows command prompt.

C:\Python31\python.exe "C:\Python31\Lib\compileall.py" -f -x
bad_coding|badsyntax|site-packages|py2_ "C:\Python31\Lib"

And I got the following error message.
(My Windows is Japanese version.)
'badsyntax' は、内部コマンドまたは外部コマンド、操作可能なプログラムまた
はバッチ ファイルとして認識されていません。

This means, in English,
'badsyntax' is not recognized as an internal or external command,
operable program or batch file.

So I thought the command would be interpreted correctly if I embrace the
following part of the command with "".

bad_coding|badsyntax|site-packages|py2_

So I did the following from command prompt.

C:\Python31\python.exe "C:\Python31\Lib\compileall.py" -f -x
"bad_coding|badsyntax|site-packages|py2_" "C:\Python31\Lib"

And the compilation seemed to proceed.

However, the log file above (python-3.1.1rc1.log) says the argument is
not embraced with "" when compileall.py script is invoked during
installation process.
I suppose the argument not embraced with "" is one of the reasons why
installation process is interrupted.
Is this a bug of the installer package?

--
Problem 2: UnicodeEncodeError occurs depending on code page.

Compiling .py files seems to proceed by double-quoting the argument
discussed above when manually invoking compileall.py script, but the
following error occurs.

Listing C:\Python31\Lib\lib2to3\tests\data ...
Compiling C:\Python31\Lib\lib2to3\tests\data\crlf.py ...
***   File "C:\Python31\Lib\lib2to3\tests\data\crlf.py", line 1
print "hi"
 ^
SyntaxError: invalid syntax

Compiling C:\Python31\Lib\lib2to3\tests\data\different_encoding.py ...
*** Traceback (most recent call last):
  File "C:\Python31\Lib\py_compile.py", line 142, in compile
codeobject = builtins.compile(codestring, dfile or file,'exec')
  File "C:\Python31\Lib\lib2to3\tests\data\different_encoding.py", line 3
print
u

[issue6716] Windows install error when choosing to compile .py files

2009-08-18 Thread pds

pds  added the comment:

The same problems I reported persist in python-3.1.1.msi, too.

--

___
Python tracker 
<http://bugs.python.org/issue6716>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6807] No such file or directory: 'msisupport.dll' in msi.py

2009-08-30 Thread pds

New submission from pds :

Investigating the issue #6716 I reported earlier, I've been trying to
build Windows MSI installer package of Python 3.1 on my own.
I checked out the svn source, built things with Visual C++ 2008 Express
Edition, and tried to make MSI package in Tools\msi directory.
When I run Tools\msi\msi.py in Tools\msi directory, the following error
occurs:

Traceback (most recent call last):
  File "msi.py", line 178, in 
if msilib.pe_type(dll_path) != msilib.pe_type("msisupport.dll"):
  File "E:\python31svnbuild\Tools\msi\msilib.py", line 665, in pe_type
header = open(path, "rb").read(1000)
IOError: [Errno 2] No such file or directory: 'msisupport.dll'

It seems that msilib.pe_type("msisupport.dll") is called before
msisupport.dll is created.
I read msi.py and learned that msilib.pe_type("msisupport.dll") (line
178) is executed before os.system("nmake /nologo /c /f msisupport.mak")
(line 372) is executed in add_ui(), which is called at line 1299.
So I made a patch to make msi.py to see if the file "msisupport.dll"
exists, and if it does, check if the dll is for the correct architecture.

--
components: Installation
files: patch.txt
messages: 92086
nosy: pds
severity: normal
status: open
title: No such file or directory: 'msisupport.dll' in msi.py
type: behavior
versions: Python 3.1
Added file: http://bugs.python.org/file14806/patch.txt

___
Python tracker 
<http://bugs.python.org/issue6807>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com