From: | Sandeep Thakkar <sandeep(dot)thakkar(at)enterprisedb(dot)com> |
---|---|
To: | pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org> |
Subject: | Patches |
Date: | 2016-06-16 07:51:12 |
Message-ID: | CANFyU97JuuR=DsXQXNY_a=hTh0+5kbJyJthZxKJbaFP09iXsTw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
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 | Content-Type | Size |
---|---|---|
pgadmin-macbuild.patch | application/octet-stream | 1.0 KB |
pgadminpro.patch | application/octet-stream | 737 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Page | 2016-06-16 07:55:32 | pgAdmin 4 commit: Add files missed from previous commit. |
Previous Message | Dave Page | 2016-06-15 20:10:12 | Re: Patch for pgAdmin 4 docs |