Skip to content

Commit

Permalink
Bump to version 0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jasujm committed Dec 6, 2019
1 parent f0a6b06 commit ab52544
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
3 changes: 3 additions & 0 deletions python/enumecg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
Enhanced Enum library.
"""

__version__ = "0.1"
__author__ = "Jaakko Moisio"

from . import definitions
from . import generators

Expand Down
17 changes: 15 additions & 2 deletions python/setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import os
import re
import setuptools
import sys

dunder_re = re.compile(r'^__(?P<name>[a-z]+)__ += +"(?P<value>[^"]+)"')
package_dir = os.path.abspath(os.path.dirname(__file__))


Expand All @@ -9,10 +12,20 @@ def get_description():
return f.read()


def get_package_dunder(name):
with open(os.path.join(package_dir, "enumecg", "__init__.py")) as f:
for row in f:
m = dunder_re.match(row)
if m and m.group("name") == name:
return m.group("value")
print(f"__{name}__ unexpectedly not found in module", file=sys.stderr)
sys.exit(1)


setup_kwargs = dict(
name="EnumECG",
version="0.1.dev2",
author="Jaakko Moisio",
version=get_package_dunder("version"),
author=get_package_dunder("author"),
author_email="jaakko@moisio.fi",
description="Generate Enhanced Enum definitions for C++",
long_description=get_description(),
Expand Down

0 comments on commit ab52544

Please sign in to comment.