FaceSwap-Fast / setup.py
NihalGazi's picture
Rename setup.cfg to setup.py
e230bfc verified
raw
history blame contribute delete
996 Bytes
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'
]
)