Mercurial > p > roundup > code
annotate roundup/version_check.py @ 7958:fffbaa3f963b
test: revert last commit it broke xapian build
Last commit caused the following error:
/usr/bin/install -c -m 644 xapian/__init__.py
xapian/__pycache__/__init__.cpython-310.pyc
./xapian/__pycache__/__init__. '/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/xapian'
/usr/bin/install: cannot stat './xapian/__pycache__/__init__.': No
such file or directory
with the old code that errored out because of the missing sys import I
got the working:
/usr/bin/install -c -m 644 xapian/__init__.py
xapian/__pycache__/__init__.cpython-310.pyc
xapian/__pycache__/__init__.cpython-310.opt-1.pyc
'/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/xapian'
whatever.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sun, 12 May 2024 21:00:38 -0400 |
| parents | 9223ed67af05 |
| children | f72381d300a4 |
| rev | line source |
|---|---|
|
449
141aacfdb34f
Centralised the python version check code, bumped version to 2.1.1
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
1 #!/usr/bin/env python |
|
2005
fc52d57c6c3e
documentation cleanup
Richard Jones <richard@users.sourceforge.net>
parents:
1090
diff
changeset
|
2 |
|
5321
4566360871dc
Raises python requirement to 2.7.
Bernhard Reiter <bernhard@intevation.de>
parents:
4682
diff
changeset
|
3 # Roundup requires Python 2.7+ as mentioned in doc\installation.txt |
|
5376
64b05e24dbd8
Python 3 preparation: convert print to a function.
Joseph Myers <jsm@polyomino.org.uk>
parents:
5321
diff
changeset
|
4 from __future__ import print_function |
|
6016
9223ed67af05
flake8 cleanup: move module import before statement.
John Rouillard <rouilj@ieee.org>
parents:
5376
diff
changeset
|
5 import sys |
|
449
141aacfdb34f
Centralised the python version check code, bumped version to 2.1.1
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
6 |
|
6016
9223ed67af05
flake8 cleanup: move module import before statement.
John Rouillard <rouilj@ieee.org>
parents:
5376
diff
changeset
|
7 VERSION_NEEDED = (2, 7) |
|
9223ed67af05
flake8 cleanup: move module import before statement.
John Rouillard <rouilj@ieee.org>
parents:
5376
diff
changeset
|
8 |
|
4682
0c2cad65ebba
version_check.py: Bump required Python version from 2.1.1+ to 2.5+
anatoly techtonik <techtonik@gmail.com>
parents:
4570
diff
changeset
|
9 if sys.version_info < VERSION_NEEDED: |
|
5376
64b05e24dbd8
Python 3 preparation: convert print to a function.
Joseph Myers <jsm@polyomino.org.uk>
parents:
5321
diff
changeset
|
10 print("Content-Type: text/plain\n") |
|
64b05e24dbd8
Python 3 preparation: convert print to a function.
Joseph Myers <jsm@polyomino.org.uk>
parents:
5321
diff
changeset
|
11 print("Roundup requires Python %s.%s or newer." % VERSION_NEEDED) |
|
449
141aacfdb34f
Centralised the python version check code, bumped version to 2.1.1
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
12 sys.exit(0) |
