summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Smallshire <robert@smallshire.org.uk>2016-06-14 08:54:18 +0200
committerRobert Smallshire <robert@smallshire.org.uk>2016-06-14 08:54:18 +0200
commit05f6e0e24b4f3c1e26700fbaf84c75637b0bc240 (patch)
tree46ebc0607cfe1591c6deb0079cb1f976603ef8db
parentf1dec6ad4ec0d3114c486b83ada2c4e18467f543 (diff)
downloadpyserial-git-05f6e0e24b4f3c1e26700fbaf84c75637b0bc240.tar.gz
Make serial into a namespace package.
-rw-r--r--serial/__init__.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/serial/__init__.py b/serial/__init__.py
index c3cc154..3874193 100644
--- a/serial/__init__.py
+++ b/serial/__init__.py
@@ -9,6 +9,8 @@
import importlib
import sys
+from pkgutil import extend_path
+
from serial.serialutil import *
#~ SerialBase, SerialException, to_bytes, iterbytes
@@ -17,6 +19,9 @@ __version__ = '3.1.1'
VERSION = __version__
+# serial is a namespace package
+__path__ = extend_path(__path__, __name__)
+
# pylint: disable=wrong-import-position
if sys.platform == 'cli':
from serial.serialcli import Serial