Resolve the version importing problem.
This commit is contained in:
parent
cf8364e944
commit
e9842a84a1
|
@ -1,3 +1,4 @@
|
|||
include README.rst
|
||||
include CHANGELOG.md
|
||||
include version.txt
|
||||
recursive-include pythong/templates *
|
||||
|
|
|
@ -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='',
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/env python
|
||||
# -*- coding: utf8 -*-
|
||||
|
||||
__version__ = "0.6.5"
|
12
setup.py
12
setup.py
|
@ -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=[
|
||||
|
|
Reference in New Issue