File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change
1
+ __version__ = (0 , 1 , 'dev' )
2
+
3
+
1
4
from memory import *
2
5
from models import *
3
6
from columns import *
Original file line number Diff line number Diff line change 1
1
import os
2
2
from distutils .core import setup
3
3
4
+
5
+ # Figure out the version; this could be done by importing the
6
+ # module, though that requires Django to be already installed,
7
+ # which may not be the case when processing a pip requirements
8
+ # file, for example.
9
+ import re
10
+ here = os .path .dirname (os .path .abspath (__file__ ))
11
+ version_re = re .compile (
12
+ r'__version__ = (\(.*?\))' )
13
+ fp = open (os .path .join (here , 'django_tables' , '__init__.py' ))
14
+ version = None
15
+ for line in fp :
16
+ match = version_re .search (line )
17
+ if match :
18
+ version = eval (match .group (1 ))
19
+ break
20
+ else :
21
+ raise Exception ("Cannot find version in __init__.py" )
22
+ fp .close ()
23
+
24
+
4
25
def find_packages (root ):
5
26
# so we don't depend on setuptools; from the Storm ORM setup.py
6
27
packages = []
@@ -9,9 +30,10 @@ def find_packages(root):
9
30
packages .append (directory .replace (os .sep , '.' ))
10
31
return packages
11
32
33
+
12
34
setup (
13
35
name = 'django-tables' ,
14
- version = '0.1' ,
36
+ version = "." . join ( map ( str , version )) ,
15
37
description = 'Render QuerySets as tabular data in Django.' ,
16
38
author = 'Michael Elsdoerfer' ,
17
39
author_email = 'michael@elsdoerfer.info' ,
You can’t perform that action at this time.
0 commit comments