Spaces:
Running
Running
File size: 996 Bytes
e230bfc |
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 |
from setuptools import setup, Extension
import numpy
import os
# Get absolute paths to OpenCV include and lib
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
OPENCV_DIR = os.path.join(BASE_DIR, 'opencv-install')
INCLUDE_DIRS = [
numpy.get_include(),
os.path.join(OPENCV_DIR, 'include'),
os.path.join(OPENCV_DIR, 'include', 'opencv4')
]
LIBRARY_DIRS = [os.path.join(OPENCV_DIR, 'lib')]
# Define the extension
_stasm = Extension(
'_stasm',
sources=[
'src/MOD_1/facedet.cpp', # adjust this to actual source files
'src/MOD_1/your_other_file.cpp'
],
include_dirs=INCLUDE_DIRS,
library_dirs=LIBRARY_DIRS,
libraries=[
'opencv_core',
'opencv_imgproc',
'opencv_highgui',
'opencv_imgcodecs'
],
extra_compile_args=['-std=c++11']
)
setup(
name='stasm',
version='2.0.2',
packages=['stasm', 'stasm.data'],
ext_modules=[_stasm],
install_requires=[
'numpy',
'docopt'
]
) |