forked from j4mie/django-activelink
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
38 lines (33 loc) · 1.12 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
import os
import re
from setuptools import setup, find_packages
description = ('A Django template library for checking whether the current '
'page matches a given URL. Useful for highlighting active '
'links in menus.')
rel_file = lambda *args: os.path.join(os.path.dirname(os.path.abspath(__file__)), *args)
def read_from(filename):
fp = open(filename)
try:
return fp.read()
finally:
fp.close()
def get_version():
data = read_from(rel_file('activelink', '__init__.py'))
return re.search(r"__version__ = '([^']+)'", data).group(1)
setup(
name='django-activelink',
version=get_version(),
description=description,
author='Jamie Matthews',
author_email='[email protected]',
url='http://github.com/j4mie/django-activelink/',
packages=find_packages(exclude=['tests', 'tests.*']),
classifiers = [
'Programming Language :: Python',
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: Public Domain',
'Framework :: Django',
'Operating System :: OS Independent',
]
)