944,042 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Unsolved
  • Views: 1797
  • Python RSS
Sep 29th, 2009
0

py2exe paths

Expand Post »
when using the data_files option in my setup.py
[/code]
#!/usr/bin/env python

import ctypes
from OpenGL.platform import win32
from distutils.core import setup
import py2exe
import sys

sys.path.append("dist")

setup(options = {"py2exe": {"compressed": 1,
"optimize": 2,
"includes": ["ctypes","Tkinter","Numeric"],
"excludes": ["OpenGL"]
}},
zipfile = None,
data_files=['msvcr71.dll', glut32.dll'],
windows=['myprogram.py']
)
[/code]

I get an error saying msvcr71.dll is not found. It exists in C:\windows\system32. If I specify its full path then I get a similar message about glut32.dll. That one exists in the python site libs. If I include it I get an executable but it doesn't work. I wonder though, whether py2exe can find those dll's to link to them properly in the first place so come to this question: what path variables apply to py2exe? Both directories in question are in my PATH and PythonPath environment variables.

--Douglas
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
vextorspace is offline Offline
16 posts
since Sep 2009
Sep 29th, 2009
0

Re: py2exe paths

I can't find the examples right now, but I recall modifying the setup.py to perform a search for some DLLs and using the path I found in the data section.

so instead of the constant string 'msvcr71.dll' you would use a string variable which contains the full path (as built by the search code).
Reputation Points: 344
Solved Threads: 116
Practically a Master Poster
Murtan is offline Offline
670 posts
since May 2008
Sep 29th, 2009
0

Re: py2exe paths

Click to Expand / Collapse  Quote originally posted by Murtan ...
I can't find the examples right now, but I recall modifying the setup.py to perform a search for some DLLs and using the path I found in the data section.

so instead of the constant string 'msvcr71.dll' you would use a string variable which contains the full path (as built by the search code).
Turns out the real problem I was having was that
from ctypes import utils
wasn't in my script. That lets py2exe realize it needs to include that package since deep in pyOpenGL it includes that in a conditional branch.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
vextorspace is offline Offline
16 posts
since Sep 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Python Forum Timeline: Please Help!
Next Thread in Python Forum Timeline: Unsupported Operand Types?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC