Hi,
I’m trying to use the python bindings to quid-proton to write a python AMQP
script. I have tried using it on Windows 10 (and 8.1), Ubuntu 14.04LTS, and Mac
OS X 10.10.5. Here are the problems I’m running into on each platform:
Mac OS X:
Brook:python-eh irjudson$ pip install python-qpid-proton
Collecting python-qpid-proton
Using cached python-qpid-proton-0.9.1.1.zip
Installing collected packages: python-qpid-proton
Running setup.py install for python-qpid-proton
Complete output from command /usr/local/opt/python/bin/python2.7 -c "import
setuptools,
tokenize;__file__='/private/var/folders/hg/8w56nx7x0m53051d3dlxh85c0000gn/T/pip-build-HRYEgV/python-qpid-proton/setup.py';exec(compile(getattr(tokenize,
'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))"
install --record
/var/folders/hg/8w56nx7x0m53051d3dlxh85c0000gn/T/pip-mDTz5f-record/install-record.txt
--single-version-externally-managed --compile:
running install
running build
running build_ext
running configure
building '_cproton' extension
swigging cproton.i to cproton_wrap.c
swig -python -threads -o cproton_wrap.c cproton.i
cproton.i:310: Error: Unable to find 'proton/cproton.i'
error: command 'swig' failed with exit status 1
----------------------------------------
Command "/usr/local/opt/python/bin/python2.7 -c "import setuptools,
tokenize;__file__='/private/var/folders/hg/8w56nx7x0m53051d3dlxh85c0000gn/T/pip-build-HRYEgV/python-qpid-proton/setup.py';exec(compile(getattr(tokenize,
'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))"
install --record
/var/folders/hg/8w56nx7x0m53051d3dlxh85c0000gn/T/pip-mDTz5f-record/install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in
/private/var/folders/hg/8w56nx7x0m53051d3dlxh85c0000gn/T/pip-build-HRYEgV/python-qpid-proton
Ubuntu 14.04LTS:
(dev)parallels@ubuntu:~/python-eh$ pip install python-qpid-proton
Collecting python-qpid-proton
/home/parallels/python-eh/dev/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90:
InsecurePlatformWarning: A true SSLContext object is not available. This
prevents urllib3 from configuring SSL appropriately and may cause certain SSL
connections to fail. For more information, see
https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Using cached python-qpid-proton-0.9.1.1.zip
Building wheels for collected packages: python-qpid-proton
Running setup.py bdist_wheel for python-qpid-proton
Complete output from command /home/parallels/python-eh/dev/bin/python -c
"import
setuptools;__file__='/tmp/pip-build-tY21QC/python-qpid-proton/setup.py';exec(compile(open(__file__).read().replace('\r\n',
'\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpfuORP3pip-wheel-:
running bdist_wheel
running build
running build_ext
running configure
Using libqpid-proton (found via pkg-config).
Using libqpid-proton (found via pkg-config).
building '_cproton' extension
swigging cproton.i to cproton_wrap.c
swig -python -threads -I/usr/include -I/usr/local/include -o cproton_wrap.c
cproton.i
creating build
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2
-Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c cproton_wrap.c -o
build/temp.linux-x86_64-2.7/cproton_wrap.o
cproton_wrap.c: In function ‘wrap_pn_delivery’:
cproton_wrap.c:3329:5: error: too few arguments to function ‘pn_dtag’
return pn_delivery(link, pn_dtag(STRING, LENGTH));
^
In file included from /usr/include/proton/engine.h:38:0,
from cproton_wrap.c:3023:
/usr/include/proton/delivery.h:65:33: note: declared here
static inline pn_delivery_tag_t pn_dtag(const char *bytes, size_t size,
uint32_t format) {
^
cproton_wrap.c: In function ‘_wrap_pn_messenger’:
cproton_wrap.c:16044:35: warning: the comparison will always evaluate as
‘true’ for the address of ‘pn_message’ will never be NULL [-Waddress]
SWIG_contract_assert((pn_message!=NULL), "Contract violation: ensure:
(pn_message!=NULL)");
^
cproton_wrap.c:2908:47: note: in definition of macro ‘SWIG_contract_assert’
#define SWIG_contract_assert(expr, msg) if (!(expr)) {
SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
^
cproton_wrap.c: At top level:
cproton_wrap.c:7786:12: warning: ‘check_state’ defined but not used
[-Wunused-function]
static int check_state(int x) {
^
cproton_wrap.c:7797:12: warning: ‘check_disposition’ defined but not used
[-Wunused-function]
static int check_disposition(int x) {
^
cproton_wrap.c:7808:12: warning: ‘check_trace’ defined but not used
[-Wunused-function]
static int check_trace(int x) {
^
cproton_wrap.c: In function ‘wrap_pn_delivery’:
cproton_wrap.c:3330:3: warning: control reaches end of non-void function
[-Wreturn-type]
}
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for python-qpid-proton
Failed to build python-qpid-proton
Installing collected packages: python-qpid-proton
Running setup.py install for python-qpid-proton
Complete output from command /home/parallels/python-eh/dev/bin/python -c
"import setuptools,
tokenize;__file__='/tmp/pip-build-tY21QC/python-qpid-proton/setup.py';exec(compile(getattr(tokenize,
'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))"
install --record /tmp/pip-ZAMLQT-record/install-record.txt
--single-version-externally-managed --compile --install-headers
/home/parallels/python-eh/dev/include/site/python2.7/python-qpid-proton:
running install
running build
running build_ext
running configure
Using libqpid-proton (found via pkg-config).
Using libqpid-proton (found via pkg-config).
building '_cproton' extension
swigging cproton.i to cproton_wrap.c
swig -python -threads -I/usr/include -I/usr/local/include -o cproton_wrap.c
cproton.i
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2
-Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c cproton_wrap.c -o
build/temp.linux-x86_64-2.7/cproton_wrap.o
cproton_wrap.c: In function ‘wrap_pn_delivery’:
cproton_wrap.c:3329:5: error: too few arguments to function ‘pn_dtag’
return pn_delivery(link, pn_dtag(STRING, LENGTH));
^
In file included from /usr/include/proton/engine.h:38:0,
from cproton_wrap.c:3023:
/usr/include/proton/delivery.h:65:33: note: declared here
static inline pn_delivery_tag_t pn_dtag(const char *bytes, size_t size,
uint32_t format) {
^
cproton_wrap.c: In function ‘_wrap_pn_messenger’:
cproton_wrap.c:16044:35: warning: the comparison will always evaluate as
‘true’ for the address of ‘pn_message’ will never be NULL [-Waddress]
SWIG_contract_assert((pn_message!=NULL), "Contract violation: ensure:
(pn_message!=NULL)");
^
cproton_wrap.c:2908:47: note: in definition of macro ‘SWIG_contract_assert’
#define SWIG_contract_assert(expr, msg) if (!(expr)) {
SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
^
cproton_wrap.c: At top level:
cproton_wrap.c:7786:12: warning: ‘check_state’ defined but not used
[-Wunused-function]
static int check_state(int x) {
^
cproton_wrap.c:7797:12: warning: ‘check_disposition’ defined but not used
[-Wunused-function]
static int check_disposition(int x) {
^
cproton_wrap.c:7808:12: warning: ‘check_trace’ defined but not used
[-Wunused-function]
static int check_trace(int x) {
^
cproton_wrap.c: In function ‘wrap_pn_delivery’:
cproton_wrap.c:3330:3: warning: control reaches end of non-void function
[-Wreturn-type]
}
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/home/parallels/python-eh/dev/bin/python -c "import setuptools,
tokenize;__file__='/tmp/pip-build-tY21QC/python-qpid-proton/setup.py';exec(compile(getattr(tokenize,
'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))"
install --record /tmp/pip-ZAMLQT-record/install-record.txt
--single-version-externally-managed --compile --install-headers
/home/parallels/python-eh/dev/include/site/python2.7/python-qpid-proton" failed
with error code 1 in /tmp/pip-build-tY21QC/python-qpid-proton
/home/parallels/python-eh/dev/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90:
InsecurePlatformWarning: A true SSLContext object is not available. This
prevents urllib3 from configuring SSL appropriately and may cause certain SSL
connections to fail. For more information, see
https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
And finally, windows 10, visual studio 2015:
Installing 'python-qpid-proton'
Downloading/unpacking python-qpid-proton
Running setup.py (path:c:\users\ivanjud\documents\visual studio
2015\Projects\AzureCloudService1\WorkerRole1\env\build\python-qpid-proton\setup.py)
egg_info for package python-qpid-proton
file cproton.py (for module cproton) not found
Installing collected packages: python-qpid-proton
Running setup.py install for python-qpid-proton
building '_cproton' extension
swigging cproton.i to cproton_wrap.c
C:\ProgramData\chocolatey\bin\swig.exe -python -threads -o cproton_wrap.c
cproton.i
cproton.i(310) : Error: Unable to find 'proton\cproton.i'
error: command 'C:\\ProgramData\\chocolatey\\bin\\swig.exe' failed with
exit status 1
Complete output from command "c:\users\ivanjud\documents\visual studio
2015\Projects\AzureCloudService1\WorkerRole1\env\Scripts\python.exe" -c "import
setuptools, tokenize;__file__='c:\\users\\ivanjud\\documents\\visual studio
2015\\Projects\\AzureCloudService1\\WorkerRole1\\env\\build\\python-qpid-proton\\setup.py';exec(compile(getattr(tokenize,
'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))"
install --record
c:\users\ivanjud\appdata\local\temp\pip-xzjsaa-record\install-record.txt
--single-version-externally-managed --compile --install-headers
"c:\users\ivanjud\documents\visual studio
2015\Projects\AzureCloudService1\WorkerRole1\env\include\site\python2.7":
running install
running build
running build_ext
running configure
building '_cproton' extension
swigging cproton.i to cproton_wrap.c
C:\ProgramData\chocolatey\bin\swig.exe -python -threads -o cproton_wrap.c
cproton.i
cproton.i(310) : Error: Unable to find 'proton\cproton.i'
error: command 'C:\\ProgramData\\chocolatey\\bin\\swig.exe' failed with exit
status 1
----------------------------------------
Cleaning up...
Command "c:\users\ivanjud\documents\visual studio
2015\Projects\AzureCloudService1\WorkerRole1\env\Scripts\python.exe" -c "import
setuptools, tokenize;__file__='c:\\users\\ivanjud\\documents\\visual studio
2015\\Projects\\AzureCloudService1\\WorkerRole1\\env\\build\\python-qpid-proton\\setup.py';exec(compile(getattr(tokenize,
'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))"
install --record
c:\users\ivanjud\appdata\local\temp\pip-xzjsaa-record\install-record.txt
--single-version-externally-managed --compile --install-headers
"c:\users\ivanjud\documents\visual studio
2015\Projects\AzureCloudService1\WorkerRole1\env\include\site\python2.7" failed
with error code 1 in c:\users\ivanjud\documents\visual studio
2015\Projects\AzureCloudService1\WorkerRole1\env\build\python-qpid-proton
Storing debug log for failure in C:\Users\ivanjud\pip\pip.log
'python-qpid-proton' failed to install. Exit code: 1
Any help would be appreciated — my end goal is to use this on windows, so
that’s preferred, but I’m willing to work on which ever platform is easiest
(first).
-Ivan
Ivan R. Judson, PhD
Microsoft
+1 (425) 679-1375 | [email protected]<mailto:[email protected]>
| http://irjudson.org/