Skip to content

Commit 74fcaeb

Browse files
committed
Merge branch 'release/2019.0909'
2 parents e52c1ca + 27e0956 commit 74fcaeb

File tree

8 files changed

+52
-27
lines changed

8 files changed

+52
-27
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Change Log
22

3+
## [2019.0909]
4+
5+
- Fix camera events not binded
6+
- Makefile improvements
7+
- Bump to Kivy==1.11.1, refs #22
8+
39
## [2019.0907]
410

511
- Update buildozer, p4a, and ndk versions, refs #21

Makefile

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,12 @@ all: system_dependencies virtualenv opencv
5050

5151
venv:
5252
test -d venv || virtualenv -p python$(PYTHON_MAJOR_VERSION) venv
53-
. venv/bin/activate
53+
54+
virtualenv: venv
5455
$(PIP) install Cython==0.28.6
5556
$(PIP) install -r requirements/requirements.txt
5657
$(GARDEN) install xcamera
5758

58-
virtualenv: venv
59-
6059
system_dependencies:
6160
ifeq ($(OS), Ubuntu)
6261
sudo apt install --yes --no-install-recommends $(SYSTEM_DEPENDENCIES)
@@ -112,8 +111,10 @@ $(OPENCV_DEPLOY): $(OPENCV_BUILD) virtualenv
112111

113112
opencv: $(OPENCV_DEPLOY)
114113

115-
clean:
116-
rm -rf $(VENV_NAME) .tox/ $(DOWNLOAD_DIR) $(DOCS_DIR)/build/ dist/ build/
114+
run/linux: virtualenv
115+
$(PYTHON) src/main.py
116+
117+
run: run/linux
117118

118119
test:
119120
$(TOX)
@@ -122,25 +123,38 @@ uitest: virtualenv
122123
$(PIP) install -r requirements/test_requirements.txt
123124
PYTHONPATH=src $(PYTHON) -m unittest discover --top-level-directory=. --start-directory=tests/ui/
124125

125-
isort-check:
126+
isort-check: virtualenv
126127
$(ISORT) --check-only --recursive --diff $(SOURCES)
127128

128-
isort-fix:
129+
isort-fix: virtualenv
129130
$(ISORT) --recursive $(SOURCES)
130131

131-
flake8:
132+
flake8: virtualenv
132133
$(FLAKE8) $(SOURCES)
133134

134135
lint: isort-check flake8
135136

137+
docs/clean:
138+
rm -rf $(DOCS_DIR)/build/
139+
136140
docs:
137141
cd $(DOCS_DIR) && SPHINXBUILD=$(SPHINXBUILD) make html
138142

139-
release/build:
143+
release/clean:
140144
rm -rf dist/ build/
145+
146+
release/build: release/clean
141147
$(PYTHON) setup.py sdist bdist_wheel
142148
$(PYTHON) setup_meta.py sdist bdist_wheel
143149
$(TWINE) check dist/*
144150

145151
release/upload:
146152
$(TWINE) upload dist/*
153+
154+
clean: release/clean docs/clean
155+
py3clean src/
156+
find src/ -type d -name "__pycache__" -exec rm -r {} +
157+
find src/ -type d -name "*.egg-info" -exec rm -r {} +
158+
159+
clean/full: clean
160+
rm -rf $(VENV_NAME) .tox/ $(DOWNLOAD_DIR)

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ A full working demo is available in [src/main.py](https://github.com/kivy-garden
3232
### Ubuntu
3333
Install system requirements (Ubuntu 18.04):
3434
```sh
35-
sudo apt install libzbar-dev
35+
make system_dependencies
3636
```
3737

3838
Install garden requirements:
@@ -42,15 +42,17 @@ garden install --upgrade xcamera
4242

4343
Install zbarcam:
4444
```sh
45-
pip install --upgrade https://github.com/kivy-garden/zbarcam/archive/develop.zip
45+
pip install --upgrade zbarcam
4646
```
4747
Then import it in your Python code via:
4848
```python
4949
from kivy_garden.zbarcam import ZBarCam
5050
```
5151

52-
53-
You may also need to compile/install OpenCV manually, see [OpenCV.md](OpenCV.md).
52+
[OpenCV](OpenCV.md):
53+
```sh
54+
make opencv
55+
```
5456

5557
### Android
5658
Build for Android via buildozer, see [buildozer.spec](buildozer.spec).

buildozer.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ version.filename = %(source.dir)s/kivy_garden/zbarcam/version.py
3838
# comma seperated e.g. requirements = sqlite3,kivy
3939
requirements =
4040
android,
41-
kivy==5fc5385,
41+
kivy==1.11.1,
4242
libiconv,
4343
libzbar,
4444
Pillow==5.2.0,

doc/source/release.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ Start the release with git flow:
1010
```sh
1111
git flow release start YYYY.MMDD
1212
```
13-
Now update the [CHANGELOG.md](/CHANGELOG.md) `[Unreleased]` section to match the new release version.
13+
Now update the [CHANGELOG.md](https://github.com/kivy-garden/zbarcam/blob/develop/CHANGELOG.md)
14+
`[Unreleased]` section to match the new release version.
1415
Also update the `version` string from the
1516
[src/kivy_garden/zbarcam/version.py](https://github.com/kivy-garden/zbarcam/blob/develop/src/kivy_garden/zbarcam/version.py)
1617
file.
@@ -30,18 +31,18 @@ git push --tags
3031

3132
Build it:
3233
```sh
33-
python setup.py sdist bdist_wheel
34+
make release/build
3435
```
35-
Check archive content:
36+
This will build two packages, `kivy_garden.zbarcam` and the alias meta-package `zbarcam`.
37+
Also note we're running `twine check` on both archives.
38+
You can also check archive content manually via:
3639
```sh
3740
tar -tvf dist/kivy_garden.zbarcam-*.tar.gz
3841
```
39-
Twine check and upload:
42+
Last step is to upload both packages:
4043
```sh
41-
twine check dist/*
42-
twine upload dist/*
44+
make release/upload
4345
```
44-
Also publish the alias meta package `setup_meta.py`.
4546

4647
## Check Read the Docs
4748

requirements/requirements.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
pyzbar==0.1.8
2-
# 5fc5385 adds opencv 4 support
3-
https://github.com/kivy/kivy/archive/5fc5385.zip#egg=kivy
1+
Kivy==1.11.1
42
Kivy-Garden==0.1.4
5-
Pillow==5.2.0
63
numpy==1.16.1
4+
Pillow==5.2.0
5+
pyzbar==0.1.8

src/kivy_garden/zbarcam/version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
__version__ = '2019.0907'
1+
__version__ = '2019.0909'
22
# The `__version_code__` is used for the F-Droid auto update and should match
33
# the `versionCode` from the `build.gradle` file located in:
44
# `.buildozer/android/platform/build/dists/zbarcamdemo/`
55
# The auto update method used is the `HTTP`, see:
66
# https://f-droid.org/en/docs/Build_Metadata_Reference/#UpdateCheckMode
7-
__version_code__ = 721202807
7+
__version_code__ = 721202809

src/kivy_garden/zbarcam/zbarcam.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ def _setup(self):
8080
# `self.xcamera._camera` instance may not be available if e.g.
8181
# the `CAMERA` permission is not granted
8282
self.xcamera.bind(on_camera_ready=self._on_camera_ready)
83+
# camera may still be ready before we bind the event
84+
if self.xcamera._camera is not None:
85+
self._on_camera_ready(self.xcamera)
8386

8487
def _on_camera_ready(self, xcamera):
8588
"""

0 commit comments

Comments
 (0)