forked from ierror/django-js-reverse
-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
executable file
·59 lines (52 loc) · 1.65 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import codecs
import os
import sys
from setuptools import setup, find_packages
if sys.version_info < (3, 7):
INSTALL_REQUIRES = [
'Django>=1.5',
]
else:
INSTALL_REQUIRES = [
'Django>=3.2',
'packaging>=21.3'
]
def read(*parts):
filename = os.path.join(os.path.dirname(__file__), *parts)
with codecs.open(filename, encoding='utf-8') as fp:
return fp.read()
def get_version(rel_path):
for line in read(rel_path).splitlines():
if line.startswith('__version__'):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
else:
raise RuntimeError("Unable to find version string.")
setup(
name='django-js-reverse',
version=get_version("django_js_reverse/__init__.py"),
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: Implementation :: PyPy',
'Framework :: Django',
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: MIT License',
],
license='MIT',
description='Javascript url handling for Django that doesn\'t hurt.',
long_description=read('README.rst') + '\n\n' + read('CHANGELOG.rst'),
author='Bernhard Janetzki',
author_email='[email protected]',
url='https://github.com/ierror/django-js-reverse',
download_url='http://pypi.python.org/pypi/django-js-reverse/',
packages=find_packages(),
package_data={
'django_js_reverse': [
'templates/django_js_reverse/*',
]
},
install_requires=INSTALL_REQUIRES
)