Skip to content

Commit 608bada

Browse files
author
Paul Barret
committed
Modification to create the htdocs/license.html.template file depending on the filename argument.
svn path=/trunk/matplotlib/; revision=262
1 parent f9b0bbd commit 608bada

File tree

1 file changed

+51
-25
lines changed

1 file changed

+51
-25
lines changed

license.py

+51-25
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,62 @@
11
import sys
22

3-
if len(sys.argv)!=2:
4-
print >>sys.stderr, 'Usage: license.py version_num'
3+
if len(sys.argv) != 3:
4+
print >>sys.stderr, 'Usage: license.py version_num filename'
55

66
version = sys.argv[1]
77

8-
s = """\
8+
if sys.argv[2] == 'htdocs/license.html.template':
9+
s = """\
10+
@header@
11+
12+
<h2>License</h2>
13+
14+
The matplotlib license is a shameless ripoff of the python license.<p>
15+
16+
<pre>
17+
18+
"""
19+
else:
20+
s = ""
21+
22+
23+
s += """\
924
LICENSE AGREEMENT FOR MATPLOTLIB %(version)s
1025
--------------------------------------
1126
12-
1. This LICENSE AGREEMENT is between the John D. Hunter ("JDH"), and
13-
the Individual or Organization ("Licensee") accessing and otherwise
14-
using matplotlib software in source or binary form and its associated
27+
1. This LICENSE AGREEMENT is between the John D. Hunter ("JDH"), and the
28+
Individual or Organization ("Licensee") accessing and otherwise using
29+
matplotlib software in source or binary form and its associated
1530
documentation.
1631
1732
2. Subject to the terms and conditions of this License Agreement, JDH
18-
hereby grants Licensee a nonexclusive, royalty-free, world-wide
19-
license to reproduce, analyze, test, perform and/or display publicly,
20-
prepare derivative works, distribute, and otherwise use matplotlib %(version)s
33+
hereby grants Licensee a nonexclusive, royalty-free, world-wide license
34+
to reproduce, analyze, test, perform and/or display publicly, prepare
35+
derivative works, distribute, and otherwise use matplotlib %(version)s
2136
alone or in any derivative version, provided, however, that JDH's
2237
License Agreement and JDH's notice of copyright, i.e., "Copyright (c)
23-
2002, 2003 John D. Hunter; All Rights Reserved" are retained in
38+
2002-2004 John D. Hunter; All Rights Reserved" are retained in
2439
matplotlib %(version)s alone or in any derivative version prepared by
2540
Licensee.
2641
27-
3. In the event Licensee prepares a derivative work that is based on
28-
or incorporates matplotlib %(version)s or any part thereof, and wants to make
29-
the derivative work available to others as provided herein, then
42+
3. In the event Licensee prepares a derivative work that is based on or
43+
incorporates matplotlib %(version)s or any part thereof, and wants to
44+
make the derivative work available to others as provided herein, then
3045
Licensee hereby agrees to include in any such work a brief summary of
3146
the changes made to matplotlib %(version)s.
3247
33-
4. JDH is making matplotlib %(version)s available to Licensee on an "AS IS"
34-
basis. JDH MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
48+
4. JDH is making matplotlib %(version)s available to Licensee on an "AS
49+
IS" basis. JDH MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
3550
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, JDH MAKES NO AND
3651
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
37-
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF MATPLOTLIB %(version)s WILL NOT
38-
INFRINGE ANY THIRD PARTY RIGHTS.
52+
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF MATPLOTLIB %(version)s
53+
WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
3954
40-
5. JDH SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF
41-
MATPLOTLIB %(version)s FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES
42-
OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING
43-
MATPLOTLIB %(version)s, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE
44-
POSSIBILITY THEREOF.
55+
5. JDH SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF MATPLOTLIB
56+
%(version)s FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR
57+
LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING
58+
MATPLOTLIB %(version)s, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF
59+
THE POSSIBILITY THEREOF.
4560
4661
6. This License Agreement will automatically terminate upon a material
4762
breach of its terms and conditions.
@@ -52,9 +67,20 @@
5267
trademarks or trade name in a trademark sense to endorse or promote
5368
products or services of Licensee, or any third party.
5469
55-
8. By copying, installing or otherwise using matplotlib %(version)s, Licensee
56-
agrees to be bound by the terms and conditions of this License
70+
8. By copying, installing or otherwise using matplotlib %(version)s,
71+
Licensee agrees to be bound by the terms and conditions of this License
5772
Agreement.
5873
""" % locals()
5974

60-
file('license/LICENSE', 'w').write(s)
75+
if sys.argv[2] == 'htdocs/license.html.template':
76+
s += """\
77+
78+
</pre>
79+
80+
@footer@
81+
"""
82+
else:
83+
pass
84+
85+
file(sys.argv[2], 'w').write(s)
86+

0 commit comments

Comments
 (0)