Skip to content

Commit

Permalink
Less cool, but more compatible version.
Browse files Browse the repository at this point in the history
  • Loading branch information
shakefu committed Aug 4, 2015
1 parent 4c0df9e commit aebed45
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
import multiprocessing, logging # Fix atexit bug
from setuptools import setup, find_packages

exec("c=__import__('compiler');a='__version__';l=[];g=lambda:[n.expr.value for"
" n in l for o in n.nodes if o.name==a].pop();c.walk(c.parseFile('%s/_"
"_init__.py'),type('v',(object,),{'visitAssign':lambda s,n:l.append(n)"
"})());exec(a+'=g()');"%'humbledb')

def version():
try:
import re
return re.search("^__version__ = '(.*)'",
open('pytool/__init__.py').read(), re.M).group(1)
except:
raise RuntimeError("Could not get version")


setup(
name='humbledb',
version=__version__,
version=version(),
description="HumbleDB - MongoDB Object-Document Mapper",
author="Jacob Alheid",
author_email="jake@about.me",
Expand Down

0 comments on commit aebed45

Please sign in to comment.