django-model-utils/setup.py

57 lines
1.8 KiB
Python
Raw Normal View History

2015-12-03 16:30:06 +00:00
import os
from setuptools import setup, find_packages
2013-01-27 22:54:29 +00:00
2015-12-03 16:30:06 +00:00
def long_desc(root_path):
FILES = ['README.rst', 'CHANGES.rst']
for filename in FILES:
filepath = os.path.realpath(os.path.join(root_path, filename))
if os.path.isfile(filepath):
with open(filepath, mode='r') as f:
yield f.read()
2013-01-27 22:54:29 +00:00
2015-12-03 16:30:06 +00:00
HERE = os.path.abspath(os.path.dirname(__file__))
long_description = "\n\n".join(long_desc(HERE))
def get_version(root_path):
with open(os.path.join(root_path, 'model_utils', '__init__.py')) as f:
for line in f:
if line.startswith('__version__ ='):
return line.split('=')[1].strip().strip('"\'')
setup(
name='django-model-utils',
2015-12-03 16:30:06 +00:00
version=get_version(HERE),
license="BSD",
description='Django model mixins and utilities',
long_description=long_description,
author='Carl Meyer',
2013-03-28 02:59:19 +00:00
author_email='carl@oddbird.net',
url='https://github.com/carljm/django-model-utils/',
packages=find_packages(exclude=['tests*']),
2016-03-27 00:02:49 +00:00
install_requires=['Django>=1.8'],
classifiers=[
2013-03-28 02:59:19 +00:00
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
2015-10-28 21:26:36 +00:00
'Programming Language :: Python :: 3.4',
2016-07-18 20:47:41 +00:00
'Programming Language :: Python :: 3.5',
'Framework :: Django',
],
zip_safe=False,
2016-03-27 00:02:49 +00:00
tests_require=['Django>=1.8'],
package_data={
'model_utils': [
'locale/*/LC_MESSAGES/django.po','locale/*/LC_MESSAGES/django.mo'
],
},
)