forked from LukasBommes/mv-extractor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·43 lines (38 loc) · 1.45 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
from setuptools import find_packages, setup, Extension
import pkgconfig
import numpy as np
d = pkgconfig.parse('libavformat libswscale opencv4')
print("Numpy dir: ", np.get_include())
mvextractor = Extension('mvextractor.videocap',
include_dirs = [
*d['include_dirs'],
np.get_include()
],
library_dirs = d['library_dirs'],
libraries = d['libraries'],
sources = [
'src/mvextractor/py_video_cap.cpp',
'src/mvextractor/video_cap.cpp',
'src/mvextractor/time_cvt.cpp',
'src/mvextractor/mat_to_ndarray.cpp'
],
extra_compile_args = ['-std=c++11'],
extra_link_args = ['-fPIC', '-Wl,-Bsymbolic'])
setup(name='motion-vector-extractor',
author='Lukas Bommes',
author_email=' ',
version="1.0.6",
license='MIT',
url='https://github.com/LukasBommes/mv-extractor',
description=('Reads video frames and MPEG-4/H.264 motion vectors.'),
keywords=['motion vector', 'video capture', 'mpeg4', 'h.264', 'compressed domain'],
ext_modules=[mvextractor],
packages=find_packages(where='src'),
package_dir={'': 'src'},
entry_points={
'console_scripts': [
'extract_mvs=mvextractor.__main__:main',
],
},
python_requires='>=3.8, <4',
install_requires=['pkgconfig>=1.5.1', 'numpy>=1.17.0', 'opencv-python>=4.1.0.25,<4.6'])