Refine setup.py to work with pip
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
from distutils.core import setup
|
from distutils.core import setup
|
||||||
from distutils.command.install import install
|
from distutils.command.install import install
|
||||||
|
import sys
|
||||||
|
|
||||||
class install_with_kernelspec(install):
|
class install_with_kernelspec(install):
|
||||||
def run(self):
|
def run(self):
|
||||||
@@ -10,6 +11,11 @@ class install_with_kernelspec(install):
|
|||||||
with open('README.rst') as f:
|
with open('README.rst') as f:
|
||||||
readme = f.read()
|
readme = f.read()
|
||||||
|
|
||||||
|
svem_flag = '--single-version-externally-managed'
|
||||||
|
if svem_flag in sys.argv:
|
||||||
|
# Die, setuptools, die.
|
||||||
|
sys.argv.remove(svem_flag)
|
||||||
|
|
||||||
setup(name='bash_kernel',
|
setup(name='bash_kernel',
|
||||||
version='0.1',
|
version='0.1',
|
||||||
description='A bash kernel for IPython',
|
description='A bash kernel for IPython',
|
||||||
@@ -19,7 +25,7 @@ setup(name='bash_kernel',
|
|||||||
url='https://github.com/takluyver/bash_kernel',
|
url='https://github.com/takluyver/bash_kernel',
|
||||||
py_modules=['bash_kernel'],
|
py_modules=['bash_kernel'],
|
||||||
cmdclass={'install': install_with_kernelspec},
|
cmdclass={'install': install_with_kernelspec},
|
||||||
install_requires=['ipython>=3.0', 'pexpect>=3.3'],
|
install_requires=['pexpect>=3.3'],
|
||||||
classifiers = [
|
classifiers = [
|
||||||
'Framework :: IPython',
|
'Framework :: IPython',
|
||||||
'License :: OSI Approved :: BSD License',
|
'License :: OSI Approved :: BSD License',
|
||||||
|
|||||||
Reference in New Issue
Block a user