Repository: spotify/luigi
File: setup.py (Python)

Code before:

# Note: To support older versions of setuptools, we're explicitly not
#   using conditional syntax (i.e. 'enum34>1.1.0;python_version<"3.4"').
#   This syntax is a problem for setuptools as recent as `20.1.1`,
#   published Feb 16, 2016.
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')
    # readthedocs don't like python-daemon, see #1342
    install_requires.remove('python-daemon<2.2.0')
    install_requires.append('sphinx>=1.4.4')  # Value mirrored in doc/conf.py

# load meta package infos
meta = {}
with open("luigi/__meta__.py", "r") as f:
    exec(f.read(), meta)

setup(
    name='luigi',
    version=meta['__version__'],
    description=meta['__doc__'],
    long_description=long_description,
    author=meta['__author__'],
    url=meta['__contact__'],
    license=meta['__license__'],
    packages=[
        'luigi',
        'luigi.configuration',
        'luigi.contrib',
        'luigi.contrib.hdfs',
        'luigi.tools'
    ],
    package_data={
        'luigi': luigi_package_data
    },
    entry_points={
        'console_scripts': [
            'luigi = luigi.cmdline:luigi_run',
            'luigid = luigi.cmdline:luigid',
            'luigi-grep = luigi.tools.luigi_grep:main',
            'luigi-deps = luigi.tools.deps:main',
            'luigi-deps-tree = luigi.tools.deps_tree:main'
        ]
    },
    install_requires=install_requires,
    extras_require={
        'prometheus': ['prometheus-client==0.5.0'],
        'toml': ['toml<2.0.0'],

Review comment (suggestion):
One could also do sth like

```python
sys.path.insert(0, "luigi")
import __meta__ as meta
sys.path.pop(0)
```

I have no strong preference here.

Code after:
# Tornado >=5 requires updated ssl module so we only allow it for recent enough
# versions of python (3.4+ and 2.7.9+).
if sys.version_info[:2] >= (3, 4) or (sys.version_info[:2] == (2, 7) and
                                      sys.version_info[2] >= 9):
    install_requires.append('tornado>=4.0,<6')
else:
    install_requires.append('tornado>=4.0,<5')

# Note: To support older versions of setuptools, we're explicitly not
#   using conditional syntax (i.e. 'enum34>1.1.0;python_version<"3.4"').
#   This syntax is a problem for setuptools as recent as `20.1.1`,
#   published Feb 16, 2016.
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')
    # readthedocs don't like python-daemon, see #1342
    install_requires.remove('python-daemon<2.2.0')
    install_requires.append('sphinx>=1.4.4')  # Value mirrored in doc/conf.py

# load meta package infos
meta = {}
with open("luigi/__meta__.py", "r") as f:
    exec(f.read(), meta)

setup(
    name='luigi',
    version=meta['__version__'],
    description=meta['__doc__'],
    long_description=long_description,
    author=meta['__author__'],
    url=meta['__contact__'],
    license=meta['__license__'],
    packages=[
        'luigi',
        'luigi.configuration',
        'luigi.contrib',
        'luigi.contrib.hdfs',
        'luigi.tools'
    ],
    package_data={
        'luigi': luigi_package_data
    },
    entry_points={
        'console_scripts': [
            'luigi = luigi.cmdline:luigi_run',
            'luigid = luigi.cmdline:luigid',
            'luigi-grep = luigi.tools.luigi_grep:main',
            'luigi-deps = luigi.tools.deps:main',