NihalGazi commited on
Commit
e230bfc
·
verified ·
1 Parent(s): 3cedcc7

Rename setup.cfg to setup.py

Browse files
Files changed (2) hide show
  1. setup.cfg +0 -26
  2. setup.py +42 -0
setup.cfg DELETED
@@ -1,26 +0,0 @@
1
- from setuptools import setup, Extension
2
- import numpy
3
-
4
- opencv_include = "/path/to/opencv-install/include"
5
- opencv_libs = "/path/to/opencv-install/lib"
6
-
7
- _stasm = Extension(
8
- '_stasm',
9
- sources=['src/MOD_1/facedet.cpp', 'src/MOD_1/some_other_file.cpp'],
10
- include_dirs=[
11
- numpy.get_include(),
12
- opencv_include,
13
- opencv_include + '/opencv4'
14
- ],
15
- library_dirs=[opencv_libs],
16
- libraries=['opencv_core', 'opencv_imgproc', 'opencv_highgui', 'opencv_imgcodecs'],
17
- extra_compile_args=['-std=c++11']
18
- )
19
-
20
- setup(
21
- name='stasm',
22
- version='2.0.2',
23
- packages=['stasm', 'stasm.data'],
24
- ext_modules=[_stasm],
25
- install_requires=['numpy', 'docopt']
26
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
setup.py ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from setuptools import setup, Extension
2
+ import numpy
3
+ import os
4
+
5
+ # Get absolute paths to OpenCV include and lib
6
+ BASE_DIR = os.path.abspath(os.path.dirname(__file__))
7
+ OPENCV_DIR = os.path.join(BASE_DIR, 'opencv-install')
8
+ INCLUDE_DIRS = [
9
+ numpy.get_include(),
10
+ os.path.join(OPENCV_DIR, 'include'),
11
+ os.path.join(OPENCV_DIR, 'include', 'opencv4')
12
+ ]
13
+ LIBRARY_DIRS = [os.path.join(OPENCV_DIR, 'lib')]
14
+
15
+ # Define the extension
16
+ _stasm = Extension(
17
+ '_stasm',
18
+ sources=[
19
+ 'src/MOD_1/facedet.cpp', # adjust this to actual source files
20
+ 'src/MOD_1/your_other_file.cpp'
21
+ ],
22
+ include_dirs=INCLUDE_DIRS,
23
+ library_dirs=LIBRARY_DIRS,
24
+ libraries=[
25
+ 'opencv_core',
26
+ 'opencv_imgproc',
27
+ 'opencv_highgui',
28
+ 'opencv_imgcodecs'
29
+ ],
30
+ extra_compile_args=['-std=c++11']
31
+ )
32
+
33
+ setup(
34
+ name='stasm',
35
+ version='2.0.2',
36
+ packages=['stasm', 'stasm.data'],
37
+ ext_modules=[_stasm],
38
+ install_requires=[
39
+ 'numpy',
40
+ 'docopt'
41
+ ]
42
+ )