Steps to building the PySwissEph library on Windows

  • Download a Python27 release
  • Download MinGW
  • During the MinGW setup, install GCC/G++ plus additional libraries (“pthreads, etc, etc”)
  • Configure Python and MinGW to work together by following: this link
  • In pyswisspeh-master/libswe/swejpl.c around line 79 comment out the following line: /*typedef __int64 off_t;*/
  • in setup.py add pthreads to your Link Flags: ldflags = ['-lpthread']

NginX with Web2py: Forcing a url to use a single domain

I have for some time wanted to find a simple way to force a domain into a single address www.domain or http://domain with web2py using routes.py and nginx. I did a bit of research more than a few times into routes.py and the mapping system seemed a bit confusing and time consuming for me to take my existing routed domains and make the necessary changes. So I began to look at the server configuration and here is what I came up with after a bit of research.
Continue reading