]> git.pld-linux.org Git - packages/python-pafy.git/blame - python-pafy.spec
up to 0.5.4
[packages/python-pafy.git] / python-pafy.spec
CommitLineData
59b2b248
ER
1#
2# Conditional build:
3%bcond_with doc # don't build doc
4%bcond_with tests # do not perform "make test"
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
8%define module pafy
9%define egg_name pafy
10%define pypi_name pafy
11Summary: Retrieve YouTube content and metadata
12Name: python-%{pypi_name}
69f071dc
JP
13Version: 0.5.4
14Release: 1
59b2b248
ER
15License: LGPLv3
16Group: Libraries/Python
17Source0: https://files.pythonhosted.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
69f071dc 18# Source0-md5: 092930504c7e4fcea30b7446fa1878c7
59b2b248
ER
19URL: http://np1.github.io/pafy/
20BuildRequires: rpm-pythonprov
21BuildRequires: rpmbuild(macros) >= 1.714
22%if %{with python2}
23BuildRequires: python-modules
24BuildRequires: python-setuptools
25%endif
26%if %{with python3}
27BuildRequires: python3-modules
28BuildRequires: python3-setuptools
29%endif
30Requires: python-modules
31Suggests: youtube-dl
32BuildArch: noarch
33BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35%description
36Features:
37
38- Retreive metadata such as viewcount, duration, rating, author,
39 thumbnail, keywords
40- Download video or audio at requested resolution / bitrate / format /
41 filesize
42- Command line tool (ytdl) for downloading directly from the command
43 line
44- Retrieve the URL to stream the video in a player such as vlc or
45 mplayer
46- Works with age-restricted videos and non-embeddable videos
47- Small, standalone, single importable module file (pafy.py)
48- Select highest quality stream for download or streaming
49- Download video only (no audio) in m4v or webm format
50- Download audio only (no video) in ogg or m4a format
51- Retreive playlists and playlist metadata
52- Works with Python 2.6+ and 3.3+
53- Optionally depends on youtube-dl (recommended; more stable)
54
55%description -l pl.UTF-8
56
57%package -n python3-%{module}
58Summary: -
59Summary(pl.UTF-8): -
60Group: Libraries/Python
61Requires: python3-modules
62
63%description -n python3-%{module}
64
65%description -n python3-%{module} -l pl.UTF-8
66
67%package apidocs
68Summary: %{module} API documentation
69Summary(pl.UTF-8): Dokumentacja API %{module}
70Group: Documentation
71
72%description apidocs
73API documentation for %{module}.
74
75%description apidocs -l pl.UTF-8
76Dokumentacja API %{module}.
77
78%prep
79%setup -q -n %{pypi_name}-%{version}
80
81rm -r %{egg_name}.egg-info
82
83%build
84%if %{with python2}
85%py_build %{?with_tests:test}
86%endif
87
88%if %{with python3}
89%py3_build %{?with_tests:test}
90%endif
91
92%if %{with doc}
93cd docs
94%{__make} -j1 html
95rm -rf _build/html/_sources
96%endif
97
98%install
99rm -rf $RPM_BUILD_ROOT
100%if %{with python2}
101%py_install
102%py_postclean
103
104mv $RPM_BUILD_ROOT%{_bindir}/ytdl{,2}
105%endif
106
107%if %{with python3}
108%py3_install
109mv $RPM_BUILD_ROOT%{_bindir}/ytdl{,3}
110%endif
111
112%clean
113rm -rf $RPM_BUILD_ROOT
114
115%if %{with python2}
116%files
117%defattr(644,root,root,755)
118%doc README.rst
119%attr(755,root,root) %{_bindir}/ytdl2
120%{py_sitescriptdir}/%{module}
121%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
122%endif
123
124%if %{with python3}
125%files -n python3-%{module}
126%defattr(644,root,root,755)
127%doc README.rst
128%attr(755,root,root) %{_bindir}/ytdl3
129%{py3_sitescriptdir}/%{module}
130%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
131%endif
132
133%if %{with doc}
134%files apidocs
135%defattr(644,root,root,755)
136%doc docs/_build/html/*
137%endif
This page took 0.078054 seconds and 4 git commands to generate.