File: cmake-fix-python-module-installdir

package info (click to toggle)
caffe-contrib 1.0.0%2Bgit20180821.99bd997-2
  • links: PTS, VCS
  • area: contrib
  • in suites: buster
  • size: 16,244 kB
  • sloc: cpp: 61,579; python: 5,783; makefile: 586; sh: 562
file content (30 lines) | stat: -rw-r--r-- 875 bytes parent folder | download | duplicates (2)
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
Purpose: fix python package file installation directory
Author: Zhou Mo
Forward: Don't forward, Debian-specific.
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -28,7 +28,7 @@
 
 # module
 install(DIRECTORY caffe
-    DESTINATION python
+    DESTINATION lib/python3/dist-packages
     FILES_MATCHING
     PATTERN "*.py"
     PATTERN "ilsvrc_2012_mean.npy"
@@ -36,5 +36,5 @@
     )
 
 # _caffe.so
-install(TARGETS pycaffe  DESTINATION python/caffe)
+install(TARGETS pycaffe  DESTINATION lib/python3/dist-packages/caffe)
 
--- a/src/caffe/CMakeLists.txt
+++ b/src/caffe/CMakeLists.txt
@@ -46,5 +46,5 @@
 
 file(WRITE ${PROJECT_BINARY_DIR}/__init__.py)
 list(APPEND proto_python ${PROJECT_BINARY_DIR}/__init__.py)
-install(PROGRAMS ${proto_python} DESTINATION python/caffe/proto)
+install(PROGRAMS ${proto_python} DESTINATION lib/python3/dist-packages/caffe/proto)