|
4 | 4 | To use: |
5 | 5 | ./releaseNewVersion.py |
6 | 6 | """ |
| 7 | +from __future__ import print_function |
| 8 | +from __future__ import unicode_literals |
| 9 | + |
7 | 10 | from __future__ import with_statement |
8 | 11 | import os |
9 | 12 | import re |
|
18 | 21 | import Version # noqa must come after modifying sys.path |
19 | 22 |
|
20 | 23 | queryStr = "Version from %s.Version = %s; is this OK? (y/[n]) " % (PkgName, Version.__version__,) |
21 | | -versOK = raw_input(queryStr) |
| 24 | +versOK = input(queryStr) |
22 | 25 | if not versOK.lower() == "y": |
23 | 26 | sys.exit(0) |
24 | 27 |
|
|
29 | 32 | if versMatch: |
30 | 33 | histVersStr = versMatch.groups()[0] |
31 | 34 | if histVersStr == Version.__version__: |
32 | | - print "Version in VersionHistory.html matches" |
| 35 | + print("Version in VersionHistory.html matches") |
33 | 36 | break |
34 | 37 | else: |
35 | | - print "Error: version in VersionHistory.html = %s != %s" % (histVersStr, Version.__version__) |
| 38 | + print("Error: version in VersionHistory.html = %s != %s" % (histVersStr, Version.__version__)) |
36 | 39 | sys.exit(0) |
37 | 40 |
|
38 | | -print "Status of git repository:" |
| 41 | +print("Status of git repository:") |
39 | 42 |
|
40 | 43 | subprocess.call(["git", "status"]) |
41 | 44 |
|
42 | | -versOK = raw_input("Is the git repository up to date? (y/[n]) ") |
| 45 | +versOK = input("Is the git repository up to date? (y/[n]) ") |
43 | 46 | if not versOK.lower() == "y": |
44 | 47 | sys.exit(0) |
45 | 48 |
|
46 | | -print "Git repository OK" |
| 49 | +print("Git repository OK") |
47 | 50 |
|
48 | 51 | if UploadToPyPI: |
49 | | - print "Uploading to PyPI" |
| 52 | + print("Uploading to PyPI") |
50 | 53 | status = subprocess.call(["python", "setup.py", "sdist", "upload"]) |
51 | 54 | if status != 0: |
52 | | - print "Build and upload failed!" |
| 55 | + print("Build and upload failed!") |
0 commit comments