From 2341d149e22f97c1fc7ef82062af73885ceb1be1 Mon Sep 17 00:00:00 2001 From: Jelte Fennema Date: Sun, 11 May 2014 23:37:02 +1000 Subject: [PATCH] Change setup.py to use the new python2 compatibility directory. --- setup.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/setup.py b/setup.py index 33926fd2..310f93e3 100644 --- a/setup.py +++ b/setup.py @@ -149,13 +149,30 @@ `_. """ + from distutils.core import setup +import sys + + +if sys.version_info[:2] <= (2, 6): + raise RuntimeError( + "You're using Python <= 2.6, but this package requires either Python " + "2.7, or 3.3 or above, so you can't use it unless you upgrade your " + "Python version." + ) + +if sys.version_info[0] == 3: + source_dir = '.' +else: + source_dir = 'python2_source' + setup(name='PyLaTeX', version='0.4.2', author='Jelte Fennema', author_email='pylatex@jeltef.nl', description='A Python library for creating LaTeX files', long_description=__doc__, + package_dir={'': source_dir}, packages=['pylatex'], url='https://github.com/JelteF/PyLaTeX', license='MIT',