Here are the steps required to set up a development environment on Windows for my Python project:
- Download the required programs and libraries
- Komodo Edit for best-of-breed Python editing
- Oracle Berekely DB 4.7.25 for the storage engine
- Stackless Python 2.6 (I’ll eventually convert to 3.x)
- setuptools-0.6c9.tar.gz to install Python eggs
- bsddb3-4.7.6.zip
- If you don’t have a tar.gz expander, 7-Zip
- If you don’t have a C++ compiler, or yours is out of date, get Visual C++ Express 2009
- Install Visual C++ Express
- Install Komodo Edit
- Install Stackless Python 2.6
- Install Berkeley DB 4.7
- Expand bsddb3-4.7.6.zip to a known directory
- Install setuptools and PyBSDDB
- Expand setuptools into a temporary directory
- Open a command line (on Vista, Windows-R and enter cmd)
- Add Python to the command line environment with:
set PATH=%PATH%;C:\Python26
- Change directory to the temporary directory where you expanded setuptools
- Install setuptools with:
python setup.py install
- Install PyBSDDB with:
cd \Users\Chris\Temp\bsddb3-4.7.6 (where I expanded bsdb4)
mkdir db
cd db
xcopy /e /v "C:\Program Files\Oracle\Berkeley DB 4.7.25\include" include\
xcopy /e /v "C:\Program Files\Oracle\Berkeley DB 4.7.25\lib" lib\
cd ..
"C:\Program Files\Microsoft Visual Studio 9\VC\vcvarsall.bat"
python setup.py install
. . . time for bed, but I’m having a little trouble with MSVC:
snip
Modules/_bsddb.c(8358) : warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
F:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\string.h(157) :
see declaration of 'strncpy'
warning: I don't know what to do with 'runtime_library_dirs': ['db/lib']
error: don't know how to set runtime library search path for MSVC++
Yeah, I’m probably nuts for trying to compile this myself. On OS X or Linux, there are still plenty of steps but no major hurdles.