commit
7a4a2ca668
8
setup.py
8
setup.py
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user