Skip to content

Commit 10bf3a5

Browse files
committed
Manylinux1 wheels
Use "make manylinux1", you need to have docker installed. The library is not being imported correctly in Python 2.6 with this error: + /opt/python/cp26-cp26m/bin//python -c 'import librabbitmq' Traceback (most recent call last): File "<string>", line 1, in <module> File "/opt/python/cp26-cp26m/lib/python2.6/site-packages/librabbitmq/__init__.py", line 7, in <module> from amqp.protocol import queue_declare_ok_t File "/opt/python/cp26-cp26m/lib/python2.6/site-packages/amqp/__init__.py", line 48, in <module> from .basic_message import Message # noqa File "/opt/python/cp26-cp26m/lib/python2.6/site-packages/amqp/basic_message.py", line 29, in <module> from .serialization import GenericContent File "/opt/python/cp26-cp26m/lib/python2.6/site-packages/amqp/serialization.py", line 34, in <module> from .exceptions import FrameSyntaxError File "/opt/python/cp26-cp26m/lib/python2.6/site-packages/amqp/exceptions.py", line 21, in <module> from .five import python_2_unicode_compatible File "/opt/python/cp26-cp26m/lib/python2.6/site-packages/amqp/five.py", line 14, in <module> import vine.five File "/opt/python/cp26-cp26m/lib/python2.6/site-packages/vine/__init__.py", line 6, in <module> from .abstract import Thenable File "/opt/python/cp26-cp26m/lib/python2.6/site-packages/vine/abstract.py", line 7, in <module> from .five import with_metaclass File "/opt/python/cp26-cp26m/lib/python2.6/site-packages/vine/five.py", line 230 def with_metaclass(Type, skip_attrs={'__dict__', '__weakref__'}): ^ SyntaxError: invalid syntax Makefile:67: recipe for target 'manylinux1' failed make: *** [manylinux1] Error 1
1 parent 77b2321 commit 10bf3a5

7 files changed

+30
-0
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ $(RABBIT_TARGET):
6363

6464
dist: rabbitmq-c $(RABBIT_TARGET)
6565

66+
manylinux1: dist
67+
docker run --rm -v `pwd`:/workspace:z quay.io/pypa/manylinux1_x86_64 /workspace/build-manylinux1-wheels.sh
6668

6769
rebuild:
6870
python setup.py build

build-manylinux1-wheels.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
# Script modified from https://github.com/pypa/python-manylinux-demo
3+
set -e -x
4+
5+
# Install a system package required by our library
6+
yum install -y librabbmitmq-devel make librabbitmq python-dev gcc automake
7+
8+
9+
# Compile wheels
10+
for PYBIN in /opt/python/*/bin; do
11+
#${PYBIN}/pip install -r /workspace/dev-requirements.txt
12+
${PYBIN}/pip wheel /workspace/ -w wheelhouse/
13+
done
14+
15+
# Bundle external shared libraries into the wheels
16+
#ls wheelhouse/*
17+
for whl in wheelhouse/*linux*.whl; do
18+
auditwheel repair $whl -w /workspace/wheelhouse/
19+
done
20+
21+
# Install packages and test
22+
for PYBIN in /opt/python/*/bin/; do
23+
${PYBIN}/pip install librabbitmq -f /workspace/wheelhouse
24+
${PYBIN}/python -c "import librabbitmq"
25+
#(cd $HOME; ${PYBIN}/nosetests pymanylinuxdemo)
26+
done

manylinux1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
docker run --rm -v `pwd`:/workspace:z quay.io/pypa/manylinux1_x86_64 /workspace/build-manylinux1-wheels.sh
2+
206 KB
Binary file not shown.
206 KB
Binary file not shown.
206 KB
Binary file not shown.
206 KB
Binary file not shown.

0 commit comments

Comments
 (0)