2 %bcond_without tests # unit tests
3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
6 %define module casttube
7 %define egg_name casttube
8 %define pypi_name casttube
9 Summary: casttube provides a way to interact with the Youtube Chromecast api
10 Name: python-%{module}
14 Group: Libraries/Python
15 Source0: https://pypi.debian.net/casttube/%{pypi_name}-%{version}.tar.gz
16 # Source0-md5: 4bb24ba1639d16c8fa367537bf3b88a6
17 URL: https://pypi.org/project/casttube/
18 BuildRequires: rpm-pythonprov
19 BuildRequires: rpmbuild(macros) >= 1.714
21 BuildRequires: python-modules
22 BuildRequires: python-setuptools
25 BuildRequires: python3-modules
26 BuildRequires: python3-setuptools
28 Requires: python-modules
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 casttube provides a way to interact with the Youtube Chromecast api.
38 - Add video to the end of the play queue
41 - Clear the entire queue
43 %package -n python3-%{module}
44 Summary: casttube provides a way to interact with the Youtube Chromecast api
45 Group: Libraries/Python
46 Requires: python3-modules
48 %description -n python3-%{module}
49 casttube provides a way to interact with the Youtube Chromecast api.
54 - Add video to the end of the play queue
57 - Clear the entire queue
60 %setup -q -n %{pypi_name}-%{version}
64 %py_build %{?with_tests:test}
68 %py3_build %{?with_tests:test}
72 rm -rf $RPM_BUILD_ROOT
83 rm -rf $RPM_BUILD_ROOT
87 %defattr(644,root,root,755)
89 %{py_sitescriptdir}/%{module}
90 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
94 %files -n python3-%{module}
95 %defattr(644,root,root,755)
97 %{py3_sitescriptdir}/%{module}
98 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info