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

View File

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