summaryrefslogtreecommitdiffstats
path: root/scripts/external_libs/prebuild/zmq/README.txt
blob: 0e4f284c533786fbc6e9221e618c69e013eb4a0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
How to build PyZMQ for your system
==================================

I'll desrcibe a harder task - how to build cross platform PyZMQ.
Building for current system will be much easier.

for the example I will build 32 bit Python 3 PyZMQ on a 64 bit machine.

1. build ZMQ library
    a. Unzip zeromq-4.0.2.tar.gz
    b. create a dir called zermoq-4.0.2-bin
    c  set CC, CXX, CXXLD, CFLAGS, CXXFLAGS and LDSHARED correctly if you need another toolchain
    d. configure: ./configure --prefix=zeromq-4.0.2-bin
    e. make -j64
    f. make install

now we have ZMQ binaries built to zeromq-4.0.2-bin


2. build PyZMQ

    a. unzip pyzmq-14.5.0
    b. create a dir called pyzmq-14.5.0-bin
    c. setenv LD_LIBRARY_PATH zeromq-4.0.2-bin/lib
    c. *FOR CROSS COMPILE* we need a setup.cfg file skip to D
        for non cross compile - you can simply run:
	python setup.py configure --zmq=zeromq-4.0.2-bin
	python setup.py build --prefix=pyzmq-14.5.0-bin


    d. *CROSS COMPILE*
       create a setup.cfg accroding to setup.cfg.template
       with include_libs, and directory_libs
       make sure they include the Python include/lib directories
       as well as ZMQ
       for example, for Python 3 i had to download the Python 3 development package


The final output:
prebuild/zmq/pyzmq-14.5.0-bin/lib/python3.4/site-packages/zmq