lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

README.md (3134B)


      1 This package allows users to package python modules without creating package
      2 Makefiles for each individual module and their dependencies.  It provides a
      3 way making packaging python packages faster and may also facilitate the process
      4 of developing Makefiles for new python packages
      5 
      6 This is a raw DEVEL only package.  Using it may entail a lot of implementation
      7 details and you may need to resolve target dependencies and package details on
      8 your own
      9 
     10 - Third party python packages may depend on features not included in e.g.
     11   python-light
     12 - Some python modules may require host install of another module to progress,
     13   e.g. target cryptography requires host cffi
     14 - Some python modules have external C library dependencies, e.g. pyOpenSSL
     15   requires openssl libs
     16 - Some packages may have an autoconf configure script whose arguments we
     17   cannot control with pip and has to be passed on (hacked) by overriding some
     18   environment variables
     19 
     20 ## How it works
     21 
     22 1. Install host modules required for building target modules
     23 2. Install each target module to separate directories
     24 3. Install another copy of modules for cleanup purposes to make list of
     25    installed files to be removed from target modules installed in step 2
     26 
     27 Why should it be so
     28 
     29 1. Installing target cryptography requires host installation of cffi module
     30 2. cryptography requires setuptools and pip will install its own copy with
     31    --ignore-installed.  When PACKAGE_python-setuptools is also selected, opkg
     32    will complain of data file clashes if it was not removed here.
     33 
     34 Pip will handle dependency requirements of python modules, but external
     35 dependencies like c libraries has to be prepared by the build system.  The
     36 issue is that there is currently no way to express such dependencies, thus may
     37 cause build failure, e.g. pycrypto requires the presence of libgmp to build
     38 successfully.
     39 
     40 ## Tips
     41 
     42 If something goes wrong, we can add additional arguments to pip command
     43 line to check the detailed build process.  Some useful arguments may be
     44 
     45 - -v, for verbose output.  Repeat this option if the current level of
     46   verbosity is not enough
     47 - --no-clean, for preserving pip build dir on build failure
     48 
     49 ## Examples
     50 
     51 tornado (python-only module)
     52 
     53 	CONFIG_PACKAGE_python-packages=y
     54 	CONFIG_PACKAGE_python-packages-list="tornado==4.4.2"
     55 
     56 cryptography (requires installation of host modules and cleanup on target modules)
     57 
     58 	CONFIG_PACKAGE_python-packages=y
     59 	CONFIG_PACKAGE_python-packages-list-host="cffi"
     60 	CONFIG_PACKAGE_python-packages-list="cryptography"
     61 	CONFIG_PACKAGE_python-packages-list-cleanup="setuptools"
     62 
     63 pycrypto 2.7a1 (python module with autoconf configure script; depends on
     64 libgmp; broken wmmintrin.h).  2.6.1 does not work because of a flaw in
     65 the setup.py hardcoding host include directory
     66 
     67 	CONFIG_PACKAGE_libgmp=y
     68 	CONFIG_PACKAGE_python-packages=y
     69 	CONFIG_PACKAGE_python-packages-list="https://github.com/dlitz/pycrypto/archive/v2.7a1.tar.gz"
     70 	CONFIG_PACKAGE_python-packages-envs="ac_cv_header_wmmintrin_h=no build_alias=$(GNU_HOST_NAME) host_alias=$(GNU_TARGET_NAME) target_alias=$(GNU_TARGET_NAME)"
     71 	CONFIG_PACKAGE_python-packages-extra-deps="libgmp.so.10"
     72