| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- from __future__ import absolute_import
- import codecs
- import os
- import re
- from setuptools import setup
- def get_version(filename):
- with codecs.open(filename, 'r', 'utf-8') as fp:
- contents = fp.read()
- return re.search(r"__version__ = ['\"]([^'\"]+)['\"]", contents).group(1)
- version = get_version(os.path.join('corsheaders', '__init__.py'))
- with codecs.open('README.rst', 'r', 'utf-8') as readme_file:
- readme = readme_file.read()
- with codecs.open('HISTORY.rst', 'r', 'utf-8') as history_file:
- history = history_file.read()
- setup(
- name='django-cors-headers',
- version=version,
- description=(
- 'django-cors-headers is a Django application for handling the server '
- 'headers required for Cross-Origin Resource Sharing (CORS).'
- ),
- long_description=readme + '\n\n' + history,
- author='Otto Yiu',
- author_email='otto@live.ca',
- url='https://github.com/ottoyiu/django-cors-headers',
- packages=['corsheaders'],
- license='MIT License',
- keywords=['django', 'cors', 'middleware', 'rest', 'api'],
- install_requires=[
- 'Django>=1.11',
- ],
- python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
- classifiers=[
- 'Development Status :: 5 - Production/Stable',
- 'Environment :: Web Environment',
- 'Framework :: Django',
- 'Framework :: Django :: 1.11',
- 'Framework :: Django :: 2.0',
- 'Framework :: Django :: 2.1',
- 'Framework :: Django :: 2.2',
- 'Intended Audience :: Developers',
- 'License :: OSI Approved :: MIT License',
- 'Operating System :: OS Independent',
- 'Programming Language :: Python',
- 'Programming Language :: Python :: 2',
- 'Programming Language :: Python :: 2.7',
- 'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.5',
- 'Programming Language :: Python :: 3.6',
- 'Programming Language :: Python :: 3.7',
- 'Topic :: Software Development :: Libraries :: Application Frameworks',
- 'Topic :: Software Development :: Libraries :: Python Modules',
- ],
- )
|