From 62515d52c7ac63313519b395b56bd3039555fecd Mon Sep 17 00:00:00 2001 From: Holger Nahrstaedt Date: Mon, 21 Feb 2022 15:06:13 +0100 Subject: [PATCH] Release 0.1.28 Fix importlib --- doc/release/0.1.28-notes.rst | 18 ++++++++++++++++++ doc/source/release.0.1.28.rst | 1 + setup.py | 11 +++++++---- 3 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 doc/release/0.1.28-notes.rst create mode 100644 doc/source/release.0.1.28.rst diff --git a/doc/release/0.1.28-notes.rst b/doc/release/0.1.28-notes.rst new file mode 100644 index 0000000..52f00f5 --- /dev/null +++ b/doc/release/0.1.28-notes.rst @@ -0,0 +1,18 @@ +============================= +PyEDFlib 0.1.28 Release Notes +============================= + +.. contents:: + +- fix importlib + +Authors +======= + +* Holger Nahrstaedt + +Issues closed for v0.1.28 +------------------------- + +Pull requests for v0.1.28 +------------------------- \ No newline at end of file diff --git a/doc/source/release.0.1.28.rst b/doc/source/release.0.1.28.rst new file mode 100644 index 0000000..a9e4dc8 --- /dev/null +++ b/doc/source/release.0.1.28.rst @@ -0,0 +1 @@ +.. include:: ../release/0.1.28-notes.rst \ No newline at end of file diff --git a/setup.py b/setup.py index ba607e4..4e68407 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ MAJOR = 0 MINOR = 1 -MICRO = 27 +MICRO = 28 ISRELEASED = True VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO) @@ -128,9 +128,12 @@ def get_version_info(): GIT_REVISION = git_version() elif os.path.exists('pyedflib/version.py'): # must be a source distribution, use existing version file - # load it as a separate module to not load pywt/__init__.py - import importlib - version = importlib.import_module('pyedflib.version', 'pyedflib/version.py') + # load it as a separate module to not load pyedflib/__init__.py + import types + from importlib.machinery import SourceFileLoader + loader = SourceFileLoader('pyedflib.version', 'pyedflib/version.py') + version = types.ModuleType(loader.name) + loader.exec_module(version) GIT_REVISION = version.git_revision else: GIT_REVISION = "Unknown"