diff options
-rw-r--r-- | HISTORY.rst | 2 | ||||
-rw-r--r-- | octave_kernel.py | 2 | ||||
-rw-r--r-- | setup.py | 19 |
3 files changed, 18 insertions, 5 deletions
diff --git a/HISTORY.rst b/HISTORY.rst index 2718db4..f4950ee 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,7 +3,7 @@ Release History --------------- -0.3 (2014-08-xx) +0.3 (2014-08-03) +++++++++++++++++ - Cache help strings and calltips for fast re-trigger. diff --git a/octave_kernel.py b/octave_kernel.py index d364be4..9d817b6 100644 --- a/octave_kernel.py +++ b/octave_kernel.py @@ -9,7 +9,7 @@ from subprocess import check_output import re import logging -__version__ = '0.2' +__version__ = '0.3' version_pat = re.compile(r'version (\d+(\.\d+)+)') @@ -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', |