Skip to content

Commit

Permalink
Modified the setup.py to get the latest version from the code and the…
Browse files Browse the repository at this point in the history
… long_description fro the README.txt file
  • Loading branch information
Corey Oordt committed Apr 5, 2010
1 parent f6db9f2 commit 4700b26
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
This app attempts to provide a generic category system that multiple apps could use. It uses MPTT for the tree storage and provides a custom admin for better visualization (copied and modified from feinCMS).

Goals of the project

* Have a generic method for handling hierarchical data
Expand Down
19 changes: 19 additions & 0 deletions categories/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@

from django.db.models import FieldDoesNotExist

__version_info__ = {
'major': 0,
'minor': 2,
'micro': 0,
'releaselevel': 'final',
'serial': 0
}

def get_version():
vers = ["%(major)i.%(minor)i" % __version_info__, ]

if __version_info__['micro']:
vers.append(".%(micro)i" % __version_info__)
if __version_info__['releaselevel'] != 'final':
vers.append('%(releaselevel)s%(serial)i' % __version_info__)
return ''.join(vers)

__version__ = get_version()

class AlreadyRegistered(Exception):
"""
An attempt was made to register a model more than once.
Expand Down
11 changes: 8 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
from distutils.core import setup
import categories

try:
long_description = open('README.txt').read()
except IOError:
long_description = ''

setup(name='django-categories',
version='0.2',
version=catgories.get_version(),
description='A way to handle one or more hierarchical category trees in django.',
long_description='This app attempts to provide a generic category system that multiple apps could use. It uses MPTT for the tree storage and provides a custom admin for better visualization (copied and modified from feinCMS).',
long_description=long_description,
author='Corey Oordt',
author_email='coordt@washingtontimes.com',
url='http://opensource.washingtontimes.com/projects/django-categories/',
Expand All @@ -13,4 +19,3 @@
'License :: OSI Approved :: Apache License',
],
)

0 comments on commit 4700b26

Please sign in to comment.