Skip to content

Commit 4760de0

Browse files
committed
Add version identifier for release
1 parent d76a807 commit 4760de0

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

envkernel.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
logging.lastResort.setLevel(logging.DEBUG)
2020

2121

22+
version_info = (1, 0, 0)
23+
__version__ = '.'.join(str(x) for x in version_info)
24+
2225
KNOWN_KERNELS = {
2326
'ipykernel': {
2427
'language': 'python',

setup.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
import setuptools
22

3+
# Get version
4+
print("in setup.py")
5+
main_ns = {}
6+
with open('envkernel.py') as ver_file:
7+
exec(ver_file.read(), main_ns)
8+
9+
print(main_ns['version_info'], main_ns['__version__'])
10+
11+
312
with open("README.md", "r") as fh:
413
long_description = fh.read()
514

615
setuptools.setup(
716
name="envkernel",
8-
version="0.0.2.dev0",
17+
version=main_ns['__version__'],
918
author="Richard Darst",
1019
author_email="[email protected]",
1120
description="Jupyter kernels manipulation and in other environments (docker, Lmod, etc.)",

0 commit comments

Comments
 (0)