Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
51 lines (41 sloc) 1.48 KB
#!/usr/bin/env python
import os
import re
from setuptools import setup, find_packages
version = re.compile(r'VERSION\s*=\s*\((.*?)\)')
def get_package_version():
"returns package version without importing it"
base = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(base, "chartkick/__init__.py")) as initf:
for line in initf:
m = version.match(line.strip())
if not m:
continue
return ".".join(m.groups()[0].split(", "))
classes = """
Development Status :: 3 - Alpha
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Topic :: Software Development :: Libraries
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3.3
Programming Language :: Python :: 3.4
Programming Language :: Python :: Implementation :: CPython
Operating System :: OS Independent
"""
classifiers = [s.strip() for s in classes.split('\n') if s]
setup(
name='chartkick',
version=get_package_version(),
description='Create beautiful Javascript charts with minimal code',
long_description=open('README.rst').read(),
author='Mher Movsisyan',
author_email='mher.movsisyan@gmail.com',
url='https://github.com/mher/chartkick.py',
license='MIT',
classifiers=classifiers,
packages=find_packages(exclude=['tests', 'tests.*']),
package_data={'chartkick': ['js/*']},
)