summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py19
1 files changed, 16 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index 4bc2901..d8164cb 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,13 @@
from distutils.core import setup
from distutils.command.install import install
+import os
import sys
+if sys.argv[-1] == 'publish':
+ os.system('python setup.py sdist upload')
+ os.system('python setup.py sdist --formats=gztar,zip upload')
+ sys.exit()
+
class install_with_kernelspec(install):
def run(self):
@@ -12,13 +18,20 @@ class install_with_kernelspec(install):
with open('README.rst') as f:
readme = f.read()
+# get the library version from the file
+with open('octave_kernel.py') as f:
+ lines = f.readlines()
+for line in lines:
+ if line.startswith('__version__'):
+ version = line.split()[-1]
+
svem_flag = '--single-version-externally-managed'
if svem_flag in sys.argv:
# Die, setuptools, die.
sys.argv.remove(svem_flag)
setup(name='octave_kernel',
- version='0.2',
+ version=version,
description='An Octave kernel for IPython',
long_description=readme,
author='Steven Silvester',
@@ -26,8 +39,8 @@ setup(name='octave_kernel',
url='https://github.com/blink1073/octave_kernel',
py_modules=['octave_kernel'],
cmdclass={'install': install_with_kernelspec},
- install_requires=['oct2py'],
- classifiers = [
+ requires=['oct2py', 'IPython (>= 3.0)'],
+ classifiers=[
'Framework :: IPython',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 2',