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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190
|
Description: On Debian Python packages are stored in 'dist-packages', not
'site-packages'.
Author: Andrius Merkys <merkys@debian.org>
Forwarded: not-needed
--- a/cmake_support/CopyDependencies.cmake
+++ b/cmake_support/CopyDependencies.cmake
@@ -1012,7 +1012,7 @@
endif()
file(COPY ${python_libs} DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIB_DIR})
foreach( additional_directory $ENV{PYTHONPATH})
- file(COPY ${additional_directory}/ DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIB_DIR}/python${version}/site-packages PATTERN "*.pyc" EXCLUDE)
+ file(COPY ${additional_directory}/ DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIB_DIR}/python${version}/dist-packages PATTERN "*.pyc" EXCLUDE)
endforeach()
file(COPY ${python_root_dir}/bin/python${version} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
set(${new_binary_path} "${CMAKE_INSTALL_PREFIX}/bin/python${version}" PARENT_SCOPE)
--- a/deployment/macos/deps.py
+++ b/deployment/macos/deps.py
@@ -188,11 +188,11 @@
that ost was linked against the same version of Python
"""
for p in sys.path:
- pattern='/site-packages'
+ pattern='/dist-packages'
index=p.find(pattern)
if index>=0:
return p[:index+len(pattern)]
- raise RuntimeError("Couldn't determine site-packages location")
+ raise RuntimeError("Couldn't determine dist-packages location")
def get_python_module_path(module):
for path in sys.path:
@@ -239,7 +239,7 @@
# when running in non-gui mode, we are most likely missing the boost
# python library. Let's add it to the list of dependencies by
# inspecting "_ost_base.so".
- pymod_dir='lib/python%d.%d/site-packages' % sys.version_info[0:2]
+ pymod_dir='lib/python%d.%d/dist-packages' % sys.version_info[0:2]
_deps_for_lib(os.path.join(stage_dir, pymod_dir, 'ost/_ost_base.so'),
deps, recursive=False)
print('copying dependencies')
@@ -267,8 +267,8 @@
print('also copying python modules from %s' % python_home)
modules_dst=os.path.join(outdir, 'lib', os.path.basename(python_home))
shutil.copytree(python_home, modules_dst)
- if os.path.exists(os.path.join(modules_dst, 'site-packages')):
- shutil.rmtree(os.path.join(modules_dst, 'site-packages'))
+ if os.path.exists(os.path.join(modules_dst, 'dist-packages')):
+ shutil.rmtree(os.path.join(modules_dst, 'dist-packages'))
copy_binaries(os.path.join(python_home, '../..'), outdir,
['python'], [], 'bin')
python_bin=os.path.abspath(os.path.join(python_home, '../../bin/python'))
@@ -290,7 +290,7 @@
version_string=sys.version[0:3]
prefix, postfix=split_framework_components(python_home)
site_packages_dir=os.path.join(outdir, 'lib', 'Python.framework',
- postfix, 'site-packages')
+ postfix, 'dist-packages')
if os.path.exists(site_packages_dir):
shutil.rmtree(site_packages_dir)
for directory in glob.glob(os.path.join(framework_path, 'Versions/*')):
@@ -307,7 +307,7 @@
if no_includes:
os.system(REMOVE_HEADERS % outdir)
os.system(REMOVE_CURRENT % outdir)
- print('copying site-packages')
+ print('copying dist-packages')
for sp in SITE_PACKAGES:
src=get_python_module_path(sp)
if os.path.isdir(src):
--- a/deployment/macos/pack.py
+++ b/deployment/macos/pack.py
@@ -231,11 +231,11 @@
reasonable thing to do, as this script is most likely run with ost).
"""
for p in sys.path:
- pattern='/site-packages'
+ pattern='/dist-packages'
index=p.find(pattern)
if index>=0:
return p[:index+len(pattern)]
- raise RuntimeError("Couldn't determine site-packages location")
+ raise RuntimeError("Couldn't determine dist-packages location")
def get_python_module_path(module):
for path in sys.path:
@@ -263,7 +263,7 @@
self.libexec_dir=libexec_dir
self.libexec_scripts=libexec_scripts
self.pymod_dir=os.path.join('lib', 'python%d.%d' % sys.version_info[0:2],
- 'site-packages')
+ 'dist-packages')
self.modules=modules
self.libexec_binaries=[]
self.site_packages=[]
@@ -314,7 +314,7 @@
# when running in non-gui mode, we are most likely missing the boost
# python library. Let's add it to the list of dependencies by
# inspecting "_ost_base.so".
- pymod_dir='lib/python%d.%d/site-packages' % sys.version_info[0:2]
+ pymod_dir='lib/python%d.%d/dist-packages' % sys.version_info[0:2]
_deps_for_lib(os.path.join(self.root_dir, pymod_dir, 'ost/_ost_base.so'),
deps, recursive=False)
self.status('copying dependencies')
--- a/deployment/win/create_archive.bat.in
+++ b/deployment/win/create_archive.bat.in
@@ -11,7 +11,7 @@
if exist %archive_name%.zip del %archive_name%.zip*.*
REM dir /S %inst_dir%
mkdir "%inst_dir%\share\openstructure\examples"
-mkdir "%inst_dir%\lib\site-packages"
+mkdir "%inst_dir%\lib\dist-packages"
mkdir "%inst_dir%\bin"
xcopy /E /I /Y /EXCLUDE:exclude_file_types ..\..\examples "%inst_dir%\share\openstructure\examples"
xcopy /E /I /Y /EXCLUDE:exclude_file_types ..\..\stage\share "%inst_dir%\share\"
--- a/doc/conf/conf.py
+++ b/doc/conf/conf.py
@@ -13,7 +13,7 @@
import sys, os
-site_packs='python%d.%d/site-packages' % sys.version_info[0:2]
+site_packs='python%d/dist-packages' % sys.version_info[0]
# here we make sure that these paths are checked first...
# note that we probably should use cmake to set these paths (see PM3)
sys.path.insert(0, os.path.join(os.path.abspath('../../build'),
--- a/modules/gui/src/gosty.cc
+++ b/modules/gui/src/gosty.cc
@@ -107,14 +107,14 @@
String setup_python_search_path(const String& root, PythonInterpreter& pi)
{
std::stringstream site_pkgs;
- site_pkgs << "python" << PY_MAJOR_VERSION << "." << PY_MINOR_VERSION;
+ site_pkgs << "python" << PY_MAJOR_VERSION;
#ifdef _MSC_VER
- String loc=root+"\\lib\\"+site_pkgs.str()+"\\site-packages";
+ String loc=root+"\\lib\\"+site_pkgs.str()+"\\dist-packages";
#else
# if (defined(__ppc64__) || defined(__x86_64__)) && !defined(__APPLE__) && !OST_UBUNTU_LAYOUT
- String loc=root+"/lib64/"+site_pkgs.str()+"/site-packages";
+ String loc=root+"/lib64/"+site_pkgs.str()+"/dist-packages";
# else
- String loc=root+"/lib/"+site_pkgs.str()+"/site-packages";
+ String loc=root+"/lib/"+site_pkgs.str()+"/dist-packages";
# endif
#endif
pi.AppendModulePath(QString::fromStdString(loc));
--- a/scripts/dng.bat.in
+++ b/scripts/dng.bat.in
@@ -30,4 +30,4 @@
REM "%BIN_DIR%\@BUILD_TYPE@\gosty.exe" "%DNG_ROOT%\@LIBDIR@\openstructure\dng_startup" ost %*
set PATH=%BIN_DIR%;%DNG_ROOT%\@LIBDIR@\;%PATH%
-"%DNG_ROOT%\libexec\openstructure\gosty.exe" "%DNG_ROOT%\@LIBDIR@\python3.6\site-packages\ost\dng_startup" ost %*
+"%DNG_ROOT%\libexec\openstructure\gosty.exe" "%DNG_ROOT%\@LIBDIR@\python3.6\dist-packages\ost\dng_startup" ost %*
--- a/scripts/ost-nightly-build.sh
+++ b/scripts/ost-nightly-build.sh
@@ -148,9 +148,9 @@
'dirs': ["include/ost"],
}
-# add \$INSTALLDIR/lib64/python3.6/site-packages to PYTHONPATH
+# add \$INSTALLDIR/lib64/python3.6/dist-packages to PYTHONPATH
modextrapaths = {
- 'PYTHONPATH': 'lib64/python%s/site-packages' % (pythonshortversion)
+ 'PYTHONPATH': 'lib64/python%s/dist-packages' % (pythonshortversion)
}
# OST_ROOT env var points to install directory
--- a/scripts/ost_startup.py.in
+++ b/scripts/ost_startup.py.in
@@ -79,7 +79,7 @@
sys.exit(-1)
-_site_packs = "python%d.%d/site-packages" % sys.version_info[0:2]
+_site_packs = "python%d.%d/dist-packages" % sys.version_info[0:2]
_base_dir = os.getenv("DNG_ROOT")
sys.path.insert(0, os.path.join(_base_dir, "@LIBDIR@", _site_packs))
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -181,7 +181,7 @@
# Python needed before Boost
find_package(Python 3.6 REQUIRED COMPONENTS Interpreter Development)
# where Python modules live
-set(PYTHON_MODULE_PATH "python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages/")
+set(PYTHON_MODULE_PATH "python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/dist-packages/")
if(BOOST_VERSION)
message(STATUS "forcing boost to version ${BOOST_VERSION}")
|