Skip to content

Commit

Permalink
Change setup.py to use the new python2 compatibility directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
JelteF committed May 11, 2014
1 parent 7b47ddb commit 2341d14
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,30 @@
<https://github.com/JelteF/PyLaTeX/blob/master/LICENSE>`_.
"""

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='[email protected]',
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',
Expand Down

0 comments on commit 2341d14

Please sign in to comment.