]> git.sesse.net Git - vlc/blob - bindings/python/python-vlc.spec
python bindings: indicate that old python bindings are deprecated.
[vlc] / bindings / python / python-vlc.spec
1 %define name python-vlc
2 %define version 1.0.0.90
3 %define unmangled_version 1.0.0.90
4 %define release 1
5 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
6
7 Summary: VLC bindings for python.
8 Name: %{name}
9 Version: %{version}
10 Release: %{release}
11 Source0: %{name}-%{unmangled_version}.tar.gz
12 License: GPL
13 Group: Development/Libraries
14 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
15 Prefix: %{_prefix}
16 Vendor: Olivier Aubert <olivier.aubert@liris.cnrs.fr>
17 Url: http://wiki.videolan.org/PythonBinding
18
19 %description
20 VLC bindings for python.
21
22 This module provides bindings for the native libvlc API of the VLC
23 video player. Documentation can be found on the VLC wiki :
24 http://wiki.videolan.org/ExternalAPI
25
26 This module also provides a MediaControl object, which implements an
27 API inspired from the OMG Audio/Video Stream 1.0 specification.
28 Documentation can be found on the VLC wiki :
29 http://wiki.videolan.org/PythonBinding
30
31 Example session (for the MediaControl API):
32
33 import vlc
34 mc=vlc.MediaControl(['--verbose', '1'])
35 mc.playlist_add_item('movie.mpg')
36
37 # Start the movie at 2000ms
38 p=vlc.Position()
39 p.origin=vlc.RelativePosition
40 p.key=vlc.MediaTime
41 p.value=2000
42 mc.start(p)
43 # which could be abbreviated as
44 # mc.start(2000)
45 # for the default conversion from int is to make a RelativePosition in MediaTime
46
47 # Display some text during 2000ms
48 mc.display_text('Some useless information', 0, 2000)
49
50 # Pause the video
51 mc.pause(0)
52
53 # Get status information
54 mc.get_stream_information()
55        
56
57 %prep
58 %setup -n %{name}-%{unmangled_version}
59
60 %build
61 env CFLAGS="$RPM_OPT_FLAGS" python setup.py build
62
63 %install
64 python setup.py install --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
65
66 %clean
67 rm -rf $RPM_BUILD_ROOT
68
69 %files -f INSTALLED_FILES
70 %defattr(-,root,root)
71 %{python_sitelib}/vlcwidget.pyo