Python

Christopher Berner

1 minute read

Add snapshot versions to your setuptools packages from SVN is easy, using the tag_svn_revision = true options in setup.cfg. However, getting this working for GIT proved to be more difficult, as there’s no built in support. However, I finally settled on a bash script that does the job quite nicely. now=date +%sgitversion=git describe --long --dirty=-$now|sed 's/.\*(\[-\]\[0-9\]\[0-9]\*[-\]\[a-z0-9\]*)/1/'python setup.py setopt -o tag_build -s $gitversion-c egg_info python setup.py sdist First we generate a unique version string, based on the number of commits since the last GIT tag:

Christopher Berner

1 minute read

I started using Eclim a couple days ago, and kept running into Error running command: pyflakes <path to my code>, when my files contained more than one syntax error/warning. After a bit of googling I discovered this bug, which suggests that the version of pyflakes in Debian isn’t compatible with Eclim. Sure enough, removing the the .deb package (apt-get remove pyflakes) and installing it from pip (pip install pyflakes), fixed it.