Graham:
This is how my process worked, using your original buildscripts that
you provided.
Building mod_wsgi requires the following:
Apache (2.2 branch is preferred, but 2.0 should also work)
Python (2.4, 2.5, or 2.6; 3.0 is at this time untested)
Visual C++ (Required to compile)
1. Download the source of mod_wsgi from SVN. (Graham, do we want to
incorporate the buildfiles and httpd.exe.manifest into the SVN
repository?)
2. In the build subdirectory, edit generate.py as follows:
On line 5, set VS2003_PATH to the main directory of your Visual
Studio installation.
On lines 7-18, verify that your installations of Apache and
Python match the paths set for your versions. If the path for your
versions do not match, edit the appropriate lines.
On lines 73-78, comment out the Generate() commands for versions
of Python or Apache you don't want to build mod_wsgi for.
3. Run generate.py. Once it completes, project files will appear. If
you have at least Visual C++ Standard, you can now run build.bat to
build for those versions you selected. If you have Visual C++ Express,
you'll have to open the solution file (.sln) for each mod_wsgi that you
want to build and build it within the IDE.
4. If your build is successful, go to the
mod_wsgi_pyxx_apacheyy_Release folder and copy the mod_wsgi.so to the
modules subdirectory of your Apache install. Further directions for
configuration are on QuickInstallationGuide.
Graham Dumpleton wrote:
2009/1/29 Jonathan Prater <[email protected]>:
And now I've built mod_wsgi with the buildscript with httpd.exe.manifest in
my Apache/bin, and Django works perfectly with it. As does my MoinMoin
wiki. Thank you all for your help!
I know I haven't been participating much in this conversation, being
on holidays and limited Internet time doesn't help. So, much thanks
for those working on this.
If we believe we now have a reproducible way of getting it to build,
along with all prerequisites, would like to document the process this
time properly and put it on the wiki. Of course, we have been talking
about Python 2.6 here, so how it differs for older Python versions and
3.0 would also be good.
Anyway, no rush. Once you do get something together, I'll stick it on
wiki and then people can comment, as well as me perhaps asking for
more information. :-)
Thanks again.
Graham
Jonathan Prater wrote:
I just built mod_python using the steps in the link you provided. The build
was successful, but on my attempt to access my Django site as configured for
mod_python produced the following error:
[Tue Jan 27 19:33:05 2009] [error] [client 127.0.0.1] File
"C:\\Python26\\Lib\\site-packages\\mod_python\\importer.py", line 1537, in
HandlerDispatch\n default=default_handler, arg=req, silent=hlist.silent)
[Tue Jan 27 19:33:05 2009] [error] [client 127.0.0.1] File
"C:\\Python26\\Lib\\site-packages\\mod_python\\importer.py", line 1202, in
_process_target\n module = import_module(module_name, path=path)
[Tue Jan 27 19:33:05 2009] [error] [client 127.0.0.1] File
"C:\\Python26\\Lib\\site-packages\\mod_python\\importer.py", line 304, in
import_module\n return __import__(module_name, {}, {}, ['*'])
[Tue Jan 27 19:33:05 2009] [error] [client 127.0.0.1] File
"c:\\python26\\lib\\site-packages\\django-1.0.2_final-py2.6.egg\\django\\core\\handlers\\modpython.py",
line 4, in <module>\n from django import http
[Tue Jan 27 19:33:05 2009] [error] [client 127.0.0.1] File
"c:\\python26\\lib\\site-packages\\django-1.0.2_final-py2.6.egg\\django\\http\\__init__.py",
line 3, in <module>\n from Cookie import SimpleCookie, CookieError
Graham Dumpleton wrote:
People starting to mention those bug reports in relation to getting
mod_python to build now as well.
http://badwords.org/w/Compile_mod_python_for_Python_2.6.1
Graham
2009/1/27 Peter <[email protected]>:
As mentioned in the help file section entitled "How to Interpret
Warnings and Errors in Dependency Walker", not all warnings and errors
will cause a program to fail.
The following python bug reports suggest that the python maintainers
are also wrestling with Microsoft's native assemblies:
http://bugs.python.org/issue4566 (your import error is listed here)
http://bugs.python.org/issue4918 (your import error is listed here,
too)
http://bugs.python.org/issue4120
Peter
On Jan 26, 7:55 pm, Jon Prater <[email protected]> wrote:
Never mind. If you did build it on Vista, it's not related to the
operating system. Even after I got mod_wsgi to build on my system, it
still refers to DWMAPI.dll. And even my build has the exact same
error as I described above.
On Jan 26, 7:18 pm, Jon Prater <[email protected]> wrote:
DependencyWalkter found something rather interesting. Initially, it
couldn't locate any of the Apache DLLs (libapr-1, libaprutil-1). It
also couldn't pick up something call dwmapi.dll. I resolved the
apache dlls by adding their directory (<apachepath>\bin) to my PATH.
According to the report, it's a dependency of IEFrame.dll, and it
doesn't exist anywhere on my computer. A Google search indicates that
dwmapi.dll is a Vista library. Did you perchance build this on a
Vista machine?
On Jan 26, 8:17 am, Peter <[email protected]> wrote:
Jon,
Here's something else you can try. Install depends.exe
fromhttp://www.dependencywalker.com/andFile/Open_socket.pyd from your
python26/DLLs directory. If you get "MSVCR90.DLL Error opening file.
The system cannot find the file specified (2).", try installing the VC+
+ 2008 run time libraries per my previous post.
Peter
On Jan 25, 6:26 pm, Jon Prater <[email protected]> wrote:
Thank you for this, Peter, it loads perfectly! :D
For background, I'm running Apache 2.2.11 on Windows XP SP3.
I'm trying to load a Django site through mod_wsgi, and when I go to
the url I've set for it, I get 500 Internal Server Error, and this is
put in my Apache error log:
[Sun Jan 25 18:17:03 2009] [error] [client 127.0.0.1] mod_wsgi
(pid=3216): Target WSGI script 'C:/djangoproj/apache/django.wsgi'
cannot be loaded as Python module.
[Sun Jan 25 18:17:03 2009] [error] [client 127.0.0.1] mod_wsgi
(pid=3216): Exception occurred processing WSGI script 'C:/djangoproj/
apache/django.wsgi'.
[Sun Jan 25 18:17:03 2009] [error] [client 127.0.0.1] Traceback (most
recent call last):
[Sun Jan 25 18:17:03 2009] [error] [client 127.0.0.1] File "C:/
djangoproj/apache/django.wsgi", line 11, in <module>
[Sun Jan 25 18:17:03 2009] [error] [client 127.0.0.1] import
django.core.handlers.wsgi
[Sun Jan 25 18:17:03 2009] [error] [client 127.0.0.1] File "c:\
\python26\\lib\\site-packages\\django-1.0.2_final-py2.6.egg\\django\
\core\\handlers\\wsgi.py", line 8, in <module>
[Sun Jan 25 18:17:03 2009] [error] [client 127.0.0.1] from django
import http
[Sun Jan 25 18:17:03 2009] [error] [client 127.0.0.1] File "c:\
\python26\\lib\\site-packages\\django-1.0.2_final-py2.6.egg\\django\
\http\\__init__.py", line 5, in <module>
[Sun Jan 25 18:17:03 2009] [error] [client 127.0.0.1] from urllib
import urlencode
[Sun Jan 25 18:17:03 2009] [error] [client 127.0.0.1] File "C:\
\Python26\\Lib\\urllib.py", line 26, in <module>
[Sun Jan 25 18:17:03 2009] [error] [client 127.0.0.1] import
socket
[Sun Jan 25 18:17:03 2009] [error] [client 127.0.0.1] File "C:\
\Python26\\Lib\\socket.py", line 46, in <module>
[Sun Jan 25 18:17:03 2009] [error] [client 127.0.0.1] import
_socket
[Sun Jan 25 18:17:03 2009] [error] [client 127.0.0.1] ImportError: DLL
load failed: The specified module could not be found.
At the time of load, my python path looks like this:
['C:\\\\Python26\\\\lib\\\\site-packages\\\\setuptools-0.6c9-
py2.6.egg', 'C:\\\\Python26\\\\lib\\\\site-packages\\\
\django-1.0.2_final-py2.6.egg', 'C:\\\\WINDOWS\\\\system32\\\
\python26.zip', 'C:\\\\Python26\\\\Lib', 'C:\\\\Python26\\\\DLLs', 'C:\
\\\Python26\\\\Lib\\\\lib-tk', 'C:\\\\Program Files\\\\Apache Software
Foundation\\\\Apache2.2', 'C:\\\\Program Files\\\\Apache Software
Foundation\\\\Apache2.2\\\\bin', 'C:\\\\Python26', 'C:\\\\Python26\\\
\lib\\\\site-packages', 'C:\\\\Python26\\\\lib\\\\site-packages\\\
\mod_python', 'C:\\\\Python26\\\\lib\\\\site-packages\\\\win32', 'C:\\\
\Python26\\\\lib\\\\site-packages\\\\win32\\\\lib', 'C:\\\\Python26\\\
\lib\\\\site-packages\\\\Pythonwin', 'C:\\\\djangoproj', 'C:\\\
\djangoproj']
My python install path is c:\python26, my Django source is
installed
in its default site-packages location, and my Django project is a
subfolder of c:\djangoproj. I've followed all the steps on the
IntegrationWithDjango page, as well
ashttp://code.djangoproject.com/wiki/django_apache_and_mod_wsgi.
Any help you can give would be welcome.
On Jan 25, 12:10 pm, Peter <[email protected]> wrote:
Attached is my first cut at a windows build script for mod_wsgi 2.x,
python 2.6.1, and apache 2.2.11. The script consists of one bat and two
rsp files. I've also included the mod_wsgi.so and build output.txt in
the attached zip. I've only tested mod_wsgi.so with a couple of small
wsgi scripts. Please read the comments in build.bat before using.
Feedback is welcomed.
Peter Santoro
win32wsgi.zip
40KViewDownload
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "modwsgi" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en
-~----------~----~----~----~------~----~------~--~---
|