proper manifest. setup groks version from __init__

This commit is contained in:
Tom Christie 2011-06-02 12:17:21 +01:00
parent fb805bbb7c
commit c4d800ef32
3 changed files with 17 additions and 9 deletions

5
MANIFEST.in Normal file
View File

@ -0,0 +1,5 @@
recursive-include djangorestframework/static *.ico *.txt
recursive-include djangorestframework/templates *.txt *.html
recursive-include examples .keep *.py *.txt
recursive-include docs *.py *.rst *.html *.txt
include AUTHORS LICENSE requirements.txt tox.ini

View File

@ -1 +1,3 @@
VERSION="0.1.1"
__version__ = '0.1.1'
VERSION = __version__ # synonym

View File

@ -3,13 +3,19 @@
from setuptools import setup
import os, re
path = os.path.join(os.path.dirname(__file__), 'djangorestframework', '__init__.py')
init_py = open(path).read()
VERSION = re.match("__version__ = '([^']+)'", init_py).group(1)
setup(
name = "djangorestframework",
version = "0.1",
name = 'djangorestframework',
version = VERSION,
url = 'https://bitbucket.org/tomchristie/django-rest-framework/wiki/Home',
download_url = 'https://bitbucket.org/tomchristie/django-rest-framework/downloads',
license = 'BSD',
description = "A lightweight REST framework for Django.",
description = 'A lightweight REST framework for Django.',
author = 'Tom Christie',
author_email = 'tom@tomchristie.com',
packages = ['djangorestframework',
@ -30,8 +36,3 @@ setup(
'Topic :: Internet :: WWW/HTTP',
]
)
import os, shutil
shutil.rmtree(os.path.join(os.path.dirname(__file__), 'djangorestframework.egg-info'), True)