forked from tberkane/django-iprestrict
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
64 lines (61 loc) · 2.01 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
60
61
62
63
64
import os
import re
from setuptools import setup
def get_package_version(package):
version = re.compile(r"(?:__)?version(?:__)?\s*=\s\"(.*)\"", re.I)
initfile = os.path.join(os.path.dirname(__file__), package, "__init__.py")
for line in open(initfile):
m = version.match(line)
if m:
return m.group(1)
return "UNKNOWN"
setup(
name='django-iprestrict',
version=get_package_version("iprestrict"),
description='Django app + middleware to restrict access to all or sections of a Django project by client IP ranges',
long_description='Django app + middleware to restrict access to all or sections of a Django project by client IP ranges',
author='Tamas Szabo, CCG, Murdoch University',
author_email='[email protected]',
url='https://github.com/muccg/django-iprestrict',
download_url='https://github.com/muccg/django-iprestrict/releases',
classifiers=[
"Framework :: Django",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Software Development"
],
packages=[
'iprestrict',
'iprestrict.management',
'iprestrict.management.commands',
'iprestrict.migrations',
],
package_data={
'iprestrict': [os.path.join(root, f) for d in ('templates', 'static')
for root, _, files in os.walk('iprestrict/{}'.format(d))
for f in files]
},
include_package_data=True,
zip_safe=False,
install_requires=[
'Django>=1.8',
],
extras_require={
'geoip': [
'pycountry==17.5.14',
'geoip2==2.5.0',
'GeoIP==1.3.2',
],
'dev': [
'tox',
'pep8',
'flake8',
'mock',
'Sphinx',
'django-extensions',
'Werkzeug',
],
},
test_suite='tests.runtests.main',
)