Jason R. Coombs  committed 36d2030

Added Python 3 build support. Had to remove the import of the poster lib for version determination, so load the version more directly

  • Participants
  • Parent commits bd5ab4c
  • Branches default

Comments (0)

Files changed (1)

+import re
 from setuptools import setup, find_packages
-import poster
+    from distutils.command.build_py import build_py_2to3 as build_py
+except ImportError:
+    from distutils.command.build_py import build_py
 # To update version number, edit:
 # poster/
 # docs/index.rst
-version = ".".join(str(x) for x in poster.version)
+with open('poster/') as f:
+    is_version = lambda line: line.startswith('version =')
+    line = next(filter(is_version, f))
+    exec(line)
+version = ".".join(str(x) for x in version)
       extras_require = {'poster': ["buildutils", "sphinx"]},
       tests_require = ["nose", "webob", "paste"],
       test_suite = 'nose.collector',
+      cmdclass=dict(build_py=build_py),