2013-06-05 23:53:30 +00:00
|
|
|
################################################################################
|
2013-04-29 08:57:48 +00:00
|
|
|
#
|
|
|
|
|
# python-m2crypto
|
|
|
|
|
#
|
2013-06-05 23:53:30 +00:00
|
|
|
################################################################################
|
2013-04-29 08:57:48 +00:00
|
|
|
|
2015-12-06 17:35:29 +01:00
|
|
|
PYTHON_M2CRYPTO_VERSION = 0.22.5
|
2013-04-29 08:57:48 +00:00
|
|
|
PYTHON_M2CRYPTO_SITE = http://pypi.python.org/packages/source/M/M2Crypto
|
|
|
|
|
PYTHON_M2CRYPTO_SOURCE = M2Crypto-$(PYTHON_M2CRYPTO_VERSION).tar.gz
|
2013-12-11 21:26:42 +01:00
|
|
|
PYTHON_M2CRYPTO_SETUP_TYPE = setuptools
|
|
|
|
|
HOST_PYTHON_M2CRYPTO_DEPENDENCIES = host-openssl host-swig
|
2013-04-29 08:57:48 +00:00
|
|
|
|
2014-03-05 23:04:44 +01:00
|
|
|
# We need to use python2 because m2crypto is not python3 compliant.
|
|
|
|
|
HOST_PYTHON_M2CRYPTO_NEEDS_HOST_PYTHON = python2
|
|
|
|
|
|
2015-12-06 17:35:29 +01:00
|
|
|
HOST_PYTHON_M2CRYPTO_BUILD_DIR = $(@D)/build/lib.linux-$(HOSTARCH)-$(PYTHON_VERSION_MAJOR)
|
|
|
|
|
|
2014-03-05 23:04:44 +01:00
|
|
|
# * We need to override the build commands to be able to use build_ext,
|
|
|
|
|
# which accepts the --openssl option.
|
|
|
|
|
# * Use python2 interpreter to avoid trying building some python3 objects.
|
2015-12-06 17:35:29 +01:00
|
|
|
# * because build_ext is flawed, is forgets to copy the files prior to
|
|
|
|
|
# the build, so we do it manually.
|
2013-04-29 08:57:48 +00:00
|
|
|
define HOST_PYTHON_M2CRYPTO_BUILD_CMDS
|
2015-12-06 17:35:29 +01:00
|
|
|
mkdir -p $(HOST_PYTHON_M2CRYPTO_BUILD_DIR)
|
|
|
|
|
cp -av $(@D)/M2Crypto $(HOST_PYTHON_M2CRYPTO_BUILD_DIR)/M2Crypto
|
2013-04-29 08:57:48 +00:00
|
|
|
(cd $(@D); \
|
2013-12-11 21:26:42 +01:00
|
|
|
$(HOST_PKG_PYTHON_SETUPTOOLS_ENV) \
|
2014-03-05 23:04:44 +01:00
|
|
|
$(HOST_DIR)/usr/bin/python2 setup.py build_ext \
|
2013-12-11 21:26:42 +01:00
|
|
|
--openssl=$(HOST_DIR)/usr)
|
2013-04-29 08:57:48 +00:00
|
|
|
endef
|
|
|
|
|
|
2013-12-11 21:26:42 +01:00
|
|
|
$(eval $(host-python-package))
|