summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--setup.cfg3
-rw-r--r--setup.py17
2 files changed, 18 insertions, 2 deletions
diff --git a/setup.cfg b/setup.cfg
index 9536420..9f9f9c2 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,6 +1,7 @@
[egg_info]
tag_build = a1.dev
-tag_date = true ; wish this didn't use a "-" prefix
+tag_date = true
+ ; wish tag_date didn't use a "-" prefix
[upload]
sign = true
diff --git a/setup.py b/setup.py
index afcbe81..37048f2 100644
--- a/setup.py
+++ b/setup.py
@@ -10,12 +10,23 @@ os.chdir(root_dir)
#imports
#=========================================================
import re
+import sys
+py3k = (sys.version_info >= (3,0))
from setuptools import setup, find_packages
#=========================================================
+#monkeypatch & enable 2to3
+#=========================================================
+opts = {}
+if py3k:
+ from passlib.setup.cond2to3 import patch2to3
+ patch2to3()
+ opts['use_2to3'] = True
+
+#=========================================================
#version string
#=========================================================
-vh = file(os.path.join(root_dir, "passlib", "__init__.py"))
+vh = open(os.path.join(root_dir, "passlib", "__init__.py"))
VERSION = re.search(r'^__version__\s*=\s*"(.*?)"\s*$', vh.read(), re.M).group(1)
vh.close()
@@ -70,11 +81,15 @@ setup(
"Programming Language :: Python :: 2.5",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
+ "Programming Language :: Python :: 3",
"Topic :: Security :: Cryptography",
"Topic :: Software Development :: Libraries",
],
test_suite = 'nose.collector',
+
+ #extra opts
+ **opts
)
#=========================================================
#EOF