Skip to content

Commit

Permalink
setup.py: Support older setuptools (<34.x)
Browse files Browse the repository at this point in the history
The `python_version` conditional was added fairly recently (<2 years).
We've run into a few cases where it would be very convenient for luigi
to support older setuptools (e.g. managed environments where it may be
difficult or not possible to upgrade).
  • Loading branch information
brianmartin committed Jan 16, 2019
1 parent 42f51ac commit 6274aae
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# the License.

import os
import sys

from setuptools import setup

Expand Down Expand Up @@ -41,9 +42,13 @@ def get_static_files(path):
# https://pagure.io/python-daemon/issue/18
'python-daemon<2.2.0',
'python-dateutil==2.7.5',
'enum34>1.1.0;python_version<"3.4"',
]

# Note: To support older versions of setuptools, we're explicitly not
# using conditional syntax (i.e. 'enum34>1.1.0;python_version<"3.4"').
if sys.version_info[:2] < (3, 4):
install_requires.append('enum34>1.1.0')

if os.environ.get('READTHEDOCS', None) == 'True':
# So that we can build documentation for luigi.db_task_history and luigi.contrib.sqla
install_requires.append('sqlalchemy')
Expand Down

0 comments on commit 6274aae

Please sign in to comment.