Skip to content
Browse files

2007-07-20 Michal Ludvig <michal@logix.cz>

	* setup.py: Check correct Python version and ElementTree availability.




git-svn-id: https://s3tools.svn.sourceforge.net/svnroot/s3tools/s3cmd/trunk@131 830e0280-6d2a-0410-9c65-932aecc39d9d
  • Loading branch information...
1 parent 9606aa2 commit 104651679455e842fd99513556dddf4ac3f48c13 @mludvig mludvig committed Jul 20, 2007
Showing with 17 additions and 0 deletions.
  1. +4 −0 ChangeLog
  2. +13 −0 setup.py
View
4 ChangeLog
@@ -1,3 +1,7 @@
+2007-07-20 Michal Ludvig <michal@logix.cz>
+
+ * setup.py: Check correct Python version and ElementTree availability.
+
2007-07-05 Michal Ludvig <michal@logix.cz>
* s3cmd: --configure support for Proxy
View
13 setup.py
@@ -4,6 +4,19 @@
import S3.PkgInfo
+if float("%d.%d" % sys.version_info[:2]) < 2.4:
+ sys.stderr.write("Your Python version %d.%d.%d is not supported.\n" % sys.version_info[:3])
+ sys.stderr.write("S3cmd required Python 2.4 or newer.\n")
+ sys.exit(1)
+
+try:
+ import elementtree.ElementTree as ET
+except ImportError, e:
+ sys.stderr.write(e.message + "\n")
+ sys.stderr.write("Please upgrade to Python 2.5 or install ElementTree module\n")
+ sys.stderr.write("from http://effbot.org/zone/element-index.htm\n")
+ sys.exit(1)
+
try:
## Remove 'MANIFEST' file to force
## distutils to recreate it.

0 comments on commit 1046516

Please sign in to comment.
Something went wrong with that request. Please try again.