|
1 | 1 | import sys
|
2 | 2 |
|
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' |
5 | 5 |
|
6 | 6 | version = sys.argv[1]
|
7 | 7 |
|
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 += """\ |
9 | 24 | LICENSE AGREEMENT FOR MATPLOTLIB %(version)s
|
10 | 25 | --------------------------------------
|
11 | 26 |
|
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 |
15 | 30 | documentation.
|
16 | 31 |
|
17 | 32 | 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 |
21 | 36 | alone or in any derivative version, provided, however, that JDH's
|
22 | 37 | 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 |
24 | 39 | matplotlib %(version)s alone or in any derivative version prepared by
|
25 | 40 | Licensee.
|
26 | 41 |
|
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 |
30 | 45 | Licensee hereby agrees to include in any such work a brief summary of
|
31 | 46 | the changes made to matplotlib %(version)s.
|
32 | 47 |
|
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 |
35 | 50 | IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, JDH MAKES NO AND
|
36 | 51 | 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. |
39 | 54 |
|
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. |
45 | 60 |
|
46 | 61 | 6. This License Agreement will automatically terminate upon a material
|
47 | 62 | breach of its terms and conditions.
|
|
52 | 67 | trademarks or trade name in a trademark sense to endorse or promote
|
53 | 68 | products or services of Licensee, or any third party.
|
54 | 69 |
|
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 |
57 | 72 | Agreement.
|
58 | 73 | """ % locals()
|
59 | 74 |
|
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