diff --git a/.gitignore b/.gitignore index c6a4204..06454bb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ dist/* django_model_utils.egg-info/* +HGREV diff --git a/.hgignore b/.hgignore index 804b87d..033f485 100644 --- a/.hgignore +++ b/.hgignore @@ -1,2 +1,3 @@ ^dist/ ^django_model_utils.egg-info/ +^HGREV$ diff --git a/CHANGELOG.txt b/CHANGELOG.txt deleted file mode 100644 index c429830..0000000 --- a/CHANGELOG.txt +++ /dev/null @@ -1,9 +0,0 @@ -============================ -django-model-utils changelog -============================ - -v0.3.0 ------- - -* Added ``QueryManager`` - diff --git a/CHANGES.txt b/CHANGES.txt new file mode 100644 index 0000000..2cd69e8 --- /dev/null +++ b/CHANGES.txt @@ -0,0 +1,13 @@ +CHANGES +======= + +tip (unreleased) +---------------- + +- added South support for custom model fields + +0.3.0 +----- + +* Added ``QueryManager`` + diff --git a/MANIFEST.in b/MANIFEST.in index 35fe970..2db1ab1 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,7 +1,8 @@ include AUTHORS.txt -include CHANGELOG.txt +include CHANGES.txt include INSTALL.txt include LICENSE.txt include MANIFEST.in include README.txt -include TODO.txt \ No newline at end of file +include TODO.txt +include HGREV diff --git a/README.txt b/README.txt index b1d88ce..18a34fe 100644 --- a/README.txt +++ b/README.txt @@ -98,3 +98,4 @@ The kwargs passed to ``QueryManager`` will be passed as-is to the set the ordering of the ``QuerySet`` returned by the ``QueryManager`` by chaining a call to ``.order_by()`` on the ``QueryManager`` (this is not required). + diff --git a/TODO.txt b/TODO.txt index abe2db7..3e36bdf 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,5 +1,5 @@ -TODO list for django-model-utils -================================ +TODO +==== * Custom QuerySet subclass to pair with InheritanceCastModel for more efficient querying. diff --git a/setup.py b/setup.py index c152497..b77b923 100644 --- a/setup.py +++ b/setup.py @@ -1,10 +1,34 @@ from setuptools import setup, find_packages - +import subprocess +import os.path + +try: + # don't get confused if our sdist is unzipped in a subdir of some + # other hg repo + if os.path.isdir('.hg'): + p = subprocess.Popen(['hg', 'parents', r'--template={rev}\n'], + stdout=subprocess.PIPE, stderr=subprocess.PIPE) + if not p.returncode: + fh = open('HGREV', 'w') + fh.write(p.communicate()[0].splitlines()[0]) + fh.close() +except (OSError, IndexError): + pass + +try: + hgrev = open('HGREV').read() +except IOError: + hgrev = '' + +long_description = (open('README.txt').read() + + open('CHANGES.txt').read() + + open('TODO.txt').read()) + setup( name='django-model-utils', - version='0.3.2dev', + version='0.3.2dev%s' % hgrev, description='Django model mixins and utilities', - long_description=open('README.txt').read(), + long_description=long_description, author='Carl Meyer', author_email='carl@dirtcircle.com', url='http://bitbucket.org/carljm/django-model-utils/',