summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO18
-rw-r--r--CHANGELOG.md57
-rw-r--r--PKGBUILD35
3 files changed, 90 insertions, 20 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e9ac9406b7c0..847b0f68ce8f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,20 @@
pkgbase = python-phue
- pkgdesc = A Python library for the Philips Hue system
+ pkgdesc = Python library for the Philips Hue system
pkgver = 1.1
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/studioimaginaire/phue
+ changelog = CHANGELOG.md
arch = any
license = MIT
- makedepends = python
+ checkdepends = python-pytest
+ checkdepends = python-mock
+ checkdepends = python-testtools
+ makedepends = python-build
+ makedepends = python-installer
makedepends = python-setuptools
+ makedepends = python-wheel
depends = python
- source = https://github.com/studioimaginaire/phue/archive/1.1.tar.gz
- md5sums = 2c3303552b4f762d780deda26aedc507
+ source = python-phue-1.1.tar.gz::https://github.com/studioimaginaire/phue/archive/1.1.tar.gz
+ sha256sums = 245bc176176a1ceb8d2065a6f07f53754fbe03f2a000dbeb01ab922e50e55d0a
pkgname = python-phue
- depends = python
-
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 000000000000..155a0075fa2c
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,57 @@
+# phue changelog
+
+## r11
+- Add support for deleting scenes
+- Various bug fixes
+
+## r10
+- Misc bug fixes
+- Better support for schedules
+
+## r9
+- Added unit tests (sdague)
+- Added scene support (sdague)
+- Added sensor support (eldstal)
+- Added reachable and type attributes to the Light object (carlosperate)
+- Changed License to MIT
+
+## r8
+- iOS compatibility (Nathanaël Lécaudé)
+- Logging fixes
+- Added effect changing options (bradykent)
+- Several unicode fixes (Nathanaël Lécaudé)
+- Misc bug fixes
+
+## r7
+- Added to pypi
+- Added support for Python 3 (Nathanaël Lécaudé)
+- Logging level can be set with b.set_logging() (Nathanaël Lécaudé)
+- Logging level can be set at init: b = Bridge(logging = 'debug') (Nathanaël Lécaudé)
+- Added docstrings to Light properties (Nathanaël Lécaudé)
+- Added colormode property to Light class (Nathanaël Lécaudé)
+- IP is now optional if present in config file (Nathanaël Lécaudé)
+- Implemented groups (Nathanaël Lécaudé)
+- Implemented schedules (Nathanaël Lécaudé)
+- Renamed get_info to get_api (Nathanaël Lécaudé)
+- Renamed get_lights to get_light_objects (Nathanaël Lécaudé)
+- Renamed set_state and get_state to set_light and get_light (Nathanaël Lécaudé)
+- Fixed important bug when using set_state with a list of lights (Nathanaël Lécaudé)
+- Add access to Light objects via direct indexing of the Bridge object via __getitem__ (Marshall Perrin)
+- Implement real logging using Python's logging module, including error checking and display of responses from the server. (Marshall Perrin)
+- Add function colortemp_k for color temperatures in Kelvin. (Marshall Perrin)
+- Some additional error checking for invalid or missing parameters (Marshall Perrin)
+- More details in docstrings. (Marshall Perrin)
+
+
+## r6
+- Light objects are now obtained using the get_lights method
+- Added the alert method to the Light object
+- All requests now use httplib for consistency
+- Moved all source to github
+- Renamed the module to phue
+
+## r5
+ - Renamed the Bulb() object to Light() so it reflects the official API better
+ - You can now pass the username as argument to the Bridge class if you don't want to read/store to file
+ - You can now get the bridge name with brdige.name or set it with bridge.name = 'newname'
+ - The set_state method can now use a dictionary as first argument to send more complex messages
diff --git a/PKGBUILD b/PKGBUILD
index fa6556f1a86f..233169abd108 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,27 +1,36 @@
-# Maintainer: Felix Golatofski <contact@xdfr.de>
+# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
+# Contributor: Felix Golatofski <contact@xdfr.de>
# Contributor: David Baum <david.baum@naraesk.eu>
pkgname=python-phue
-_module='phue'
+_pkg="${pkgname#python-}"
pkgver=1.1
-pkgrel=1
-pkgdesc="A Python library for the Philips Hue system"
+pkgrel=2
+pkgdesc="Python library for the Philips Hue system"
arch=('any')
url="https://github.com/studioimaginaire/phue"
license=('MIT')
depends=('python')
-makedepends=('python' 'python-setuptools')
-source=("https://github.com/studioimaginaire/phue/archive/${pkgver}.tar.gz")
-md5sums=('2c3303552b4f762d780deda26aedc507')
+makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
+checkdepends=('python-pytest' 'python-mock' 'python-testtools')
+changelog=CHANGELOG.md
+source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
+sha256sums=('245bc176176a1ceb8d2065a6f07f53754fbe03f2a000dbeb01ab922e50e55d0a')
build() {
- cd "${srcdir}/${_module}-${pkgver}"
- python setup.py build
+ cd "$_pkg-$pkgver"
+ python -m build --wheel --no-isolation
+}
+
+check() {
+ cd "$_pkg-$pkgver"
+ PYTHONPATH="$PWD" pytest -x
}
package() {
- depends+=()
- cd "${srcdir}/${_module}-${pkgver}"
- install -Dm644 $srcdir/${_module}-${pkgver}/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
- python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
+ cd "$_pkg-$pkgver"
+ PYTHONHASHSEED=0 python -m installer --destdir="$pkgdir" dist/*.whl
+ local _site="$(python -c 'import site; print(site.getsitepackages()[0])')"
+ install -d "$pkgdir/usr/share/licenses/$pkgname/"
+ ln -s "$_site/$_pkg-$pkgver.dist-info/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/"
}