setup.py 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import os
  2. import re
  3. from setuptools import setup
  4. def rel(*parts):
  5. '''returns the relative path to a file wrt to the current directory'''
  6. return os.path.abspath(os.path.join(os.path.dirname(__file__), *parts))
  7. if os.path.isfile('README.rst'):
  8. README = open('README.rst', 'r').read()
  9. else:
  10. README = open('README.md', 'r').read()
  11. with open(rel('webpack_loader', '__init__.py')) as handler:
  12. INIT_PY = handler.read()
  13. VERSION = re.findall("__version__ = '([^']+)'", INIT_PY)[0]
  14. setup(
  15. name = 'django-webpack-loader',
  16. packages = ['webpack_loader', 'webpack_loader/templatetags', 'webpack_loader/contrib'],
  17. version = VERSION,
  18. description = 'Transparently use webpack with django',
  19. long_description=README,
  20. author = 'Owais Lone',
  21. author_email = 'hello@owaislone.org',
  22. download_url = 'https://github.com/owais/django-webpack-loader/tarball/{0}'.format(VERSION),
  23. url = 'https://github.com/owais/django-webpack-loader', # use the URL to the github repo
  24. keywords = ['django', 'webpack', 'assets'], # arbitrary keywords
  25. classifiers = [
  26. 'Programming Language :: Python :: 2.6',
  27. 'Programming Language :: Python :: 2.7',
  28. 'Programming Language :: Python :: 3.3',
  29. 'Programming Language :: Python :: 3.4',
  30. 'Programming Language :: Python :: 3.5',
  31. 'Framework :: Django',
  32. 'Environment :: Web Environment',
  33. 'License :: OSI Approved :: MIT License',
  34. ],
  35. )