You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
3.1 KiB

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