15
0
forked from pool/python-phue

Accepting request 522158 from home:TheBlackCat:branches:devel:languages:python

- Implement single-spec version.
- Update to version 1.0.0
  * Misc bug fixes
  * Better support for schedules

OBS-URL: https://build.opensuse.org/request/show/522158
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-phue?expand=0&rev=3
This commit is contained in:
Todd R
2017-09-07 20:28:57 +00:00
committed by Git OBS Bridge
parent 802d8c4a2d
commit 3f2c78cf9b
4 changed files with 34 additions and 31 deletions

View File

@@ -16,50 +16,45 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-phue
Version: 0.9
Version: 1.0
Release: 0
Summary: A Philips Hue Python library
Summary: Philips Hue Python library
License: MIT
Group: Development/Languages/Python
Url: https://github.com/studioimaginaire/phue
Source: https://pypi.io/packages/source/p/phue/phue-%{version}.tar.gz
BuildRequires: python-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
Source: https://files.pythonhosted.org/packages/source/p/phue/phue-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildArch: noarch
%endif
%python_subpackages
%description
Full featured Python library to control the Philips Hue lighting system
Features:
- Compliant with the Philips Hue API 1.0
- Support for Lights
- Support for Groups
- Support for Schedules
- Support for Scenes
- Support for Sensors
- Compatible with Python 2.6.x and upwards
- Compatible with Python 3
- No dependencies
- Simple structure, single phue.py file
- Work in a procedural way or object oriented way
Full featured Python library to control the Philips Hue lighting system.
%prep
%setup -q -n phue-%{version}
%build
python setup.py build
%python_build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%python_install
%{python_expand chmod a+x %{buildroot}%{$python_sitelib}/phue.py
sed -i "s|^#!/usr/bin/python$|#!%__$python|" %{buildroot}%{$python_sitelib}/phue.py
$python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}
$python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}
%fdupes %{buildroot}%{$python_sitelib}
}
%files
%files %{python_files}
%defattr(-,root,root,-)
%{python_sitelib}/*
%{python_sitelib}/phue.py*
%{python_sitelib}/phue-%{version}-py*.egg-info
%pycache_only %{python_sitelib}/__pycache__/phue*.py*
%changelog