GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing crossenv.readthedocs.io — “Quick” Start — Crossenv 1.6.2 documentation “Quick” StartCross compiling can be challenging, and crossenv is focused only on one particular piece. As such, this section is not a complete guide. See also For CI purposes the crossenv project builds several docker images that contain appropriately configured build and host pythons for cross compilation. You may find these to be a useful starting point. Build build-pythonDon’t trust a build-python that you didn’t build yourself. The version of python that comes with a Linux distribution is usually patched by the maintainers in ways that are subtly incompatible with the stock Python source. Normally this isn’t an issue, but when using crossenv, build-python will end up running some of host-python’s (unpatched) code. The end result is one of many obscure errors. Build-python and host-python must be the exact same version. As above, one may need to execute the other’s bytecode, which only works if they have the same version. For general build instructions refer to the Python Developer’s Guide. You
don’t need a debug build, so At a minimum, you need zlib and openssl to build. Since build-python only
exists to build packages, you can often get away with leaving most optional
components disabled. It’s usually sufficient to build just enough to get pip
working, which requires the Build or obtain host-pythonIn this quick start we assume you are building host-python yourself. It is not a requirement to use the actual python that is on the target host – and in fact we don’t recommend it! The primary requirement is that the version must match the version of build-python. You will need to build any host dependencies beforehand. So, for example, if you want host-python to be able to communicate over a network, you may need to cross-compile OpenSSL. Building these dependencies is beyond the scope of this project. Building host-python requires a working build-python. We recommend putting
build-python in your $ PATH=/path/to/build-python/bin:$PATH \
./configure --prefix=/path/to/host-python \
--host=arm-linux-musleabihf \
--build=x86_64-linux-gnu \
--without-ensurepip \
ac_cv_buggy_getaddrinfo=no \
ac_cv_file__dev_ptmx=yes \
ac_cv_file__dev_ptc=no
$ make
$ make install
The –host option specifies the host triplet, such as The Make the cross environmentFirst install crossenv: $ /path/to/build-python/bin/pip3 install crossenv Build the cross-virtual environment: $ /path/to/build-python/bin/python3 -m crossenv \
/path/to/host-python/bin/python3 \
cross_venv
Activate the cross-virtual environment: $ . ./cross_venv/bin/activate Build something: (cross) $ pip install numpy (cross) $ python setup.py install Packages that you need at build time are best installed in build-python explicitly: (cross) $ build-pip install cffi (cross) $ pip install bcrypt (cross) $ build-pip install wheel (cross) $ python setup.py bdist_wheel Use the resulting packagesIt’s up to you to incorporate your cross-compiled module into your project. It
might be easiest to create a wheel, and then unzip it at the right location. If
you did a pip install you can find the installed libraries at
|
| You are visitor 01402605 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |