On Sat, Jan 28, 2017 at 1:00 AM, Jan Alexander Steffens <jan.steff...@gmail.com> wrote: > On Fri, Jan 27, 2017 at 5:56 PM Dave Page <dp...@pgadmin.org> wrote: >> >> On Fri, Jan 27, 2017 at 1:37 PM, Jan Alexander Steffens >> <jan.steff...@gmail.com> wrote: >> > I did mean Py_SetPath, not PySys_SetPath. >> >> Ah, OK - it wouldn't compile with that (Python 2 :-/ ) so I assumed it >> was a typo. >> >> > Unfortunately, after checking >> > again it turns out this is Python 3 only. Python 2 has no means of >> > changing >> > the module_search_path from outside. So, there it definitely needs a >> > restart. :-( >> >> Yeah :-(. How does the attached patch look to you? > > > Looks good to me, thanks! I've tested both selecting a venv and the > venv-beside-runtime.
Cool. So we have a release coming up next wee so I'm going to put this on hold for now, as we need to make some non-trivial changes to make this work in the Windows and Mac packages: - On Windows, the Python executable is shipped in the runtime directory, not as part of the venv. - On Mac, we don't ship the Python executable at all as we expect it to be on the system anyway. Adding it to the package is not a simple case of just adding the required files: App: pgAdmin 4.app: Post-processing: .//Contents/Resources/venv/.Python Rewriting library /System/Library/Frameworks/Python.framework/Versions/2.7/Python to @loader_path/../../../Contents/Frameworks/Python.framework/Versions/2.7/Python in .//Contents/Resources/venv/.Python install_name_tool -change /System/Library/Frameworks/Python.framework/Versions/2.7/Python @loader_path/../../../Contents/Frameworks/Python.framework/Versions/2.7/Python .//Contents/Resources/venv/.Python error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open input file: .//Contents/Resources/venv/.Python for writing (Operation not permitted) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't lseek to offset: 4096 in file: .//Contents/Resources/venv/.Python for writing (Bad file descriptor) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't write new headers in file: .//Contents/Resources/venv/.Python (Bad file descriptor) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't lseek to offset: 1257472 in file: .//Contents/Resources/venv/.Python for writing (Bad file descriptor) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't write new headers in file: .//Contents/Resources/venv/.Python (Bad file descriptor) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't close written on input file: .//Contents/Resources/venv/.Python (Bad file descriptor) complete-bundle.sh failed make: *** [appbundle] Error 1 I've logged the work here: https://redmine.postgresql.org/issues/2123 -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers