Skip to content

Commit

Permalink
Travis changes for using proper ipykernel for Python2
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug Blank committed Apr 22, 2017
1 parent ebbeb9a commit cf28a1f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions setup.py
Expand Up @@ -3,13 +3,20 @@

from setuptools import find_packages, setup

PY2 = (sys.version_info[0] == 2)

with io.open('metakernel/__init__.py', encoding='utf-8') as fid:
for line in fid:
if line.startswith('__version__'):
version = line.strip().split()[-1][1:-1]
break

if PY2:
ipykernel_requires = "ipykernel (< 6.0)"
ipykernel_install_requires = "ipykernel<6.0"
else:
ipykernel_requires = "ipykernel"
ipykernel_install_requires = "ipykernel"

setup(name='metakernel',
version=version,
Expand All @@ -18,8 +25,8 @@
author='Steven Silvester',
author_email='steven.silvester@ieee.org',
url='https://github.com/Calysto/metakernel',
requires=['ipykernel', 'pexpect (>= 4.2)'],
install_requires=['ipykernel', 'pexpect>=4.2'],
requires=[ipykernel_requires, 'pexpect (>= 4.2)'],
install_requires=[ipykernel_install_requires, 'pexpect>=4.2'],
packages=find_packages(include=['metakernel', 'metakernel.*']),
package_data={'metakernel': ['images/*.png']},
classifiers=[
Expand Down

0 comments on commit cf28a1f

Please sign in to comment.