2009-07-02 18:03:02 +00:00
|
|
|
from setuptools import setup, find_packages
|
2010-01-07 04:48:44 +00:00
|
|
|
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())
|
|
|
|
|
|
2009-07-02 18:03:02 +00:00
|
|
|
setup(
|
|
|
|
|
name='django-model-utils',
|
2010-01-07 04:48:44 +00:00
|
|
|
version='0.3.2dev%s' % hgrev,
|
2009-07-02 18:03:02 +00:00
|
|
|
description='Django model mixins and utilities',
|
2010-01-07 04:48:44 +00:00
|
|
|
long_description=long_description,
|
2009-07-02 18:03:02 +00:00
|
|
|
author='Carl Meyer',
|
|
|
|
|
author_email='carl@dirtcircle.com',
|
2009-10-26 21:49:44 +00:00
|
|
|
url='http://bitbucket.org/carljm/django-model-utils/',
|
2009-07-02 18:03:02 +00:00
|
|
|
packages=find_packages(),
|
|
|
|
|
classifiers=[
|
2009-10-26 21:49:44 +00:00
|
|
|
'Development Status :: 4 - Beta',
|
2009-07-02 18:03:02 +00:00
|
|
|
'Environment :: Web Environment',
|
|
|
|
|
'Intended Audience :: Developers',
|
|
|
|
|
'License :: OSI Approved :: BSD License',
|
|
|
|
|
'Operating System :: OS Independent',
|
|
|
|
|
'Programming Language :: Python',
|
|
|
|
|
'Framework :: Django',
|
|
|
|
|
],
|
|
|
|
|
zip_safe=False,
|
2009-10-26 21:49:44 +00:00
|
|
|
test_suite='model_utils.tests.runtests.runtests'
|
2009-07-02 18:03:02 +00:00
|
|
|
)
|