Skip to content

Commit 4dc77fe

Browse files
author
LukasBommes
committed
fixed ld library path
1 parent a212694 commit 4dc77fe

File tree

4 files changed

+24
-89
lines changed

4 files changed

+24
-89
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/dist/
33
/*.egg-info
44
/*.egg
5+
.eggs
56
__pycache__/
67
/venv3.*/
78

Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,14 @@ COPY --from=builder /home/opencv/build/lib .
6363
# Set environment variables
6464
ENV PATH="$PATH:/home/bin"
6565
ENV PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/home/ffmpeg_build/lib/pkgconfig"
66+
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/opencv/build/lib"
6667

6768
WORKDIR /home/video_cap
6869

6970
COPY setup.py /home/video_cap
7071
COPY src /home/video_cap/src/
7172

72-
# Install video_cap Python module
73+
# Install Python package
7374
COPY vid.mp4 /home/video_cap
7475
RUN cd /home/video_cap && \
7576
python3 setup.py install

build_readme.md

-71
This file was deleted.

setup.py

+21-17
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import setuptools
2-
from distutils.core import setup, Extension
1+
from setuptools import setup, Extension
32
import pkgconfig
43
import numpy as np
54

@@ -8,27 +7,32 @@
87
print("Numpy dir: ", np.get_include())
98

109
mv_extractor = Extension('mv_extractor',
11-
include_dirs = ['/home/ffmpeg_sources/ffmpeg',
12-
*d['include_dirs'],
13-
np.get_include()],
14-
library_dirs = d['library_dirs'],
15-
libraries = d['libraries'],
16-
sources = ['src/py_video_cap.cpp',
17-
'src/video_cap.cpp',
18-
'src/time_cvt.cpp',
19-
'src/mat_to_ndarray.cpp'],
20-
extra_compile_args = ['-std=c++11'],
21-
extra_link_args = ['-fPIC', '-Wl,-Bsymbolic'])
10+
include_dirs = [
11+
'/home/ffmpeg_sources/ffmpeg',
12+
*d['include_dirs'],
13+
np.get_include()
14+
],
15+
library_dirs = d['library_dirs'],
16+
libraries = d['libraries'],
17+
sources = [
18+
'src/py_video_cap.cpp',
19+
'src/video_cap.cpp',
20+
'src/time_cvt.cpp',
21+
'src/mat_to_ndarray.cpp'
22+
],
23+
extra_compile_args = ['-std=c++11'],
24+
extra_link_args = ['-fPIC', '-Wl,-Bsymbolic'])
2225

2326
setup (name = 'mv_extractor',
24-
version = '1.0.0.7',
2527
author='Lukas Bommes',
2628
author_email=' ',
2729
license='MIT',
28-
url='https://github.com/LukasBommes/mv_extractor',
30+
url='https://github.com/LukasBommes/mv-extractor',
2931
description = ('Reads video frames and MPEG-4/H.264 motion vectors.'),
3032
keywords=['motion vector', 'video capture', 'mpeg4', 'h.264', 'compressed domain'],
3133
ext_modules = [mv_extractor],
32-
python_requires='>=3.6, <3.8',
33-
setup_requires=['wheel==0.33.6', 'numpy>=1.17.0,<1.18'],
34+
packages = ['mv_extractor'],
35+
package_dir = {'mv_extractor': 'src'},
36+
python_requires='>=3.6, <3.12',
37+
setup_requires=['wheel>=0.33.6', 'numpy>=1.17.0,<1.18'],
3438
install_requires=['pkgconfig>=1.5.1,<1.6', 'numpy>=1.17.0,<1.18', 'opencv-python>=4.1.0.25,<4.2'])

0 commit comments

Comments
 (0)