~ubuntu-branches/ubuntu/precise/python-networkx/precise

« back to all changes in this revision

Viewing changes to networkx/release.py

  • Committer: Bazaar Package Importer
  • Author(s): Sandro Tosi
  • Date: 2010-02-26 00:20:57 UTC
  • mfrom: (1.3.1 upstream) (5.1.2 experimental)
  • Revision ID: james.westby@ubuntu.com-20100226002057-c4s3jshtx2o36wtx
Tags: 1.0.1-1
* New upstream release; thanks to Yaroslav Halchenko for the report;
  Closes: #565319
* debian/control
  - take maintainership back under DPMT umbrella; thanks to Cyril Brulebois
    for his work
  - adjust Vcs-{Svn, Browser} to point to DPMT location
  - bump Standards-Version to 3.8.4
    + added debian/README.source
  - replace b-d-i on python-all-dev with python only
  - use HTTP (and not HTTPS) for Homepage field
  - rephrased short description; thanks to Rogério Brito for the report;
    Closes: #557895
* debian/pyversions
  - minimum version set to 2.5
* debian/copyright
  - updated upstream copyright authors and license information
  - update copyright notice for packaging
* debian/watch
  - updated to report numerical (with dots) releases
* debian/patches/20_fix_broken_svn_keyboards
  - removed, fixed upstream
* debian/patches/20_example_dirs_remove
  - don't created empty dirs for examples no more present

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
7
#    All rights reserved.
 
8
#    BSD license.
9
9
 
10
10
 
11
11
import os
12
12
import re
13
13
 
14
14
 
 
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.
 
23
        return
 
24
    fh = open(versionfile, 'w')
 
25
    text = '''"""
 
26
Version information for NetworkX, created during installation.
 
27
 
 
28
Do not add this file to the repository.
 
29
 
 
30
"""
 
31
 
 
32
__version__ = '%(version)s'
 
33
__revision__ = %(revision)s
 
34
__date__ = '%(date)s'
 
35
 
 
36
'''
 
37
    if revision is not None:
 
38
        rev = "'%s'" % (revision,)
 
39
    else:
 
40
        rev = revision
 
41
    subs = {'version': version,
 
42
            'revision': rev,
 
43
            'date': date}
 
44
    fh.write(text % subs)
 
45
    fh.close()
 
46
 
15
47
def get_svn_revision():
16
 
    #import networkx
17
48
    rev = None
18
 
    path ="."
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.
26
57
            if rev_match:
27
58
                rev = rev_match.groups()[0]
28
59
    if rev:
29
 
        return 'dev%s' % rev
30
 
    return None
 
60
        return rev
 
61
    else:
 
62
        return None
31
63
 
32
64
 
33
65
name = 'networkx'
34
 
version = '0.99'
 
66
version = '1.0.1'
 
67
 
 
68
# Declare current release as a development release.
 
69
# Change to False before tagging a release; then change back.
 
70
dev = False
 
71
 
35
72
revision = None
36
 
if revision is not None:
37
 
    version+=".%s"%revision
 
73
if dev:
 
74
    version += '.dev'   
 
75
    revision = get_svn_revision()
 
76
    if revision is not None:
 
77
        version += "%s" % revision
38
78
 
39
79
description = "Python package for creating and manipulating graphs and networks"
40
80
 
44
84
study of the structure, dynamics, and functions of complex networks.  
45
85
 
46
86
"""
47
 
license = 'LGPL'
 
87
license = 'BSD'
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')
51
91
           }
 
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']
56
98
classifiers = [
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',
72
114
date = time.asctime()
73
115
del time
74
116
 
 
117
if __name__ == '__main__':
 
118
    # Write versionfile for nightly snapshots.
 
119
    write_versionfile()
 
120