Skip to content

Commit

Permalink
Better way to obtain program version.
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermechapiewski committed Oct 5, 2009
1 parent 87989d5 commit 7cdd92a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions setup.py
@@ -1,15 +1,11 @@
from setuptools import setup, find_packages
import re

# TODO: There is a more intelligent way to do this :)
f = open("src/__init__.py")
content = f.read()
f.close()
simple_db_migrate_version = re.match(r".*SIMPLE_DB_MIGRATE_VERSION = \"(.*)\"\n.*", content, re.S).group(1)
import src

setup(
name = "simple-db-migrate",
version = simple_db_migrate_version,
version = src.SIMPLE_DB_MIGRATE_VERSION
packages = ["simple_db_migrate"],
package_dir = {"simple_db_migrate": "src"},
author = "Guilherme Chapiewski",
Expand Down

0 comments on commit 7cdd92a

Please sign in to comment.