Skip to content

Commit 9004e3a

Browse files
committed
update setup.py to allow binary builds, which is required for installation and distribution
1 parent 0cfe75d commit 9004e3a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

setup.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from distutils.command.build_py import build_py as _build_py
1010
from setuptools.command.sdist import sdist as _sdist
1111
import os
12+
import sys
1213
from os import path
1314

1415
v = open(path.join(path.dirname(__file__), 'VERSION'))
@@ -40,7 +41,12 @@ def make_release_tree (self, base_dir, files):
4041

4142
def _stamp_version(filename):
4243
found, out = False, []
43-
f = open(filename, 'r')
44+
try:
45+
f = open(filename, 'r')
46+
except (IOError, OSError):
47+
print >> sys.stderr, "Couldn't find file %s to stamp version" % filename
48+
return
49+
#END handle error, usually happens during binary builds
4450
for line in f:
4551
if '__version__ =' in line:
4652
line = line.replace("'git'", "'%s'" % VERSION)

0 commit comments

Comments
 (0)