4
4
# Aric Hagberg <hagberg@lanl.gov>
5
5
# Dan Schult <dschult@colgate.edu>
6
6
# Pieter Swart <swart@lanl.gov>
7
# Distributed under the terms of the GNU Lesser General Public License
8
# http://www.gnu.org/copyleft/lesser.html
15
def write_versionfile():
16
"""Creates a file containing version information."""
17
base = os.path.split(__file__)[0]
18
versionfile = os.path.join(base, 'version.py')
19
if revision is None and os.path.isfile(versionfile):
20
# Unable to get revision info, so probably not in an SVN directory
21
# If a version.py already exists, let's not overwrite it.
22
# Useful mostly for nightly tarballs.
24
fh = open(versionfile, 'w')
26
Version information for NetworkX, created during installation.
28
Do not add this file to the repository.
32
__version__ = '%(version)s'
33
__revision__ = %(revision)s
37
if revision is not None:
38
rev = "'%s'" % (revision,)
41
subs = {'version': version,
15
47
def get_svn_revision():
19
entries_path = '%s/.svn/entries' % path
20
if os.path.exists(entries_path):
49
base = os.path.split(__file__)[0]
50
entries_path = os.path.join(base, '.svn', 'entries')
51
if os.path.isfile(entries_path):
21
52
entries = open(entries_path, 'r').read()
22
53
# Versions >= 7 of the entries file are flat text. The first line is
23
54
# the version number. The next set of digits after 'dir' is the revision.
27
58
rev = rev_match.groups()[0]
68
# Declare current release as a development release.
69
# Change to False before tagging a release; then change back.
36
if revision is not None:
37
version+=".%s"%revision
75
revision = get_svn_revision()
76
if revision is not None:
77
version += "%s" % revision
39
79
description = "Python package for creating and manipulating graphs and networks"
44
84
study of the structure, dynamics, and functions of complex networks.
48
88
authors = {'Hagberg' : ('Aric Hagberg','hagberg@lanl.gov'),
49
89
'Schult' : ('Dan Schult','dschult@colgate.edu'),
50
90
'Swart' : ('Pieter Swart','swart@lanl.gov')
92
maintainer = "NetworkX Developers",
93
maintainer_email = "networkx-discuss@googlegroups.com",
52
94
url = 'http://networkx.lanl.gov/'
53
95
download_url="http://networkx.lanl.gov/download/networkx"
54
platforms = ['Linux','Mac OSX','Windows XP/2000/NT']
96
platforms = ['Linux','Mac OSX','Windows','Unix']
55
97
keywords = ['Networks', 'Graph Theory', 'Mathematics', 'network', 'graph', 'discrete mathematics', 'math']
57
99
'Development Status :: 4 - Beta',
58
100
'Intended Audience :: Developers',
59
101
'Intended Audience :: Science/Research',
60
'License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)',
102
'License :: OSI Approved :: BSD License',
61
103
'Operating System :: OS Independent',
62
104
'Programming Language :: Python',
63
105
'Topic :: Software Development :: Libraries :: Python Modules',