| 1 | import os |
| 2 | import codecs |
| 3 | import re |
| 4 | from setuptools import setup, find_packages |
| 5 | |
| 6 | |
| 7 | def read(*parts): |
| 8 | return codecs.open(os.path.join(os.path.dirname(__file__), *parts)).read() |
| 9 | |
| 10 | |
| 11 | def find_version(*file_paths): |
| 12 | version_file = read(*file_paths) |
| 13 | version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", |
| 14 | version_file, re.M) |
| 15 | if version_match: |
| 16 | return version_match.group(1) |
| 17 | raise RuntimeError("Unable to find version string.") |
| 18 | |
| 19 | |
| 20 | setup( |
| 21 | name='django-paintstore', |
| 22 | version=find_version("paintstore", "__init__.py"), |
| 23 | description='A Django app that integrates jQuery ColorPicker with the Django admin.', |
| 24 | long_description=read('README.rst'), |
| 25 | author='Glenn Siegman', |
| 26 | author_email='[email protected]', |
| 27 | license='MIT', |
| 28 | url='https://github.com/gsiegman/django-paintstore', |
| 29 | packages=find_packages(), |
| 30 | include_package_data=True, |
| 31 | zip_safe = False, |
| 32 | classifiers=[ |
| 33 | "Development Status :: 4 - Beta", |
| 34 | 'Environment :: Web Environment', |
| 35 | 'Framework :: Django', |
| 36 | 'Intended Audience :: Developers', |
| 37 | 'License :: OSI Approved :: MIT License', |
| 38 | 'Operating System :: OS Independent', |
| 39 | 'Programming Language :: Python', |
| 40 | 'Topic :: Utilities', |
| 41 | ] |
| 42 | ) |