forked from jnohlgard/python-v4l2capture
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
executable file
·59 lines (51 loc) · 1.89 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/python
#
# python-v4l2capture
#
# python-v4l2capture
# Python extension to capture video with video4linux2
#
# 2009, 2010, 2011 Fredrik Portstrom, released into the public domain
# 2011, Joakim Gebart
# 2013, Tim Sheerman-Chase
# See README for license
#SET VS90COMNTOOLS=%VS100COMNTOOLS%
#python setup.py build -c msvc
#python setup.py install
from distutils.core import Extension, setup
import os
debug = 0
if os.name == "nt":
if debug:
c_args=['/Zi', '/EHsc']
l_args=["/MANIFEST", "/DEBUG"]
else:
c_args=[]
l_args=["/MANIFEST"]
videolive = Extension("videolive", ["mfvideooutfile.cpp", "pixfmt.cpp", "libvideolive.cpp", "videoout.cpp", "videoin.cpp", "mfvideoin.cpp", "namedpipeout.cpp",
"videooutfile.cpp"],
define_macros=[('_'+os.name.upper(), None)],
library_dirs=['C:\Dev\Lib\libjpeg-turbo-win\lib', "C:\Dev\Lib\pthreads\pthreads.2"],
include_dirs=['C:\Dev\Lib\libjpeg-turbo-win\include', "C:\Dev\Lib\pthreads\pthreads.2"],
extra_compile_args=c_args,
extra_link_args=l_args,
libraries = ["pthreadVC2", "jpeg", "Mfplat", "Mf", "Mfreadwrite", "Ole32", "mfuuid", "Shlwapi"])
else:
videolive = Extension("videolive", ["v4l2capture.cpp", "v4l2out.cpp", "pixfmt.cpp", "libvideolive.cpp", "videoout.cpp", "videoin.cpp",
"videooutfile.cpp"],
define_macros=[('_'+os.name.upper(), None)],
libraries = ["v4l2", "pthread", "jpeg"])
setup(
name = "videolive",
version = "1.0",
author = "Tim Sheerman-Chase",
author_email = "info@kinatomic",
url = "http://www.kinatomic.com",
description = "Capture and stream video",
long_description = "Capture and stream video in python",
license = "GPL v2 or later",
classifiers = [
"License :: GPL",
"Programming Language :: C++"],
ext_modules = [videolive]
)