Hi,

I created virtual environment and tried building pgadmin on my Mac with
Python 3.3 and QT 5.5. I observed that in venv, the python3-config is
copied as python-config. Therefore, it's required to change pgAdmin4.pro to
handle this. With the existing .pro, it does not find the python3-config
and assumes it is Python2 and throws the following build error:
--






*Server.cpp:36:5: error: no matching function for call to
'Py_SetProgramName'
Py_SetProgramName(PGA_APP_NAME.toUtf8().data());/mnt/hgfs/pginstaller.pune/server/source/pgadmin.osx/mac-build/venv/include/python3.3m/pythonrun.h:25:18:
note: candidate function not viable: no known conversion from 'char *' to
'wchar_t *' for 1st      argumentPyAPI_FUNC(void) Py_SetProgramName(wchar_t
*);*
--

I have attached the patch (pgadminpro.patch) to fix this.

Another thing i observed is that in venv, the encodings directory in sym
linked to the actual one on the system and hence the build fails with the
following error:
--




*Could not find platform independent libraries <prefix>Could not find
platform dependent libraries <exec_prefix>Consider setting $PYTHONHOME to
<prefix>[:<exec_prefix>]Fatal Python error: Py_Initialize: unable to load
the file system codecImportError: No module named 'encodings'*
--

I have attached the patch (pgadmin-macbuild.patch) to make sure the
virtualenv for macbuild copies the required files instead of linking. In
the same patch, I also modified the build script to not rename the actual
directory of python in venv (as python libs may refer the actual directory)
and instead create a sym link. There might be other way to fix this, but I
found this to be easy. :)

Thanks!


--
Sandeep Thakkar

Attachment: pgadmin-macbuild.patch
Description: Binary data

Attachment: pgadminpro.patch
Description: Binary data

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

Reply via email to