python-crc16: convert to the Python package infrastructure
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 11 Dec 2013 20:26:38 +0000 (21:26 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Sun, 15 Dec 2013 12:36:24 +0000 (13:36 +0100)
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/python-crc16/python-crc16.mk

index adfdcc67ec22e7c22b72822c616ef77a47262d54..9dd09ae60d6e5325c368292cbb9792996a4801ee 100644 (file)
@@ -9,27 +9,6 @@ PYTHON_CRC16_SOURCE = crc16-$(PYTHON_CRC16_VERSION).tar.gz
 PYTHON_CRC16_SITE = http://pycrc16.googlecode.com/files/
 PYTHON_CRC16_LICENSE = LGPLv3+
 PYTHON_CRC16_LICENSE_FILES = COPYING.txt
-PYTHON_CRC16_DEPENDENCIES = python host-python
+PYTHON_CRC16_SETUP_TYPE = distutils
 
-PYTHON_CRC16_PARAMS = CC="$(TARGET_CC)" \
-               CFLAGS="$(TARGET_CFLAGS)" \
-               LDSHARED="$(TARGET_CC) -shared" \
-               LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib" \
-               CROSS_COMPILING=yes \
-               _python_sysroot=$(STAGING_DIR) \
-               _python_srcdir=$(PYTHON_DIR) \
-               _python_prefix=/usr \
-               _python_exec_prefix=/usr
-
-define PYTHON_CRC16_BUILD_CMDS
-       (cd $(@D); $(PYTHON_CRC16_PARAMS) \
-               $(HOST_DIR)/usr/bin/python setup.py build)
-endef
-
-define PYTHON_CRC16_INSTALL_TARGET_CMDS
-       (cd $(@D); $(PYTHON_CRC16_PARAMS) \
-               $(HOST_DIR)/usr/bin/python setup.py install \
-               --prefix=$(TARGET_DIR)/usr)
-endef
-
-$(eval $(generic-package))
+$(eval $(python-package))