Skip to content

Commit

Permalink
Update version str to be pep 440 complient, start beta1
Browse files Browse the repository at this point in the history
  • Loading branch information
Carreau committed Sep 12, 2018
1 parent e32d7f9 commit 3bd4bf5
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
11 changes: 11 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
Changes in IPython kernel
=========================

5.0
---

5.0.0
*****

`4.9.0 on GitHub <https://github.com/ipython/ipykernel/milestones/5.0>`__

- Add Support for IPython's Asynchronous code execution (:ghpull:`323`)
- Update release Process in ``Contributing.md`` (:ghpull:`339`)

4.9
---

Expand Down
15 changes: 13 additions & 2 deletions ipykernel/_version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
version_info = (5, 0, 0, 'dev')
__version__ = '.'.join(map(str, version_info))
version_info = (5, 0, 0, 'b1')
__version__ = '.'.join(map(str, version_info[:3]))

# pep440 is annoying, beta/alpha/rc should _not_ have dots or pip/setuptools
# confuses which one between the wheel and sdist is the most recent.
if len(version_info) == 4:
extra = version_info[3]
if extra.startswith(('a','b','rc')):
__version__ = __version__+extra
else:
__version__ = __version__+'.'+extra
if len(version_info) > 4:
raise NotImplementedError

kernel_protocol_version_info = (5, 1)
kernel_protocol_version = '%s.%s' % kernel_protocol_version_info
9 changes: 8 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#-----------------------------------------------------------------------------

import sys
import re

v = sys.version_info
if v[:2] < (3, 4):
Expand Down Expand Up @@ -60,10 +61,16 @@ def run(self):
with open(pjoin(here, name, '_version.py')) as f:
exec(f.read(), {}, version_ns)

current_version = version_ns['__version__']

loose_pep440re = re.compile(r'^(\d+)\.(\d+)\.(\d+((a|b|rc)\d+)?)(\.post\d+)?(\.dev\d*)?$')
if not loose_pep440re.match(current_version):
raise ValueError("Version number '%s' is not valid (should match [N!]N(.N)*[{a|b|rc}N][.postN][.devN])" % current_version)


setup_args = dict(
name=name,
version=version_ns['__version__'],
version=current_version,
cmdclass={
'bdist_egg': bdist_egg if 'bdist_egg' in sys.argv else bdist_egg_disabled,
},
Expand Down

0 comments on commit 3bd4bf5

Please sign in to comment.