[pygr-notify] [pygr commit] r226 - Edited wiki page through web user interface.
codesite-noreply at google.com
codesite-noreply at google.com
Thu May 14 18:49:42 PDT 2009
Author: marecki
Date: Thu May 14 18:18:30 2009
New Revision: 226
Modified:
wiki/BuildingAndTestingPygr.wiki
Log:
Edited wiki page through web user interface.
Modified: wiki/BuildingAndTestingPygr.wiki
==============================================================================
--- wiki/BuildingAndTestingPygr.wiki (original)
+++ wiki/BuildingAndTestingPygr.wiki Thu May 14 18:18:30 2009
@@ -42,8 +42,8 @@
* if under Linux/Unix/Fink/Cygwin/..., Python's header files may be
distributed separately from its executables and other run-time files. Look
for something similar to _python-devel_ in your package manager; installing
it should automatically pull in all dependencies. As for the compiler, you
will most likely use GCC - almost certainly available in your system's
package repositories, if not already on your hard drive;
- * under Windows, your Python installation should come with all the
required header files but things are more complicated when it comes to the
compiler. There are two options available here, they will be discussed in
more details later:
- * use Microsoft Visual Studio and the official Microsoft Platform SDK; or
+ * under Windows, your Python installation should come with all the
required header files but things are more complicated when it comes to the
compiler. There are two options available here, discussed in more details
[PygrOnWindows here]:
+ * use Microsoft Visual C++ and the official Microsoft Platform SDK; or
* use [http://www.mingw.org/ MinGW], port of GCC and friends to Windows
bundled with freely-distributable standard header files and import
libraries.
Like Pyrex, both the compiler and the header files are build-time
dependencies only. They can safely be removed afterwards.
@@ -57,7 +57,7 @@
* MySQL - _MySQLdb_ (from the
[http://sourceforge.net/projects/mysql-python MySQL-python] package).
-Both are fairly common in package repositories, and if all else fails they
can be built from the source the same way as Pyrex (then again, note that
building mysql-python is more complicated than most Python modules,
especially under Windows - it will be discussed later).
+Both are fairly common in package repositories, and if all else fails they
can be built from the source the same way as Pyrex (then again, note that
building mysql-python is more complicated than most Python modules,
especially under Windows - see [PygrOnWindows] for details of the latter
case).
Note that Pygr only checks for SQL-related modules at run time - they
needn't be present at the time of installation.
@@ -92,59 +92,3 @@
Running the tests will display some information pertaining to their
progress, followed by a summary. If everything is right, all tests should
pass. Depending of what optional components are present in your system you
may observe some test suites having been skipped.
-
-== Building under Windows ==
-
-While the build procedure itself is the same under Windows as under other
systems, the former demands more attention because of the multitude of
possible build set-ups - at present, Python extensions can be build in any
of the following ways:
- * under Cygwin
- * natively, using Microsoft Visual C++
- * natively, using MinGW
-
-=== Cygwin ===
-
-Possibly the best choice for users with Unix background, as the POSIX
environment provided by Cygwin is very similar (up to and including
familiar shells) to what is offered by Linux/Unix systems - making it
unnecessary to deal with the native command-line interface of Windows and
all its quirks. The fact the environment is based entirely on Open Source
software may be important to some as well. Last but not least, Cygwin comes
with a package manager which makes it a breeze to install (almost) all the
software needed to build and run Pygr.
-
-The primary (yet hardly major) disadvantage of Cygwin is that it must of
course be installed everywhere you want to run Cygwin applications.
Moreover, applications built under it do not necessarily work when
called "from the outside". This leaves us with only one issue - getting
Python-MySQL to work under Cygwin is at present a bit of a bother.
-
-
-==== Details ====
-
-Make sure the following packages are installed, along with whatever they
pull in:
- * always: _gcc_, _python_;
- * for Git versions: _python-pyrex_;
- * for SQLite support: _libsqlite3_0_ (note: this is required even for
Python 2.5 and newer - even then it isn't automatically pulled in by the
_python_ package), _libsqlite3-devel_ (Python older than 2.5 only).
-Follow the standard building procedure. Build the _pysqlite2_ module by
hand if you want SQLite support under Python versions older than 2.5.
-
-The problem with MySQL under Cygwin is that there are presently no Cygwin
packages of MySQL. Rumour has it it is possible to link Python-MySQL
against a native Windows installation of the MySQL client, then again since
the procedure involves some serious cross-platform voodoo it is generally
easier to build the MySQL client from sources. While doing this, keep the
following in mind:
- * make sure you pass _--without-server_ (or similar, different versions
used different options) to _configure_ - building the server is not
necessary and usually fails anyway;
- * depending on the version of MySQL and/or Cygwin packages, the compiler
may complain about missing header files not present anywhere in the Cygwin
repository. For example, MySQL-5.1.33 built on an up-to-date Cygwin
installation in April 2009 couldn't find _sys/ttydefaults.h_. In many cases
this can be worked around by locating such files on any relatively modern
Linux box and copying them into the MySQL source tree.
-
-
-=== Microsoft Visual C++ ===
-
-Since all official Python distributions so far have been built using
different versions of Visual C++, it is the de-facto standard way - and,
for now anyway, the *only* stable way in case of 64-bit builds - of
building Python extensions for this operating system. That said, there is
an important issue to keep in mind regarding this approach: due to
limitations of Visual C++, extensions must be built with *exactly the same*
version of the compiler as your Python distribution! In case of official
distributions from Python.org, these are:
- * 2.3 - 6
- * 2.4/2.5 - 2003
- * 2.6 - 2008
-The fact old versions of Microsoft software may be difficult and/or
expensive to obtain aside, this makes it more-or-less impossible to perform
builds for different Python version under a single instance of the
operating system.
-
-The easiest way of obtaining Visual C++ is to find (download from
microsoft.com if it's the latest edition, elsewhere - e.g. on CDs attached
to programming books at a library - if not) and install Microsoft Visual
Studio Express Edition - it's free and takes up _much_ less disc space than
the full-blown edition. Unfortunately the earliest Express-Edition version
of Visual Studio was 2005, meaning this option is not viable for any
official Python builds older than 2.6. Note that in case of VS 2003 there
is an alternative to spending time and money on hunting down a copy - in
2004 Microsoft made available free of charge _Visual C++ Toolkit 2003_, a
full version of Visual C++ 2003 optimizing compiler. This will give you no
GUI or anything fancy, just the compiler, but it is enough to build Pygr.
The Toolkit is no longer available on microsoft.com but can quite easily be
found elsewhere on the Web. Once you've got a copy, follow
[http://www.vrplumber.com/programming/mstoolkit/ these instructions] to set
everything up.
-
-
-==== Details ====
-
-Building Pygr with Visual C++ should work out of the box as long as all of
its dependencies have been met.
-
-You may need an appropriate Windows installation disc when installing
Visual Studio, as some versions (confirmed with VS2003 Professional)
require the IIS server and its FrontPage extensions, both of them standard
but optional (and not recommended for keeping around unless absolutely
needed) Windows components, to be present before installation can even
begin. Yes, even if you are about NOT to choose anything but C++-related
bits in the installer! Fortunately they can be safely removed after
installation.
-
-If installing an older version of Visual Studio, don't bother telling it
to look for updates as the final step of installation - it will likely not
find them, even if they're still on microsoft.com. Just finish
installation, then download and run update installers (_e.g._ Visual Studio
2003 Service Pack 1) by hand. At this point it should be safe to click the
Exit button without rolling back the installation.
-
-
-=== MinGW ===
-
-[http://www.mingw.org/ MinGW] along with its companion project
[http://mingw-w64.sourcefore.net/ MinGW-w64] port the GNU development chain
(gcc, binutils and so on) to Windows and provide it with
freely-distributable header files and import libraries. With MinGW one
should be able to build native Windows applications the same way one would
invoke gcc in a POSIX environment.
-
-TBC
-
- * *Pros*: only free tools needed, can be used to build for any Python
version
- * *Cons*: doesn't quite work with Pygr yet (see below)!
\ No newline at end of file
More information about the pygr-notify
mailing list