python-m2crypto.mk 1.1 KB

12345678910111213141516171819202122232425262728
  1. ################################################################################
  2. #
  3. # python-m2crypto
  4. #
  5. ################################################################################
  6. PYTHON_M2CRYPTO_VERSION = 0.22.5
  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. # We need to use python2 because m2crypto is not python3 compliant.
  12. HOST_PYTHON_M2CRYPTO_NEEDS_HOST_PYTHON = python2
  13. # The --openssl option that allows to specify a custom path to OpenSSL
  14. # can only be used with the non-default build_ext setup.py command,
  15. # and calling this command directly fails. To work around this, simply
  16. # hardcode the path to OpenSSL in setup.py.
  17. # Bug reported at https://gitlab.com/m2crypto/m2crypto/issues/89
  18. define HOST_PYTHON_M2CRYPTO_SET_OPENSSL_PATH
  19. $(SED) "s%self.openssl = '/usr'%self.openssl = '$(HOST_DIR)/usr'%" \
  20. $(@D)/setup.py
  21. endef
  22. HOST_PYTHON_M2CRYPTO_POST_PATCH_HOOKS += HOST_PYTHON_M2CRYPTO_SET_OPENSSL_PATH
  23. $(eval $(host-python-package))