sivy/py-statsd — pull request #42 by LarsFronius (2011-12-14 22:28:00+00:00)
Title: py-statsd will only build on python2.6, dpkg-buildpackage won't work if 2.5 is installed. Fixed control File.

If you try to build python-statsd.dpkg on debian with python2.5 installed it will fail.

```
~/builds/python/py-statsd (master)$ dpkg-buildpackage -rfakeroot
dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): -g -O2
dpkg-buildpackage: export CPPFLAGS from dpkg-buildflags (origin: vendor):
dpkg-buildpackage: export CXXFLAGS from dpkg-buildflags (origin: vendor): -g -O2
dpkg-buildpackage: export FFLAGS from dpkg-buildflags (origin: vendor): -g -O2
dpkg-buildpackage: export LDFLAGS from dpkg-buildflags (origin: vendor):
dpkg-buildpackage: source package python-statsd
dpkg-buildpackage: source version 1.0-2
dpkg-buildpackage: source changed by Rob Terhaar
dpkg-buildpackage: host architecture amd64
dpkg-source --before-build py-statsd
fakeroot debian/rules clean
dh --buildsystem=python_distutils clean
dh_testdir -O--buildsystem=python_distutils
dh_auto_clean -O--buildsystem=python_distutils
/home/buildmaster/builds/python/py-statsd/pystatsd/daemon.py:62: Warning: 'with' will become a reserved keyword in Python 2.6
Traceback (most recent call last):
File "setup.py", line 3, in
from pystatsd import VERSION
File "/home/buildmaster/builds/python/py-statsd/pystatsd/__init__.py", line 2, in
from server import Server
File "/home/buildmaster/builds/python/py-statsd/pystatsd/server.py", line 17, in
from daemon import Daemon
File "/home/buildmaster/builds/python/py-statsd/pystatsd/daemon.py", line 62
with open(self.pidfile, 'w+') as fp:
^
SyntaxError: invalid syntax
dh_auto_clean: python2.5 setup.py clean -a returned exit code 1
make: *** [clean] Error 1
dpkg-buildpackage: error: fakeroot debian/rules clean gave error exit status 2
```

Setting python-version in control-file fixes it.