]> git.pld-linux.org Git - SPECS.git/blob - python3-pychromecast.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / python3-pychromecast.spec
1 # Conditional build:
2 %bcond_without  tests   # do not perform "make test"
3
4 # NOTES:
5 # - 'module' should match the Python import path (first component?)
6 # - 'egg_name' should equal to Python egg name
7 # - 'pypi_name' must match the Python Package Index name
8 %define         module          pychromecast
9 %define         egg_name        PyChromecast
10 %define         pypi_name       pychromecast
11 Summary:        Library for Python 3 to communicate with the Google Chromecast
12 Name:           python3-%{pypi_name}
13 Version:        4.1.0
14 Release:        2
15 License:        MIT
16 Group:          Libraries/Python
17 Source0:        https://github.com/balloob/pychromecast/archive/%{version}.tar.gz
18 # Source0-md5:  6f172ab76d8e7adcbbcf9a125b554cd2
19 URL:            https://github.com/balloob/pychromecast
20 BuildRequires:  python3-modules
21 BuildRequires:  python3-setuptools
22 BuildRequires:  rpm-pythonprov
23 BuildRequires:  rpmbuild(macros) >= 1.714
24 %if %{with tests}
25 BuildRequires:  python3-casttube
26 BuildRequires:  python3-zeroconf
27 %endif
28 Requires:       python3-modules
29 BuildArch:      noarch
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 Library for Python 3.4+ to communicate with the Google Chromecast. It
34 currently supports:
35
36 Auto discovering connected Chromecasts on the network Start the
37 default media receiver and play any online media Control playback of
38 current playing media Implement Google Chromecast api v2 Communicate
39 with apps via channels Easily extendable to add support for
40 unsupported namespaces Multi-room setups with Audio cast devices
41
42 %prep
43 %setup -q -n %{pypi_name}-%{version}
44
45 %build
46 %py3_build %{?with_tests:test}
47
48 %install
49 rm -rf $RPM_BUILD_ROOT
50
51 %py3_install
52
53 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{pypi_name}-%{version}
54 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{pypi_name}-%{version}
55 find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{pypi_name}-%{version} -name '*.py' \
56         | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
57
58 %clean
59 rm -rf $RPM_BUILD_ROOT
60
61 %files
62 %defattr(644,root,root,755)
63 %doc README.rst
64 %{py3_sitescriptdir}/%{module}
65 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
66 %{_examplesdir}/python3-%{pypi_name}-%{version}
This page took 0.335119 seconds and 3 git commands to generate.