From 4920650477b091aabbf14e7a1db44bda6eb28171 Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Sun, 3 Mar 2019 17:11:32 +0100 Subject: [PATCH 01/32] Regression testing Python3.7, refs #35 --- dockerfiles/Dockerfile-linux | 7 +++++-- tox.ini | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dockerfiles/Dockerfile-linux b/dockerfiles/Dockerfile-linux index e47af54..237f39c 100644 --- a/dockerfiles/Dockerfile-linux +++ b/dockerfiles/Dockerfile-linux @@ -35,12 +35,15 @@ RUN apt install --yes --no-install-recommends \ libsdl2-mixer-dev \ libsdl2-ttf-dev \ libpython3.6-dev \ + libpython3.7-dev \ libzbar-dev \ lsb-release \ make \ pkg-config \ - python3 \ - python3-dev \ + python3.6 \ + python3.6-dev \ + python3.7 \ + python3.7-dev \ sudo \ tox \ virtualenv diff --git a/tox.ini b/tox.ini index 1682167..26db87c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = pep8,isort-check,py36 +envlist = pep8,isort-check,py36,py37 # no setup.py to be ran skipsdist = True # trick to enable pre-installation of Cython From 8a443a97211295176d05a1ecfba2784dc4f5432b Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Sun, 3 Mar 2019 17:22:53 +0100 Subject: [PATCH 02/32] Updates .gitignore, adds opencv-* --- .dockerignore | 2 +- .gitignore | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index cfd2643..253b2ea 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,4 +4,4 @@ venv/ .buildozer/ .pytest_cache/ .tox/ -opencv* +opencv-* diff --git a/.gitignore b/.gitignore index c1fec48..89bfb75 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ venv/ .tox/ .buildozer/ bin/ +opencv-* From 0c52f83eb4f1690a6679dbeaf9cc58f57f31f832 Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Sun, 3 Mar 2019 18:10:49 +0100 Subject: [PATCH 03/32] Bumps to `Cython==0.28.6`, credits @darosior, refs #35 --- Makefile | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5360553..8e6a600 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ all: system_dependencies virtualenv opencv venv: test -d venv || virtualenv -p python$(PYTHON_MAJOR_VERSION) venv . venv/bin/activate - $(PIP) install Cython==0.26.1 + $(PIP) install Cython==0.28.6 $(PIP) install -r requirements/requirements.txt $(GARDEN) install xcamera diff --git a/tox.ini b/tox.ini index 26db87c..99b79f1 100644 --- a/tox.ini +++ b/tox.ini @@ -11,7 +11,7 @@ indexserver = setenv = KIVY_UNITTEST = 1 passenv = DISPLAY deps = - :preinstall: Cython==0.26.1 + :preinstall: Cython==0.28.6 -r{toxinidir}/requirements/requirements.txt -r{toxinidir}/requirements/test_requirements.txt commands = pytest --ignore tests/ui/ tests/ From 85fe49f82467618225616dcf21438669bafc225d Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Sun, 3 Mar 2019 18:55:14 +0100 Subject: [PATCH 04/32] Updates CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ba0054..38bb25f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## [Unreleased] + + - Updates Cython for Python3.7 support, refs #35 + ## [20190303] - Add Python3.6 support, refs #5 From f8eab3d4861ac12f5efb54d5fb9306cf3ff12471 Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Sun, 3 Mar 2019 20:16:30 +0100 Subject: [PATCH 05/32] Updates Troubleshooting sections --- OpenCV.md | 14 ++++++++++++++ README.md | 3 +++ 2 files changed, 17 insertions(+) diff --git a/OpenCV.md b/OpenCV.md index d89beb7..d5795da 100644 --- a/OpenCV.md +++ b/OpenCV.md @@ -10,3 +10,17 @@ make system_dependencies make opencv ``` It would build OpenCV and deploy it to your virtualenv. + +## Troubleshooting + +### Makefile `cp: cannot stat 'opencv-4.0.1/build/lib/python3/cv2*.so': No such file or directory` +Log: +``` +make[2]: Leaving directory '/tmp/trash/zbarcam/opencv-4.0.1/build' +make[1]: Leaving directory '/tmp/trash/zbarcam/opencv-4.0.1/build' +cp opencv-4.0.1/build/lib/python3/cv2*.so venv/lib/python3.7/site-packages +cp: cannot stat 'opencv-4.0.1/build/lib/python3/cv2*.so': No such file or directory +Makefile:97: recipe for target 'venv/lib/python3.7/site-packages/cv2*.so' failed +make: *** [venv/lib/python3.7/site-packages/cv2*.so] Error 1 +``` +Most likely you need to `pip install numpy` delete your opencv build and build again. diff --git a/README.md b/README.md index 6f06049..6e3e274 100644 --- a/README.md +++ b/README.md @@ -76,5 +76,8 @@ More likely an import issue in your `.kv` file. Try to `from zbarcam import ZBarCam` in your `main.py` to see the exact error. It's common to forget `Pillow` in `buildozer.spec` `requirements` section. +### OpenCV related +See [OpenCV.md](OpenCV.md). + ## Credits I borrowed a lot of code from [tito/android-zbar-qrcode](https://github.com/tito/android-zbar-qrcode). From e62744101b57ce5a2321c29e6f029d8857dfa529 Mon Sep 17 00:00:00 2001 From: darosior Date: Sun, 3 Mar 2019 20:46:09 +0100 Subject: [PATCH 06/32] Make garden.zbarcam a package again --- __init__.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 __init__.py diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..f27149e --- /dev/null +++ b/__init__.py @@ -0,0 +1 @@ +from .zbarcam import ZBarCam From ef14a188cacc7abfbc694688e55355af4fbdb464 Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Sun, 3 Mar 2019 20:55:37 +0100 Subject: [PATCH 07/32] Update __init__.py adds docstring - add docstring to explain why this file is required - add `#noqa` to skip linting --- __init__.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index f27149e..4e738ff 100644 --- a/__init__.py +++ b/__init__.py @@ -1 +1,10 @@ -from .zbarcam import ZBarCam +""" +This is required when the package is installed via garden, +because garden copies the entire repository to e.g. `~/.kivy/garden/`. +Therefore we turn `~/.kivy/garden/garden.zbarcam/` to a package, +so it can imported via: +```python +from kivy.garden.zbarcam import ZBarCam +``` +""" +from .zbarcam import ZBarCam # noqa From fa22533e248f2838e1d42e338c8d73b5c5b4876b Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Sun, 3 Mar 2019 23:57:29 +0100 Subject: [PATCH 08/32] Adds zbarcam/ to `PYTHONPATH` on tox Fixes import error when running tests, error was: ``` tests/test_zbarcam.py:8: in from zbarcam import ZBarCam E ModuleNotFoundError: No module named 'zbarcam' ``` --- tox.ini | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 99b79f1..605892e 100644 --- a/tox.ini +++ b/tox.ini @@ -8,7 +8,9 @@ indexserver = preinstall = https://pypi.python.org/simple [testenv] -setenv = KIVY_UNITTEST = 1 +setenv = + KIVY_UNITTEST = 1 + PYTHONPATH = {toxinidir}/zbarcam/ passenv = DISPLAY deps = :preinstall: Cython==0.28.6 From 662981dee81b6cb729640fb24b2b8f72046a061e Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Mon, 4 Mar 2019 08:56:26 +0100 Subject: [PATCH 09/32] Updates install docs, refs #36 --- CHANGELOG.md | 3 ++- README.md | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 38bb25f..3de7113 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,8 @@ ## [Unreleased] - - Updates Cython for Python3.7 support, refs #35 + - Update Cython for Python3.7 support, refs #35 + - Make garden.zbarcam a package again, refs #36 ## [20190303] diff --git a/README.md b/README.md index 6e3e274..fa2abb9 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ It's built on top of [Kivy](https://github.com/kivy/kivy) and [pyzbar](https://g ## How to use Simply import and instanciate `ZBarCam` in your kvlang file and access its `symbols` property. ```yaml -#:import ZBarCam kivy.garden.zbarcam +#:import ZBarCam kivy.garden.zbarcam.ZBarCam #:import ZBarSymbol pyzbar.pyzbar.ZBarSymbol BoxLayout: orientation: 'vertical' @@ -34,7 +34,7 @@ sudo apt install libzbar-dev Install garden requirements: ```sh -garden install xcamera +garden install --upgrade xcamera ``` Install zbarcam: @@ -42,10 +42,20 @@ Via `garden`: ```sh garden install --upgrade zbarcam ``` +When installed with this method, the import command would be: +```python +from kivy.garden.zbarcam import ZBarCam +``` + Via `pip`: ```sh pip install --upgrade https://github.com/kivy-garden/garden.zbarcam/archive/develop.zip ``` +When installed with this method, the import command would be: +```python +from zbarcam import ZBarCam +``` + You may also need to compile/install OpenCV manually, see [OpenCV.md](OpenCV.md). From 82b6ba5ad596b14f4d8cae5bfae2d41c9ef5b6f1 Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Mon, 4 Mar 2019 23:11:34 +0100 Subject: [PATCH 10/32] Downloads and compiles opencv to temporary directory, fixes #37 --- Makefile | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 8e6a600..5470d27 100644 --- a/Makefile +++ b/Makefile @@ -21,13 +21,19 @@ PYTHON_WITH_VERSION=python$(PYTHON_VERSION) # python3 has a "m" suffix for both include path and library PYTHON_M=$(PYTHON_WITH_VERSION) SITE_PACKAGES_DIR=$(VENV_NAME)/lib/$(PYTHON_WITH_VERSION)/site-packages +TMPDIR ?= /tmp +DOWNLOAD_DIR = $(TMPDIR)/downloads OPENCV_VERSION=4.0.1 -OPENCV_ARCHIVE=$(OPENCV_BASENAME).tar.gz OPENCV_BASENAME=opencv-$(OPENCV_VERSION) -OPENCV_BUILD_LIB_DIR=$(OPENCV_BASENAME)/build/lib +OPENCV_ARCHIVE=$(OPENCV_BASENAME).tar.gz +OPENCV_ARCHIVE_PATH=$(DOWNLOAD_DIR)/$(OPENCV_ARCHIVE) +OPENCV_EXTRACT_PATH=$(DOWNLOAD_DIR)/$(OPENCV_BASENAME) +OPENCV_BUILD_LIB_DIR=$(OPENCV_EXTRACT_PATH)/build/lib OPENCV_BUILD=$(OPENCV_BUILD_LIB_DIR)/python$(PYTHON_MAJOR_VERSION)/cv2*.so OPENCV_DEPLOY=$(SITE_PACKAGES_DIR)/cv2*.so NPROC=`grep -c '^processor' /proc/cpuinfo` + + ifeq ($(PYTHON_MAJOR_VERSION), 3) PYTHON_M := $(PYTHON_M)m endif @@ -49,14 +55,15 @@ ifeq ($(OS), Ubuntu) sudo apt install --yes --no-install-recommends $(SYSTEM_DEPENDENCIES) endif -$(OPENCV_ARCHIVE): +$(OPENCV_ARCHIVE_PATH): + mkdir -p $(DOWNLOAD_DIR) curl --location https://github.com/opencv/opencv/archive/$(OPENCV_VERSION).tar.gz \ - --progress-bar --output $(OPENCV_ARCHIVE) + --progress-bar --output $(OPENCV_ARCHIVE_PATH) # The build also relies on virtualenv, because we make references to it. # Plus numpy is required to build OpenCV Python module. -$(OPENCV_BUILD): $(OPENCV_ARCHIVE) virtualenv - tar -xf $(OPENCV_BASENAME).tar.gz +$(OPENCV_BUILD): $(OPENCV_ARCHIVE_PATH) virtualenv + tar -xf $(OPENCV_ARCHIVE_PATH) --directory $(DOWNLOAD_DIR) cmake \ -D CMAKE_SHARED_LINKER_FLAGS=-l$(PYTHON_M) \ -D BUILD_SHARED_LIBS=ON \ @@ -90,8 +97,8 @@ $(OPENCV_BUILD): $(OPENCV_ARCHIVE) virtualenv -D WITH_JASPER=OFF \ -D WITH_OPENEXR=OFF \ -D WITH_PVAPI=OFF \ - -B$(OPENCV_BASENAME)/build -H$(OPENCV_BASENAME) - cmake --build $(OPENCV_BASENAME)/build -- -j$(NPROC) + -B$(OPENCV_EXTRACT_PATH)/build -H$(OPENCV_EXTRACT_PATH) + cmake --build $(OPENCV_EXTRACT_PATH)/build -- -j$(NPROC) $(OPENCV_DEPLOY): $(OPENCV_BUILD) virtualenv cp $(OPENCV_BUILD) $(SITE_PACKAGES_DIR) @@ -99,7 +106,7 @@ $(OPENCV_DEPLOY): $(OPENCV_BUILD) virtualenv opencv: $(OPENCV_DEPLOY) clean: - rm -rf $(VENV_NAME) .tox/ $(OPENCV_BASENAME) + rm -rf $(VENV_NAME) .tox/ $(DOWNLOAD_DIR) test: $(TOX) From 45699585a88ba08270f196b85875a73266d454ca Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Mon, 4 Mar 2019 23:12:22 +0100 Subject: [PATCH 11/32] Updates source.exclude_dirs list, refs #37 --- CHANGELOG.md | 1 + buildozer.spec | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3de7113..b21b6f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Update Cython for Python3.7 support, refs #35 - Make garden.zbarcam a package again, refs #36 + - Don't ship opencv directory to APK, refs #37 ## [20190303] diff --git a/buildozer.spec b/buildozer.spec index 62cb0b5..65c6d08 100644 --- a/buildozer.spec +++ b/buildozer.spec @@ -22,7 +22,11 @@ source.include_exts = py,png,jpg,kv,atlas #source.exclude_exts = spec # (list) List of directory to exclude (let empty to not exclude anything) -source.exclude_dirs = tests, bin, venv, opencv-* +source.exclude_dirs = + bin, + dockerfiles, + tests, + venv # (list) List of exclusions using pattern matching #source.exclude_patterns = license,images/*/*.jpg From 006daaef4202b105209bfc278f55715925a05543 Mon Sep 17 00:00:00 2001 From: SiriusStarr <2049163+SiriusStarr@users.noreply.github.com> Date: Wed, 8 May 2019 13:44:31 -0700 Subject: [PATCH 12/32] Fix decode error from possible image mode mismatch (#42) * Fix decode error from possible image mode mismatch Changed call to PIL.Image.frombytes to always use mode='RGBA' rather than determining mode from texture.colorfmt. texture.pixels always returns data as RGBA, so no other mode is ever appropriate to use. * Fix erroneous failure in test Test suite expected no codes found when in fact two should have been. Updated test to expect the correct two codes to be returned. --- tests/test_zbarcam.py | 8 ++++++-- zbarcam/zbarcam.py | 13 ++++++------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/tests/test_zbarcam.py b/tests/test_zbarcam.py index 62ff679..5573952 100644 --- a/tests/test_zbarcam.py +++ b/tests/test_zbarcam.py @@ -49,8 +49,12 @@ def test_detect_qrcode_frame_one_qrcode_one_ean(self): texture = Image(fixture_path).texture code_types = self.zbarcam.code_types symbols = self.zbarcam._detect_qrcode_frame(texture, code_types) - # currently detects no codes, but that's a bug - self.assertEqual(symbols, []) + self.assertEqual( + symbols, [ + ZBarCam.Symbol(type='QRCODE', data=b'zbarlight test qr code'), + ZBarCam.Symbol(type='UPCA', data=b'012345678905') + ] + ) def test_detect_qrcode_frame_two_qrcodes(self): """ diff --git a/zbarcam/zbarcam.py b/zbarcam/zbarcam.py index cc89198..07d270f 100644 --- a/zbarcam/zbarcam.py +++ b/zbarcam/zbarcam.py @@ -91,13 +91,12 @@ def _on_texture(self, instance): def _detect_qrcode_frame(cls, texture, code_types): image_data = texture.pixels size = texture.size - fmt = texture.colorfmt.upper() - # PIL doesn't support BGRA but IOS uses BGRA for the camera - # if BGRA is detected it will switch to RGBA, color will be off - # but we don't care as it's just looking for barcodes - if cls.is_ios() and fmt == 'BGRA': - fmt = 'RGBA' - pil_image = PIL.Image.frombytes(mode=fmt, size=size, data=image_data) + # Fix for mode mismatch between texture.colorfmt and data returned by + # texture.pixels. texture.pixels always returns RGBA, so that should + # be passed to PIL no matter what texture.colorfmt returns. refs: + # https://github.com/AndreMiras/garden.zbarcam/issues/41 + pil_image = PIL.Image.frombytes(mode='RGBA', size=size, + data=image_data) pil_image = cls._fix_android_image(pil_image) symbols = [] codes = pyzbar.decode(pil_image, symbols=code_types) From 9e55746ecfa3a3e20c8be4140a779884783e28c6 Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Wed, 8 May 2019 22:45:08 +0200 Subject: [PATCH 13/32] Moves source.dir to zbarcam Keeps things clean and simplifies `source.exclude_dirs` --- buildozer.spec | 10 +++------- main.py => zbarcam/main.py | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) rename main.py => zbarcam/main.py (78%) diff --git a/buildozer.spec b/buildozer.spec index 65c6d08..ccc8737 100644 --- a/buildozer.spec +++ b/buildozer.spec @@ -10,7 +10,7 @@ package.name = zbarcamdemo package.domain = com.github.andremiras # (str) Source code where the main.py live -source.dir = . +source.dir = zbarcam # (list) Source files to include (let empty to include all the files) source.include_exts = py,png,jpg,kv,atlas @@ -22,11 +22,7 @@ source.include_exts = py,png,jpg,kv,atlas #source.exclude_exts = spec # (list) List of directory to exclude (let empty to not exclude anything) -source.exclude_dirs = - bin, - dockerfiles, - tests, - venv +#source.exclude_dirs = tests, bin # (list) List of exclusions using pattern matching #source.exclude_patterns = license,images/*/*.jpg @@ -36,7 +32,7 @@ source.exclude_dirs = # (str) Application versioning (method 2) version.regex = __version__ = ['"](.*)['"] -version.filename = %(source.dir)s/zbarcam/version.py +version.filename = %(source.dir)s/version.py # (list) Application requirements # comma seperated e.g. requirements = sqlite3,kivy diff --git a/main.py b/zbarcam/main.py similarity index 78% rename from main.py rename to zbarcam/main.py index bd9295a..4c15082 100755 --- a/main.py +++ b/zbarcam/main.py @@ -2,7 +2,7 @@ """ Buildozer is only hooking with a `main.py` file. """ -from zbarcam.zbarcam import DemoApp +from zbarcam import DemoApp if __name__ == '__main__': From bed76fd9f33799658937e8be103cbef797146fe7 Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Fri, 30 Aug 2019 22:54:52 +0200 Subject: [PATCH 14/32] Move to kivy_garden dir --- {zbarcam => kivy_garden/zbarcam}/__init__.py | 0 {zbarcam => kivy_garden/zbarcam}/main.py | 0 {zbarcam => kivy_garden/zbarcam}/version.py | 0 {zbarcam => kivy_garden/zbarcam}/zbarcam.kv | 0 {zbarcam => kivy_garden/zbarcam}/zbarcam.py | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename {zbarcam => kivy_garden/zbarcam}/__init__.py (100%) rename {zbarcam => kivy_garden/zbarcam}/main.py (100%) rename {zbarcam => kivy_garden/zbarcam}/version.py (100%) rename {zbarcam => kivy_garden/zbarcam}/zbarcam.kv (100%) rename {zbarcam => kivy_garden/zbarcam}/zbarcam.py (100%) diff --git a/zbarcam/__init__.py b/kivy_garden/zbarcam/__init__.py similarity index 100% rename from zbarcam/__init__.py rename to kivy_garden/zbarcam/__init__.py diff --git a/zbarcam/main.py b/kivy_garden/zbarcam/main.py similarity index 100% rename from zbarcam/main.py rename to kivy_garden/zbarcam/main.py diff --git a/zbarcam/version.py b/kivy_garden/zbarcam/version.py similarity index 100% rename from zbarcam/version.py rename to kivy_garden/zbarcam/version.py diff --git a/zbarcam/zbarcam.kv b/kivy_garden/zbarcam/zbarcam.kv similarity index 100% rename from zbarcam/zbarcam.kv rename to kivy_garden/zbarcam/zbarcam.kv diff --git a/zbarcam/zbarcam.py b/kivy_garden/zbarcam/zbarcam.py similarity index 100% rename from zbarcam/zbarcam.py rename to kivy_garden/zbarcam/zbarcam.py From a649b897b98931b9ea67632e0dcd0bd18e2e8af9 Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Fri, 30 Aug 2019 23:28:32 +0200 Subject: [PATCH 15/32] Migrate to new garden structure WIP, fixes #17 --- CHANGELOG.md | 1 + README.md | 2 +- __init__.py | 10 ---------- buildozer.spec | 2 +- setup.py | 4 ++-- tests/test_zbarcam.py | 2 +- tests/ui/test_zbarcam_ui.py | 2 +- 7 files changed, 7 insertions(+), 16 deletions(-) delete mode 100644 __init__.py diff --git a/CHANGELOG.md b/CHANGELOG.md index b21b6f4..6919339 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Update Cython for Python3.7 support, refs #35 - Make garden.zbarcam a package again, refs #36 - Don't ship opencv directory to APK, refs #37 + - Migrate to new garden structure, refs #17 ## [20190303] diff --git a/README.md b/README.md index fa2abb9..412e1c4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # garden.zbarcam -[![Build Status](https://secure.travis-ci.org/kivy-garden/garden.zbarcam.png?branch=develop)](http://travis-ci.org/kivy-garden/garden.zbarcam) +[![Build Status](https://travis-ci.org/kivy-garden/zbarcam.svg?branch=develop)](https://travis-ci.org/kivy-garden/zbarcam) Real time Barcode and QR Code scanner using the camera. It's built on top of [Kivy](https://github.com/kivy/kivy) and [pyzbar](https://github.com/NaturalHistoryMuseum/pyzbar). diff --git a/__init__.py b/__init__.py deleted file mode 100644 index 4e738ff..0000000 --- a/__init__.py +++ /dev/null @@ -1,10 +0,0 @@ -""" -This is required when the package is installed via garden, -because garden copies the entire repository to e.g. `~/.kivy/garden/`. -Therefore we turn `~/.kivy/garden/garden.zbarcam/` to a package, -so it can imported via: -```python -from kivy.garden.zbarcam import ZBarCam -``` -""" -from .zbarcam import ZBarCam # noqa diff --git a/buildozer.spec b/buildozer.spec index ccc8737..ee0b8cb 100644 --- a/buildozer.spec +++ b/buildozer.spec @@ -10,7 +10,7 @@ package.name = zbarcamdemo package.domain = com.github.andremiras # (str) Source code where the main.py live -source.dir = zbarcam +source.dir = kivy_garden/zbarcam # (list) Source files to include (let empty to include all the files) source.include_exts = py,png,jpg,kv,atlas diff --git a/setup.py b/setup.py index 28b66d6..6ce7295 100644 --- a/setup.py +++ b/setup.py @@ -7,6 +7,6 @@ description='Real time Barcode and QR Code scanner Edit', author='Andre Miras', url='https://github.com/AndreMiras/garden.zbarcam', - packages=['zbarcam'], - package_data={'zbarcam': ['*.kv']}, + packages=['kivy_garden.zbarcam'], + package_data={'kivy_garden.zbarcam': ['*.kv']}, install_requires=['pyzbar', 'kivy', 'pillow', 'numpy']) diff --git a/tests/test_zbarcam.py b/tests/test_zbarcam.py index 5573952..2ec73cd 100644 --- a/tests/test_zbarcam.py +++ b/tests/test_zbarcam.py @@ -5,7 +5,7 @@ from kivy.base import EventLoop from kivy.core.image import Image -from zbarcam import ZBarCam +from kivy_garden.zbarcam import ZBarCam FIXTURE_DIR = os.path.join( os.path.dirname(os.path.abspath(__file__)), 'fixtures') diff --git a/tests/ui/test_zbarcam_ui.py b/tests/ui/test_zbarcam_ui.py index ae4c349..8ccd556 100644 --- a/tests/ui/test_zbarcam_ui.py +++ b/tests/ui/test_zbarcam_ui.py @@ -4,7 +4,7 @@ from functools import partial import mock from kivy.clock import Clock -from zbarcam.zbarcam import DemoApp, ZBarCam +from kivy_garden.zbarcam.zbarcam import DemoApp, ZBarCam class UITestCase(unittest.TestCase): From 5f6c9308ed19dbad45aaf07bbe97d9ca3dbcc473 Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Sat, 31 Aug 2019 00:47:56 +0200 Subject: [PATCH 16/32] Updates demo code and README.md --- README.md | 26 +++++++------------------- kivy_garden/zbarcam/main.py | 30 ++++++++++++++++++++++++++++-- kivy_garden/zbarcam/zbarcam.py | 25 ------------------------- tests/ui/test_zbarcam_ui.py | 3 ++- tox.ini | 6 +++--- 5 files changed, 40 insertions(+), 50 deletions(-) diff --git a/README.md b/README.md index 412e1c4..f5d2006 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# garden.zbarcam +# zbarcam [![Build Status](https://travis-ci.org/kivy-garden/zbarcam.svg?branch=develop)](https://travis-ci.org/kivy-garden/zbarcam) @@ -10,7 +10,7 @@ It's built on top of [Kivy](https://github.com/kivy/kivy) and [pyzbar](https://g ## How to use Simply import and instanciate `ZBarCam` in your kvlang file and access its `symbols` property. ```yaml -#:import ZBarCam kivy.garden.zbarcam.ZBarCam +#:import ZBarCam kivy_garden.zbarcam.ZBarCam #:import ZBarSymbol pyzbar.pyzbar.ZBarSymbol BoxLayout: orientation: 'vertical' @@ -23,6 +23,7 @@ BoxLayout: size: self.texture_size[0], 50 text: ', '.join([str(symbol.data) for symbol in zbarcam.symbols]) ``` +A full working demo is available in [kivy_garden/zbarcam/main.py](kivy_garden/zbarcam/main.py). ## Install @@ -38,22 +39,12 @@ garden install --upgrade xcamera ``` Install zbarcam: -Via `garden`: ```sh -garden install --upgrade zbarcam +pip install --upgrade https://github.com/kivy-garden/zbarcam/archive/develop.zip ``` -When installed with this method, the import command would be: +Then import it in your Python code via: ```python -from kivy.garden.zbarcam import ZBarCam -``` - -Via `pip`: -```sh -pip install --upgrade https://github.com/kivy-garden/garden.zbarcam/archive/develop.zip -``` -When installed with this method, the import command would be: -```python -from zbarcam import ZBarCam +from kivy_garden.zbarcam import ZBarCam ``` @@ -76,10 +67,7 @@ make uitest ## Troubleshooting ### Install `Unable to import package 'kivy.garden.xcamera.XCamera'` -Missing the `xcamera` dependency, install it with: -```sh -garden install xcamera -``` +You're missing the `xcamera` dependency. Install it as described in the install instructions. ### Android `ValueError: Empty module name` More likely an import issue in your `.kv` file. diff --git a/kivy_garden/zbarcam/main.py b/kivy_garden/zbarcam/main.py index 4c15082..b02b7d6 100755 --- a/kivy_garden/zbarcam/main.py +++ b/kivy_garden/zbarcam/main.py @@ -1,8 +1,34 @@ #!/usr/bin/env python """ -Buildozer is only hooking with a `main.py` file. +This demo can be ran from the project root directory via: +``` +PYTHONPATH=. python kivy_garden/zbarcam/main.py +``` +It can also be ran via p4a/buildozer. """ -from zbarcam import DemoApp +from kivy.app import App +from kivy.lang import Builder + +DEMO_APP_KV_LANG = """ +#:import ZBarCam kivy_garden.zbarcam.ZBarCam +#:import ZBarSymbol pyzbar.pyzbar.ZBarSymbol +BoxLayout: + orientation: 'vertical' + ZBarCam: + id: zbarcam + # optional, by default checks all types + code_types: ZBarSymbol.QRCODE, ZBarSymbol.EAN13 + Label: + size_hint: None, None + size: self.texture_size[0], 50 + text: ', '.join([str(symbol.data) for symbol in zbarcam.symbols]) +""" + + +class DemoApp(App): + + def build(self): + return Builder.load_string(DEMO_APP_KV_LANG) if __name__ == '__main__': diff --git a/kivy_garden/zbarcam/zbarcam.py b/kivy_garden/zbarcam/zbarcam.py index 07d270f..c0d175b 100644 --- a/kivy_garden/zbarcam/zbarcam.py +++ b/kivy_garden/zbarcam/zbarcam.py @@ -2,7 +2,6 @@ from collections import namedtuple import PIL -from kivy.app import App from kivy.clock import Clock from kivy.lang import Builder from kivy.properties import ListProperty @@ -122,27 +121,3 @@ def is_android(): @staticmethod def is_ios(): return platform == 'ios' - - -DEMO_APP_KV_LANG = """ -#:import ZBarSymbol pyzbar.pyzbar.ZBarSymbol -BoxLayout: - orientation: 'vertical' - ZBarCam: - id: zbarcam - code_types: ZBarSymbol.QRCODE, ZBarSymbol.EAN13 - Label: - size_hint: None, None - size: self.texture_size[0], 50 - text: ', '.join([str(symbol.data) for symbol in zbarcam.symbols]) -""" - - -class DemoApp(App): - - def build(self): - return Builder.load_string(DEMO_APP_KV_LANG) - - -if __name__ == '__main__': - DemoApp().run() diff --git a/tests/ui/test_zbarcam_ui.py b/tests/ui/test_zbarcam_ui.py index 8ccd556..7d45060 100644 --- a/tests/ui/test_zbarcam_ui.py +++ b/tests/ui/test_zbarcam_ui.py @@ -4,7 +4,8 @@ from functools import partial import mock from kivy.clock import Clock -from kivy_garden.zbarcam.zbarcam import DemoApp, ZBarCam +from kivy_garden.zbarcam.main import DemoApp +from kivy_garden.zbarcam.zbarcam import ZBarCam class UITestCase(unittest.TestCase): diff --git a/tox.ini b/tox.ini index 605892e..e7f3d63 100644 --- a/tox.ini +++ b/tox.ini @@ -10,7 +10,7 @@ indexserver = [testenv] setenv = KIVY_UNITTEST = 1 - PYTHONPATH = {toxinidir}/zbarcam/ + PYTHONPATH = {toxinidir}/kivy_garden/zbarcam/ passenv = DISPLAY deps = :preinstall: Cython==0.28.6 @@ -21,10 +21,10 @@ commands = pytest --ignore tests/ui/ tests/ [testenv:pep8] deps = -r{toxinidir}/requirements/test_requirements.txt -commands = flake8 zbarcam/ tests/ +commands = flake8 kivy_garden/ tests/ [testenv:isort-check] deps = -r{toxinidir}/requirements/test_requirements.txt commands = - isort --check-only --recursive --diff zbarcam/ tests/ + isort --check-only --recursive --diff kivy_garden/ tests/ From e637b8c0abd7c9048dd90cf9567122932ab0544b Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Sat, 31 Aug 2019 01:07:00 +0200 Subject: [PATCH 17/32] Updates setup.py - migrates to setuptools - adds long description - single source of truth on version --- .gitignore | 3 +++ setup.py | 15 ++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 89bfb75..7f5edc0 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,6 @@ venv/ .buildozer/ bin/ opencv-* +build/ +dist/ +*.egg-info/ diff --git a/setup.py b/setup.py index 6ce7295..4df9e9a 100644 --- a/setup.py +++ b/setup.py @@ -1,10 +1,19 @@ -#!/usr/bin/env python +import os + +from setuptools import setup +from kivy_garden.zbarcam import version + + +def read(fname): + with open(os.path.join(os.path.dirname(__file__), fname)) as f: + return f.read() -from distutils.core import setup setup(name='zbarcam', - version='20171220', + version=version.__version__, description='Real time Barcode and QR Code scanner Edit', + long_description=read('README.md'), + long_description_content_type='text/markdown', author='Andre Miras', url='https://github.com/AndreMiras/garden.zbarcam', packages=['kivy_garden.zbarcam'], From 94c5307b8c953cc5e5b787dc6ff723c00668436a Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Sat, 31 Aug 2019 23:39:41 +0200 Subject: [PATCH 18/32] Imported doc from flower, refs #18 See https://github.com/kivy-garden/flower/tree/master/doc --- doc/Makefile | 20 ++++++++++++ doc/README.md | 48 +++++++++++++++++++++++++++ doc/make.bat | 35 ++++++++++++++++++++ doc/source/api.rst | 9 +++++ doc/source/conf.py | 60 ++++++++++++++++++++++++++++++++++ doc/source/examples.rst | 11 +++++++ doc/source/flower.rst | 13 ++++++++ doc/source/getting_started.rst | 11 +++++++ doc/source/index.rst | 23 +++++++++++++ doc/source/installation.rst | 46 ++++++++++++++++++++++++++ 10 files changed, 276 insertions(+) create mode 100644 doc/Makefile create mode 100644 doc/README.md create mode 100644 doc/make.bat create mode 100644 doc/source/api.rst create mode 100644 doc/source/conf.py create mode 100644 doc/source/examples.rst create mode 100644 doc/source/flower.rst create mode 100644 doc/source/getting_started.rst create mode 100644 doc/source/index.rst create mode 100644 doc/source/installation.rst diff --git a/doc/Makefile b/doc/Makefile new file mode 100644 index 0000000..d0c3cbf --- /dev/null +++ b/doc/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = source +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/doc/README.md b/doc/README.md new file mode 100644 index 0000000..af5f460 --- /dev/null +++ b/doc/README.md @@ -0,0 +1,48 @@ +Generating the Docs +=================== + +Basic instructions for how to generate the flower docs and upload to github. +This needs to be done in either powershell or linux shell, not windows cmd. + +The generated docs can be found at https://kivy-garden.github.io/flower/ after this +process. + +Please use these instructions with care and don't copy paste without understanding +what the commands do as they create and delete folders. Make sure the repo is +fully pushed to github before doing this because this **deletes** all local changes. + +You may want to do the following commands in a copy of the flower directory. + +Install sphinx:: + + python -m pip install sphinx + +In a shell make sure to be in the flower directory. Then:: + + cd doc + # (in powershell do ./make.bat html) + make html + cd .. + + mkdir ~/docs_temp + # copy generated docs to temp path + cp -r doc/build/html/* ~/docs_temp + # gh-pages is the branch for the docs that github will display + git checkout --orphan gh-pages + # **CAUTION** be sure the following commands is executed in the flower directory + # we take no responsibility if you delete all the files in your computer :) + git rm -rf . + # on a linux shell do + rm -fr $(ls -1 --ignore=.git .) + # in powershell instead do + Remove-Item -recurse * -exclude .git + # copy the docs back to the repo + cp -r ~/docs_temp/* . + echo "" > .nojekyll + + git add . + git commit -a -m "Docs update" + git push origin gh-pages -f + + # Finally, get back to master + git checkout master \ No newline at end of file diff --git a/doc/make.bat b/doc/make.bat new file mode 100644 index 0000000..9534b01 --- /dev/null +++ b/doc/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/doc/source/api.rst b/doc/source/api.rst new file mode 100644 index 0000000..04dbf09 --- /dev/null +++ b/doc/source/api.rst @@ -0,0 +1,9 @@ + +#################### + The Flower API +#################### + +.. toctree:: + :maxdepth: 1 + + flower.rst diff --git a/doc/source/conf.py b/doc/source/conf.py new file mode 100644 index 0000000..6aee49b --- /dev/null +++ b/doc/source/conf.py @@ -0,0 +1,60 @@ +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# http://www.sphinx-doc.org/en/master/config + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +import os +import sys +sys.path.insert(0, os.path.abspath('../../')) + + +# -- Project information ----------------------------------------------------- + +project = 'Flower' +copyright = '2019, Kivy' +author = 'Kivy' + + +# -- General configuration --------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + 'sphinx.ext.autodoc', + 'sphinx.ext.todo', + 'sphinx.ext.coverage', + 'sphinx.ext.intersphinx', +] + +intersphinx_mapping = { + 'kivy': ('https://kivy.org/docs/', None), +} + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = [] + + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'alabaster' + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] diff --git a/doc/source/examples.rst b/doc/source/examples.rst new file mode 100644 index 0000000..554e358 --- /dev/null +++ b/doc/source/examples.rst @@ -0,0 +1,11 @@ +.. _examples: + +******** +Examples +******** + + +Basic Example +------------- + +Add your examples here \ No newline at end of file diff --git a/doc/source/flower.rst b/doc/source/flower.rst new file mode 100644 index 0000000..1447aa8 --- /dev/null +++ b/doc/source/flower.rst @@ -0,0 +1,13 @@ +.. _flower-api: + +****** +Flower +****** + +:mod:`kivy_garden.flower` +============================= + +.. automodule:: kivy_garden.flower + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/getting_started.rst b/doc/source/getting_started.rst new file mode 100644 index 0000000..be022fc --- /dev/null +++ b/doc/source/getting_started.rst @@ -0,0 +1,11 @@ +.. _started: + +#################### + Getting Started +#################### + +.. toctree:: + :maxdepth: 2 + + installation.rst + examples.rst diff --git a/doc/source/index.rst b/doc/source/index.rst new file mode 100644 index 0000000..b1e20bf --- /dev/null +++ b/doc/source/index.rst @@ -0,0 +1,23 @@ +.. Flower documentation master file, created by + sphinx-quickstart on Wed Jun 19 14:32:58 2019. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to Flower's documentation! +================================== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + getting_started.rst + api.rst + + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/doc/source/installation.rst b/doc/source/installation.rst new file mode 100644 index 0000000..13457d9 --- /dev/null +++ b/doc/source/installation.rst @@ -0,0 +1,46 @@ +.. _install: + +************ +Installation +************ + +Supported versions +------------------ + +* Python 3.5+ + +Dependencies +------------ + +#. `Kivy `_ + + +Installation +------------ + +Please see the `garden docs `_ for full installation instructions. + +You can install flower master directly from github with:: + + python -m pip install https://github.com/kivy-garden/flower/archive/master.zip + +Look under the repository's releases tab if you'd like to install a specific +release or a pre-compiled wheel, if the flower has any. Then use the url with +`pip`. + +Or you can automatically install it using garden's pypi server with:: + + python -m pip install kivy_garden.flower --extra-index-url https://kivy-garden.github.io/simple/ + +To permanently add our garden server to your pip configuration so that you +don't have to specify it with `--extra-index-url`, add:: + + [global] + timeout = 60 + index-url = https://kivy-garden.github.io/simple/ + +to your `pip.conf `_. + +If the flower maintainer has uploaded the flower to +`pypi `_, you can just install it with +`pip install kivy_garden.flower`. From a5edd1833a7d69449b4d61c683a3d0557cf873bd Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Sun, 1 Sep 2019 00:22:56 +0200 Subject: [PATCH 19/32] Build docs from Makefile, refs #18 ``` make docs ``` --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 5470d27..05cbde7 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,9 @@ PIP=$(VENV_NAME)/bin/pip TOX=`which tox` GARDEN=$(VENV_NAME)/bin/garden PYTHON=$(VENV_NAME)/bin/python +# using full path so it can be used outside the root dir +SPHINXBUILD=$(shell realpath venv/bin/sphinx-build) +DOCS_DIR=doc SYSTEM_DEPENDENCIES= \ build-essential \ cmake \ @@ -114,3 +117,6 @@ test: uitest: virtualenv $(PIP) install -r requirements/test_requirements.txt $(PYTHON) -m unittest discover --top-level-directory=. --start-directory=tests/ui/ + +docs: + cd $(DOCS_DIR) && SPHINXBUILD=$(SPHINXBUILD) make html From 8f545fbb55671981526ccb49b79a59b8cfc9c988 Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Sun, 1 Sep 2019 00:34:45 +0200 Subject: [PATCH 20/32] fixes readthedocs generation --- doc/source/conf.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/source/conf.py b/doc/source/conf.py index 6aee49b..efa94c9 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -41,6 +41,9 @@ # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] +# The master toctree document. +master_doc = 'index' + # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. From 9ab5732c151738253322ac81739de79e741fa87d Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Sun, 1 Sep 2019 00:36:44 +0200 Subject: [PATCH 21/32] docs sphinx_rtd_theme, project name and author --- doc/source/conf.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index efa94c9..fbd8182 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -17,9 +17,9 @@ # -- Project information ----------------------------------------------------- -project = 'Flower' -copyright = '2019, Kivy' -author = 'Kivy' +project = 'Zbarcam' +copyright = '2019, Andre Miras' +author = 'Andre Miras' # -- General configuration --------------------------------------------------- @@ -55,7 +55,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'alabaster' +html_theme = 'sphinx_rtd_theme' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, From c4e8c7898e74d55c2c00e3af5d0950e5e68e3e4e Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Sun, 1 Sep 2019 00:44:37 +0200 Subject: [PATCH 22/32] Updates docs to map zbarcam --- Makefile | 2 +- doc/source/api.rst | 8 ++++---- doc/source/flower.rst | 13 ------------- doc/source/index.rst | 6 +++--- 4 files changed, 8 insertions(+), 21 deletions(-) delete mode 100644 doc/source/flower.rst diff --git a/Makefile b/Makefile index 05cbde7..4098cad 100644 --- a/Makefile +++ b/Makefile @@ -109,7 +109,7 @@ $(OPENCV_DEPLOY): $(OPENCV_BUILD) virtualenv opencv: $(OPENCV_DEPLOY) clean: - rm -rf $(VENV_NAME) .tox/ $(DOWNLOAD_DIR) + rm -rf $(VENV_NAME) .tox/ $(DOWNLOAD_DIR) $(DOCS_DIR)/build/ test: $(TOX) diff --git a/doc/source/api.rst b/doc/source/api.rst index 04dbf09..c35be91 100644 --- a/doc/source/api.rst +++ b/doc/source/api.rst @@ -1,9 +1,9 @@ -#################### - The Flower API -#################### +################ + Zbarcam API +################ .. toctree:: :maxdepth: 1 - flower.rst + zbarcam.rst diff --git a/doc/source/flower.rst b/doc/source/flower.rst deleted file mode 100644 index 1447aa8..0000000 --- a/doc/source/flower.rst +++ /dev/null @@ -1,13 +0,0 @@ -.. _flower-api: - -****** -Flower -****** - -:mod:`kivy_garden.flower` -============================= - -.. automodule:: kivy_garden.flower - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/index.rst b/doc/source/index.rst index b1e20bf..ad68039 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -1,10 +1,10 @@ -.. Flower documentation master file, created by +.. Zbarcam documentation master file, created by sphinx-quickstart on Wed Jun 19 14:32:58 2019. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -Welcome to Flower's documentation! -================================== +Welcome to Zbarcam's documentation! +=================================== .. toctree:: :maxdepth: 2 From 1e8494d02e749390661e38a2da5e10f6b6e4c68f Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Sun, 1 Sep 2019 13:50:32 +0200 Subject: [PATCH 23/32] Sphinx Markdown support --- doc/source/conf.py | 6 ++++++ doc/source/examples.md | 8 ++++++++ doc/source/examples.rst | 11 ----------- doc/source/getting_started.rst | 2 +- doc/source/zbarcam.rst | 13 +++++++++++++ requirements.txt | 3 +++ requirements/requirements-documentation.txt | 1 + 7 files changed, 32 insertions(+), 12 deletions(-) create mode 100644 doc/source/examples.md delete mode 100644 doc/source/examples.rst create mode 100644 doc/source/zbarcam.rst create mode 100644 requirements.txt create mode 100644 requirements/requirements-documentation.txt diff --git a/doc/source/conf.py b/doc/source/conf.py index fbd8182..0429ee4 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -32,6 +32,7 @@ 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.intersphinx', + 'm2r', ] intersphinx_mapping = { @@ -41,6 +42,11 @@ # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +source_suffix = ['.rst', '.md'] + # The master toctree document. master_doc = 'index' diff --git a/doc/source/examples.md b/doc/source/examples.md new file mode 100644 index 0000000..aaa53da --- /dev/null +++ b/doc/source/examples.md @@ -0,0 +1,8 @@ +.. _examples: + +# Examples + + +## Basic Example + +Add your examples here diff --git a/doc/source/examples.rst b/doc/source/examples.rst deleted file mode 100644 index 554e358..0000000 --- a/doc/source/examples.rst +++ /dev/null @@ -1,11 +0,0 @@ -.. _examples: - -******** -Examples -******** - - -Basic Example -------------- - -Add your examples here \ No newline at end of file diff --git a/doc/source/getting_started.rst b/doc/source/getting_started.rst index be022fc..f166d66 100644 --- a/doc/source/getting_started.rst +++ b/doc/source/getting_started.rst @@ -8,4 +8,4 @@ :maxdepth: 2 installation.rst - examples.rst + examples.md diff --git a/doc/source/zbarcam.rst b/doc/source/zbarcam.rst new file mode 100644 index 0000000..6c7968b --- /dev/null +++ b/doc/source/zbarcam.rst @@ -0,0 +1,13 @@ +.. _zbarcam-api: + +******* +Zbarcam +******* + +:mod:`kivy_garden.zbarcam` +============================= + +.. automodule:: kivy_garden.zbarcam + :members: + :undoc-members: + :show-inheritance: diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..7d837a9 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +-r requirements/requirements.txt +-r requirements/requirements-documentation.txt +-r requirements/test_requirements.txt diff --git a/requirements/requirements-documentation.txt b/requirements/requirements-documentation.txt new file mode 100644 index 0000000..b5cb07a --- /dev/null +++ b/requirements/requirements-documentation.txt @@ -0,0 +1 @@ +m2r==0.2.1 From 5d111eccd1fd7133813c6be0ab7f2e6c5d9eeecd Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Sun, 1 Sep 2019 14:08:18 +0200 Subject: [PATCH 24/32] Usage example --- doc/source/examples.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/doc/source/examples.md b/doc/source/examples.md index aaa53da..8b2a998 100644 --- a/doc/source/examples.md +++ b/doc/source/examples.md @@ -5,4 +5,17 @@ ## Basic Example -Add your examples here +```yaml +#:import ZBarCam kivy_garden.zbarcam.ZBarCam +#:import ZBarSymbol pyzbar.pyzbar.ZBarSymbol +BoxLayout: + orientation: 'vertical' + ZBarCam: + id: zbarcam + # optional, by default checks all types + code_types: ZBarSymbol.QRCODE, ZBarSymbol.EAN13 + Label: + size_hint: None, None + size: self.texture_size[0], 50 + text: ', '.join([str(symbol.data) for symbol in zbarcam.symbols]) +``` From 2343d6c3c8ba465d3528f279d13a4ee5153fbc70 Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Sun, 1 Sep 2019 23:58:49 +0200 Subject: [PATCH 25/32] Migrated installation docs to markdown --- doc/source/getting_started.rst | 2 +- doc/source/installation.md | 37 +++++++++++++++++++++++++++ doc/source/installation.rst | 46 ---------------------------------- 3 files changed, 38 insertions(+), 47 deletions(-) create mode 100644 doc/source/installation.md delete mode 100644 doc/source/installation.rst diff --git a/doc/source/getting_started.rst b/doc/source/getting_started.rst index f166d66..3315196 100644 --- a/doc/source/getting_started.rst +++ b/doc/source/getting_started.rst @@ -7,5 +7,5 @@ .. toctree:: :maxdepth: 2 - installation.rst + installation.md examples.md diff --git a/doc/source/installation.md b/doc/source/installation.md new file mode 100644 index 0000000..7a61998 --- /dev/null +++ b/doc/source/installation.md @@ -0,0 +1,37 @@ +# Installation + +## Supported versions + +* Python 3.5+ + +## Dependencies + +* [Kivy](https://kivy.org/#download) + + +## Installation + +Please see the [garden docs](https://kivy-garden.github.io/) for full installation instructions. + +Install last zbarcam release from PyPI with: +```sh +pip install --upgrade zbarcam +``` + +Or develop branch directly from github with: +```sh +pip install https://github.com/kivy-garden/zbarcam/archive/develop.zip +``` + +You can also automatically install it using garden's pypi server with: +```sh +python -m pip install kivy_garden.zbarcam --extra-index-url https://kivy-garden.github.io/simple/ +``` + +You can permanently add our garden server to your [pip.conf](https://pip.pypa.io/en/stable/user_guide/#config-file) +so that you don't have to specify it with `--extra-index-url`: +```sh +[global] +timeout = 60 +index-url = https://kivy-garden.github.io/simple/ +``` diff --git a/doc/source/installation.rst b/doc/source/installation.rst deleted file mode 100644 index 13457d9..0000000 --- a/doc/source/installation.rst +++ /dev/null @@ -1,46 +0,0 @@ -.. _install: - -************ -Installation -************ - -Supported versions ------------------- - -* Python 3.5+ - -Dependencies ------------- - -#. `Kivy `_ - - -Installation ------------- - -Please see the `garden docs `_ for full installation instructions. - -You can install flower master directly from github with:: - - python -m pip install https://github.com/kivy-garden/flower/archive/master.zip - -Look under the repository's releases tab if you'd like to install a specific -release or a pre-compiled wheel, if the flower has any. Then use the url with -`pip`. - -Or you can automatically install it using garden's pypi server with:: - - python -m pip install kivy_garden.flower --extra-index-url https://kivy-garden.github.io/simple/ - -To permanently add our garden server to your pip configuration so that you -don't have to specify it with `--extra-index-url`, add:: - - [global] - timeout = 60 - index-url = https://kivy-garden.github.io/simple/ - -to your `pip.conf `_. - -If the flower maintainer has uploaded the flower to -`pypi `_, you can just install it with -`pip install kivy_garden.flower`. From 3fbe90493d3642c9af06487b76e9846a4468abf4 Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Mon, 2 Sep 2019 10:56:11 +0200 Subject: [PATCH 26/32] Updates documentation, fixes #18 --- doc/source/contributing.rst | 8 ++++++ doc/source/index.rst | 1 + doc/source/installation.md | 2 +- doc/source/release.md | 54 +++++++++++++++++++++++++++++++++++++ 4 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 doc/source/contributing.rst create mode 100644 doc/source/release.md diff --git a/doc/source/contributing.rst b/doc/source/contributing.rst new file mode 100644 index 0000000..a0a9484 --- /dev/null +++ b/doc/source/contributing.rst @@ -0,0 +1,8 @@ +################# + Contributing +################# + +.. toctree:: + :maxdepth: 2 + + release.md diff --git a/doc/source/index.rst b/doc/source/index.rst index ad68039..0639238 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -12,6 +12,7 @@ Welcome to Zbarcam's documentation! getting_started.rst api.rst + contributing.rst diff --git a/doc/source/installation.md b/doc/source/installation.md index 7a61998..46b0c56 100644 --- a/doc/source/installation.md +++ b/doc/source/installation.md @@ -25,7 +25,7 @@ pip install https://github.com/kivy-garden/zbarcam/archive/develop.zip You can also automatically install it using garden's pypi server with: ```sh -python -m pip install kivy_garden.zbarcam --extra-index-url https://kivy-garden.github.io/simple/ +python -m pip install zbarcam --extra-index-url https://kivy-garden.github.io/simple/ ``` You can permanently add our garden server to your [pip.conf](https://pip.pypa.io/en/stable/user_guide/#config-file) diff --git a/doc/source/release.md b/doc/source/release.md new file mode 100644 index 0000000..e9b808e --- /dev/null +++ b/doc/source/release.md @@ -0,0 +1,54 @@ +# How to release + +This is documenting the release process. + + +## Git flow & CHANGELOG.md + +Make sure the CHANGELOG.md is up to date and follows the http://keepachangelog.com guidelines. +Start the release with git flow: +```sh +git flow release start YYYYMMDD +``` +Now update the [CHANGELOG.md](/CHANGELOG.md) `[Unreleased]` section to match the new release version. +Also update the `version` string from the +[kivy_garden/zbarcam/version.py](https://github.com/kivy-garden/zbarcam/blob/develop/kivy_garden/zbarcam/version.py) +file. +Then commit and finish release. +```sh +git commit -a -m "YYYYMMDD" +git flow release finish +``` +Push everything, make sure tags are also pushed: +```sh +git push +git push origin master:master +git push --tags +``` + +## Publish to PyPI + +Build it: +```sh +python setup.py sdist bdist_wheel +``` +Check archive content: +```sh +tar -tvf dist/kivy_garden.zbarcam-*.tar.gz +``` +Twine check and upload: +```sh +twine check dist/* +twine upload dist/* +``` +Also publish the alias meta package `setup_meta.py`. + +## Check Read the Docs + +Make sure is up to date. + +## GitHub + +Got to GitHub [Release/Tags](https://github.com/kivy-garden/zbarcam/tags), click "Add release notes" for the tag just created. +Add the tag name in the "Release title" field and the relevant CHANGELOG.md section in the "Describe this release" textarea field. +Finally, attach the generated APK release file and click "Publish release". From d822e7e9a3e2663ccf555b70747a0cdf1c0bf9fe Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Mon, 2 Sep 2019 10:58:26 +0200 Subject: [PATCH 27/32] Aliasing zbarcan and kivy_garden.zbarcam, fixes #19 --- setup.py | 37 +++++++++++++++++++++++++++---------- setup_meta.py | 14 ++++++++++++++ tox.ini | 4 ++-- 3 files changed, 43 insertions(+), 12 deletions(-) create mode 100644 setup_meta.py diff --git a/setup.py b/setup.py index 4df9e9a..f9f13b7 100644 --- a/setup.py +++ b/setup.py @@ -9,13 +9,30 @@ def read(fname): return f.read() -setup(name='zbarcam', - version=version.__version__, - description='Real time Barcode and QR Code scanner Edit', - long_description=read('README.md'), - long_description_content_type='text/markdown', - author='Andre Miras', - url='https://github.com/AndreMiras/garden.zbarcam', - packages=['kivy_garden.zbarcam'], - package_data={'kivy_garden.zbarcam': ['*.kv']}, - install_requires=['pyzbar', 'kivy', 'pillow', 'numpy']) +# exposing the params so it can be imported +setup_params = { + 'name': 'kivy_garden.zbarcam', + 'version': version.__version__, + 'description': 'Real time Barcode and QR Code scanner Edit', + 'long_description': read('README.md'), + 'long_description_content_type': 'text/markdown', + 'author': 'Andre Miras', + 'url': 'https://github.com/kivy-garden/zbarcam', + 'packages': ['kivy_garden.zbarcam'], + 'package_data': {'kivy_garden.zbarcam': ['*.kv']}, + 'install_requires': [ + 'kivy', + 'numpy', + 'pillow', + 'pyzbar', + ], +} + + +def run_setup(): + setup(**setup_params) + + +# makes sure the setup doesn't run at import time +if __name__ == '__main__': + run_setup() diff --git a/setup_meta.py b/setup_meta.py new file mode 100644 index 0000000..c55169c --- /dev/null +++ b/setup_meta.py @@ -0,0 +1,14 @@ +""" +Creates a distribution alias that just installs pyetheroll. +""" +from setuptools import setup + +from setup import setup_params + +setup_params.update({ + 'install_requires': ['kivy_garden.zbarcam'], + 'name': 'zbarcam', +}) + + +setup(**setup_params) diff --git a/tox.ini b/tox.ini index e7f3d63..8d41b6b 100644 --- a/tox.ini +++ b/tox.ini @@ -21,10 +21,10 @@ commands = pytest --ignore tests/ui/ tests/ [testenv:pep8] deps = -r{toxinidir}/requirements/test_requirements.txt -commands = flake8 kivy_garden/ tests/ +commands = flake8 kivy_garden/ tests/ setup.py setup_meta.py [testenv:isort-check] deps = -r{toxinidir}/requirements/test_requirements.txt commands = - isort --check-only --recursive --diff kivy_garden/ tests/ + isort --check-only --recursive --diff kivy_garden/ tests/ setup.py setup_meta.py From d5640782a04a050b0fde0eb2bfb61f16f3a73f8b Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Mon, 2 Sep 2019 14:09:54 +0200 Subject: [PATCH 28/32] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6919339..a4db670 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ - Make garden.zbarcam a package again, refs #36 - Don't ship opencv directory to APK, refs #37 - Migrate to new garden structure, refs #17 + - Publish documentation to readthedocs, refs #18 + - Publish to PyPI, refs #19 ## [20190303] From ba533c77affa13ee99c6dbec13e2a160fc5da2a4 Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Mon, 2 Sep 2019 15:29:25 +0200 Subject: [PATCH 29/32] Fixes pip install --- kivy_garden/zbarcam/__init__.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/kivy_garden/zbarcam/__init__.py b/kivy_garden/zbarcam/__init__.py index 11ad3bd..2d4f649 100644 --- a/kivy_garden/zbarcam/__init__.py +++ b/kivy_garden/zbarcam/__init__.py @@ -1 +1,16 @@ -from .zbarcam import ZBarCam # noqa +""" +Exposes `ZBarCam` directly in `zbarcam` rather than `zbarcam.zbarcam`. +Also note this may break `pip` since all imports within `zbarcam.py` would be +required at setup time. This is because `version.py` (same directory) is used +by the `setup.py` file. +Hence we're not exposing `ZBarCam` if `pip` is detected. +""" +import os + + +project_dir = os.path.abspath( + os.path.join(__file__, os.pardir, os.pardir, os.pardir)) +using_pip = os.path.basename(project_dir).startswith('pip-') +# only exposes `ZBarCam` if not within `pip` ongoing install +if not using_pip: + from .zbarcam import ZBarCam # noqa From 734cf273b44beacdc7ae82702a14d54115913122 Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Mon, 2 Sep 2019 16:14:12 +0200 Subject: [PATCH 30/32] Moves code to dedicated src/ folder Fixes demo app via `buildozer.spec` file. --- buildozer.spec | 4 ++-- doc/source/release.md | 2 +- setup.py | 7 ++++--- {kivy_garden => src/kivy_garden}/zbarcam/__init__.py | 2 +- {kivy_garden => src/kivy_garden}/zbarcam/version.py | 0 {kivy_garden => src/kivy_garden}/zbarcam/zbarcam.kv | 0 {kivy_garden => src/kivy_garden}/zbarcam/zbarcam.py | 0 {kivy_garden/zbarcam => src}/main.py | 4 ++-- tox.ini | 2 +- 9 files changed, 11 insertions(+), 10 deletions(-) rename {kivy_garden => src/kivy_garden}/zbarcam/__init__.py (88%) rename {kivy_garden => src/kivy_garden}/zbarcam/version.py (100%) rename {kivy_garden => src/kivy_garden}/zbarcam/zbarcam.kv (100%) rename {kivy_garden => src/kivy_garden}/zbarcam/zbarcam.py (100%) rename {kivy_garden/zbarcam => src}/main.py (93%) diff --git a/buildozer.spec b/buildozer.spec index ee0b8cb..a443aea 100644 --- a/buildozer.spec +++ b/buildozer.spec @@ -10,7 +10,7 @@ package.name = zbarcamdemo package.domain = com.github.andremiras # (str) Source code where the main.py live -source.dir = kivy_garden/zbarcam +source.dir = src # (list) Source files to include (let empty to include all the files) source.include_exts = py,png,jpg,kv,atlas @@ -32,7 +32,7 @@ source.include_exts = py,png,jpg,kv,atlas # (str) Application versioning (method 2) version.regex = __version__ = ['"](.*)['"] -version.filename = %(source.dir)s/version.py +version.filename = %(source.dir)s/kivy_garden/zbarcam/version.py # (list) Application requirements # comma seperated e.g. requirements = sqlite3,kivy diff --git a/doc/source/release.md b/doc/source/release.md index e9b808e..ff51794 100644 --- a/doc/source/release.md +++ b/doc/source/release.md @@ -12,7 +12,7 @@ git flow release start YYYYMMDD ``` Now update the [CHANGELOG.md](/CHANGELOG.md) `[Unreleased]` section to match the new release version. Also update the `version` string from the -[kivy_garden/zbarcam/version.py](https://github.com/kivy-garden/zbarcam/blob/develop/kivy_garden/zbarcam/version.py) +[src/kivy_garden/zbarcam/version.py](https://github.com/kivy-garden/zbarcam/blob/develop/src/kivy_garden/zbarcam/version.py) file. Then commit and finish release. ```sh diff --git a/setup.py b/setup.py index f9f13b7..bb1ef1a 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ import os -from setuptools import setup -from kivy_garden.zbarcam import version +from setuptools import find_namespace_packages, setup +from src.kivy_garden.zbarcam import version def read(fname): @@ -18,8 +18,9 @@ def read(fname): 'long_description_content_type': 'text/markdown', 'author': 'Andre Miras', 'url': 'https://github.com/kivy-garden/zbarcam', - 'packages': ['kivy_garden.zbarcam'], + 'packages': find_namespace_packages(where='src'), 'package_data': {'kivy_garden.zbarcam': ['*.kv']}, + 'package_dir': {'': 'src'}, 'install_requires': [ 'kivy', 'numpy', diff --git a/kivy_garden/zbarcam/__init__.py b/src/kivy_garden/zbarcam/__init__.py similarity index 88% rename from kivy_garden/zbarcam/__init__.py rename to src/kivy_garden/zbarcam/__init__.py index 2d4f649..f10f37a 100644 --- a/kivy_garden/zbarcam/__init__.py +++ b/src/kivy_garden/zbarcam/__init__.py @@ -9,7 +9,7 @@ project_dir = os.path.abspath( - os.path.join(__file__, os.pardir, os.pardir, os.pardir)) + os.path.join(__file__, os.pardir, os.pardir, os.pardir, os.pardir)) using_pip = os.path.basename(project_dir).startswith('pip-') # only exposes `ZBarCam` if not within `pip` ongoing install if not using_pip: diff --git a/kivy_garden/zbarcam/version.py b/src/kivy_garden/zbarcam/version.py similarity index 100% rename from kivy_garden/zbarcam/version.py rename to src/kivy_garden/zbarcam/version.py diff --git a/kivy_garden/zbarcam/zbarcam.kv b/src/kivy_garden/zbarcam/zbarcam.kv similarity index 100% rename from kivy_garden/zbarcam/zbarcam.kv rename to src/kivy_garden/zbarcam/zbarcam.kv diff --git a/kivy_garden/zbarcam/zbarcam.py b/src/kivy_garden/zbarcam/zbarcam.py similarity index 100% rename from kivy_garden/zbarcam/zbarcam.py rename to src/kivy_garden/zbarcam/zbarcam.py diff --git a/kivy_garden/zbarcam/main.py b/src/main.py similarity index 93% rename from kivy_garden/zbarcam/main.py rename to src/main.py index b02b7d6..6db2c13 100755 --- a/kivy_garden/zbarcam/main.py +++ b/src/main.py @@ -1,8 +1,8 @@ #!/usr/bin/env python """ This demo can be ran from the project root directory via: -``` -PYTHONPATH=. python kivy_garden/zbarcam/main.py +```sh +python src/main.py ``` It can also be ran via p4a/buildozer. """ diff --git a/tox.ini b/tox.ini index 8d41b6b..810095d 100644 --- a/tox.ini +++ b/tox.ini @@ -10,7 +10,7 @@ indexserver = [testenv] setenv = KIVY_UNITTEST = 1 - PYTHONPATH = {toxinidir}/kivy_garden/zbarcam/ + PYTHONPATH = {toxinidir}/src/ passenv = DISPLAY deps = :preinstall: Cython==0.28.6 From 4dd3c7716a47d91489067fcf74d115820a6afaff Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Mon, 2 Sep 2019 16:18:42 +0200 Subject: [PATCH 31/32] Updates `make clean` --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4098cad..94f2390 100644 --- a/Makefile +++ b/Makefile @@ -109,7 +109,7 @@ $(OPENCV_DEPLOY): $(OPENCV_BUILD) virtualenv opencv: $(OPENCV_DEPLOY) clean: - rm -rf $(VENV_NAME) .tox/ $(DOWNLOAD_DIR) $(DOCS_DIR)/build/ + rm -rf $(VENV_NAME) .tox/ $(DOWNLOAD_DIR) $(DOCS_DIR)/build/ dist/ build/ test: $(TOX) From 82e2e63ff8e2e5c964eabc6374bcaf0114c089f9 Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Mon, 2 Sep 2019 16:30:11 +0200 Subject: [PATCH 32/32] 20190902 --- CHANGELOG.md | 2 +- src/kivy_garden/zbarcam/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a4db670..6479d74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log -## [Unreleased] +## [20190902] - Update Cython for Python3.7 support, refs #35 - Make garden.zbarcam a package again, refs #36 diff --git a/src/kivy_garden/zbarcam/version.py b/src/kivy_garden/zbarcam/version.py index b9801a0..b29cb33 100644 --- a/src/kivy_garden/zbarcam/version.py +++ b/src/kivy_garden/zbarcam/version.py @@ -1 +1 @@ -__version__ = '2019.0303' +__version__ = '2019.0902'