python-m2crypto.mk 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. ################################################################################
  2. #
  3. # python-m2crypto
  4. #
  5. ################################################################################
  6. PYTHON_M2CRYPTO_VERSION = 0.24.0
  7. PYTHON_M2CRYPTO_SITE = http://pypi.python.org/packages/source/M/M2Crypto
  8. PYTHON_M2CRYPTO_SOURCE = M2Crypto-$(PYTHON_M2CRYPTO_VERSION).tar.gz
  9. PYTHON_M2CRYPTO_SETUP_TYPE = setuptools
  10. HOST_PYTHON_M2CRYPTO_DEPENDENCIES = host-openssl host-swig
  11. PYTHON_M2CRYPTO_LICENSE = MIT
  12. PYTHON_M2CRYPTO_LICENSE_FILES = LICENCE
  13. # We need to use python2 because m2crypto is not python3 compliant.
  14. HOST_PYTHON_M2CRYPTO_NEEDS_HOST_PYTHON = python2
  15. # The --openssl option that allows to specify a custom path to OpenSSL
  16. # can only be used with the non-default build_ext setup.py command,
  17. # and calling this command directly fails. To work around this, simply
  18. # hardcode the path to OpenSSL in setup.py.
  19. # Bug reported at https://gitlab.com/m2crypto/m2crypto/issues/89
  20. define HOST_PYTHON_M2CRYPTO_SET_OPENSSL_PATH
  21. $(SED) "s%self.openssl = '/usr'%self.openssl = '$(HOST_DIR)/usr'%" \
  22. $(@D)/setup.py
  23. endef
  24. HOST_PYTHON_M2CRYPTO_POST_PATCH_HOOKS += HOST_PYTHON_M2CRYPTO_SET_OPENSSL_PATH
  25. $(eval $(host-python-package))