Resolve the version importing problem.

This commit is contained in:
David Gay 2013-11-22 13:23:12 -05:00
parent cf8364e944
commit e9842a84a1
4 changed files with 16 additions and 4 deletions

View File

@ -1,3 +1,4 @@
include README.rst
include CHANGELOG.md
include version.txt
recursive-include pythong/templates *

View File

@ -2,12 +2,11 @@
# -*- coding: utf8 -*-
import argparse
from pythong.version import __version__
from pythong.command import label, pin, wash
from pythong.project import prompt_classifiers, prompt_new_project
__version__ = "0.6.5"
def parse_command():
p = argparse.ArgumentParser()
p.add_argument('name', nargs='?', default='',

4
pythong/version.py Normal file
View File

@ -0,0 +1,4 @@
#!/bin/env python
# -*- coding: utf8 -*-
__version__ = "0.6.5"

View File

@ -7,10 +7,18 @@ try:
except ImportError:
pass
import pythong
"""This manual version import is needed for setup.py
if we want to have the version pulled from one location
because if we import python.version to get it, the install
will fail because jinja2 will be missing."""
__version__ = "" # this will be pulled from version.py
with open('pythong/version.py') as f:
exec(f)
setup(name='pythong',
version=pythong.__version__,
version=__version__,
description="Set up a minimal, yet comfortable structure \
for a Python project",
classifiers=[