From 9ff86c90f6b60902ae006ba1ad5f294824ce0e72 Mon Sep 17 00:00:00 2001 From: SimLeek Date: Sat, 27 Jan 2018 18:37:21 -0700 Subject: [PATCH] Changed directory structure to support pip --- README.md | 2 +- README.txt | 1 + __init__.py | 4 ++-- cv_pubsubs/__init__.py | 0 .../cv_webcam_pub}/__init__.py | 0 .../cv_webcam_pub}/camctrl.py | 0 .../cv_webcam_pub}/frame_handler.py | 0 .../cv_webcam_pub}/get_cam_ids.py | 0 .../cv_webcam_pub}/listen_default.py | 0 .../cv_webcam_pub}/pub_cam.py | 0 cv_pubsubs/cv_window_sub/__init__.py | 1 + .../cv_window_sub/cv_window_sub.py | 4 +--- setup.py | 11 +++++++++-- 13 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 README.txt create mode 100644 cv_pubsubs/__init__.py rename {cv_webcam_pub => cv_pubsubs/cv_webcam_pub}/__init__.py (100%) rename {cv_webcam_pub => cv_pubsubs/cv_webcam_pub}/camctrl.py (100%) rename {cv_webcam_pub => cv_pubsubs/cv_webcam_pub}/frame_handler.py (100%) rename {cv_webcam_pub => cv_pubsubs/cv_webcam_pub}/get_cam_ids.py (100%) rename {cv_webcam_pub => cv_pubsubs/cv_webcam_pub}/listen_default.py (100%) rename {cv_webcam_pub => cv_pubsubs/cv_webcam_pub}/pub_cam.py (100%) create mode 100644 cv_pubsubs/cv_window_sub/__init__.py rename cv_window_sub.py => cv_pubsubs/cv_window_sub/cv_window_sub.py (93%) diff --git a/README.md b/README.md index ca64c6b..f539f9c 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -A threaded PubSub OpenCV interface. Webcam and video feeds to multiple windows is supported. \ No newline at end of file +A threaded PubSub OpenCV interfaceREADME.md. Webcam and video feeds to multiple windows is supported. \ No newline at end of file diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..f539f9c --- /dev/null +++ b/README.txt @@ -0,0 +1 @@ +A threaded PubSub OpenCV interfaceREADME.md. Webcam and video feeds to multiple windows is supported. \ No newline at end of file diff --git a/__init__.py b/__init__.py index 71dd419..3a5a3e6 100644 --- a/__init__.py +++ b/__init__.py @@ -1,2 +1,2 @@ -from .cv_webcam_pub import * -from .cv_window_sub import sub_win_loop, frame_dict +# redirection, so we can use subtree like pip +from .cv_pubsubs import cv_webcam_pub, cv_window_sub diff --git a/cv_pubsubs/__init__.py b/cv_pubsubs/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/cv_webcam_pub/__init__.py b/cv_pubsubs/cv_webcam_pub/__init__.py similarity index 100% rename from cv_webcam_pub/__init__.py rename to cv_pubsubs/cv_webcam_pub/__init__.py diff --git a/cv_webcam_pub/camctrl.py b/cv_pubsubs/cv_webcam_pub/camctrl.py similarity index 100% rename from cv_webcam_pub/camctrl.py rename to cv_pubsubs/cv_webcam_pub/camctrl.py diff --git a/cv_webcam_pub/frame_handler.py b/cv_pubsubs/cv_webcam_pub/frame_handler.py similarity index 100% rename from cv_webcam_pub/frame_handler.py rename to cv_pubsubs/cv_webcam_pub/frame_handler.py diff --git a/cv_webcam_pub/get_cam_ids.py b/cv_pubsubs/cv_webcam_pub/get_cam_ids.py similarity index 100% rename from cv_webcam_pub/get_cam_ids.py rename to cv_pubsubs/cv_webcam_pub/get_cam_ids.py diff --git a/cv_webcam_pub/listen_default.py b/cv_pubsubs/cv_webcam_pub/listen_default.py similarity index 100% rename from cv_webcam_pub/listen_default.py rename to cv_pubsubs/cv_webcam_pub/listen_default.py diff --git a/cv_webcam_pub/pub_cam.py b/cv_pubsubs/cv_webcam_pub/pub_cam.py similarity index 100% rename from cv_webcam_pub/pub_cam.py rename to cv_pubsubs/cv_webcam_pub/pub_cam.py diff --git a/cv_pubsubs/cv_window_sub/__init__.py b/cv_pubsubs/cv_window_sub/__init__.py new file mode 100644 index 0000000..0cab85a --- /dev/null +++ b/cv_pubsubs/cv_window_sub/__init__.py @@ -0,0 +1 @@ +from .cv_window_sub import sub_win_loop, frame_dict \ No newline at end of file diff --git a/cv_window_sub.py b/cv_pubsubs/cv_window_sub/cv_window_sub.py similarity index 93% rename from cv_window_sub.py rename to cv_pubsubs/cv_window_sub/cv_window_sub.py index e73054c..130656c 100644 --- a/cv_window_sub.py +++ b/cv_pubsubs/cv_window_sub/cv_window_sub.py @@ -1,10 +1,9 @@ import cv2 -from .cv_webcam_pub.camctrl import CamCtrl +from ..cv_webcam_pub.camctrl import CamCtrl if False: from typing import List -cvWindows = [] frame_dict = {} @@ -15,7 +14,6 @@ def sub_win_loop(*, callbacks=(None,), input_cams=(0,) ): - global cvWindows global frame_dict while True: diff --git a/setup.py b/setup.py index 206335b..77c1959 100644 --- a/setup.py +++ b/setup.py @@ -6,8 +6,15 @@ setup( version='0.1', description='Pubsub interface for Python OpenCV', author='Josh Miklos', - author_email='Simulator.Leek@gmail.com', + author_email='simulatorleek@gmail.com', url='https://github.com/SimLeek/cv_pubsubs', download_url='https://github.com/SimLeek/cv_pubsubs/archive/0.1.tar.gz', - keywords=['OpenCV', 'PubSub'] + keywords=['OpenCV', 'PubSub'], + license='MIT', + classifiers=[ + 'Development Status :: 3 - Alpha', + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.6', + ] ) \ No newline at end of file