summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-11-25 18:06:50 +0100
committerSebastian Thiel <byronimo@gmail.com>2010-11-25 18:06:50 +0100
commit9004e3a1cf33110f2cbc458f1dc3259c930ad9b4 (patch)
treed4c1d392579e24285381613a4ac1b7cc2d6b6fae /setup.py
parent0cfe75db81bc099e4316895ff24d65ef865bced6 (diff)
downloadgitpython-9004e3a1cf33110f2cbc458f1dc3259c930ad9b4.tar.gz
update setup.py to allow binary builds, which is required for installation and distribution
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index bafd5003..c18d80b5 100755
--- a/setup.py
+++ b/setup.py
@@ -9,6 +9,7 @@ except ImportError:
from distutils.command.build_py import build_py as _build_py
from setuptools.command.sdist import sdist as _sdist
import os
+import sys
from os import path
v = open(path.join(path.dirname(__file__), 'VERSION'))
@@ -40,7 +41,12 @@ class sdist(_sdist):
def _stamp_version(filename):
found, out = False, []
- f = open(filename, 'r')
+ try:
+ f = open(filename, 'r')
+ except (IOError, OSError):
+ print >> sys.stderr, "Couldn't find file %s to stamp version" % filename
+ return
+ #END handle error, usually happens during binary builds
for line in f:
if '__version__ =' in line:
line = line.replace("'git'", "'%s'" % VERSION)