Merge pull request #1209 from Kodiologist/fix-1205

Fix 1205
This commit is contained in:
Paul Tagliamonte 2017-01-24 13:40:42 -05:00 committed by GitHub
commit 7a4a2ca668
1 changed files with 6 additions and 2 deletions

View File

@ -22,6 +22,7 @@
import os
import re
import sys
import runpy
import subprocess
from setuptools import find_packages, setup
@ -37,8 +38,11 @@ try:
.replace('-', '+', 1).replace('-', '.'))
with open(VERSIONFILE, "wt") as o:
o.write("__version__ = {!r}\n".format(__version__))
except subprocess.CalledProcessError:
__version__ = "unknown"
except (subprocess.CalledProcessError, OSError):
if os.path.exists(VERSIONFILE):
__version__ = runpy.run_path(VERSIONFILE)['__version__']
else:
__version__ = "unknown"
long_description = """Hy is a Python <--> Lisp layer. It helps
make things work nicer, and lets Python and the Hy lisp variant play