-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change setup.py to use the new python2 compatibility directory.
- Loading branch information
Showing
1 changed file
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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', | ||
|