Message ID | 1342774693-28905-1-git-send-email-spdawson@gmail.com |
---|---|
State | Accepted |
Headers | show |
Le Fri, 20 Jul 2012 09:58:12 +0100, spdawson@gmail.com a écrit : > From: Simon Dawson <spdawson@gmail.com> > > Signed-off-by: Simon Dawson <spdawson@gmail.com> Thanks, I have merged this, but I created a setup.py file to make the build and installation process more conventional. The thing that decided me to do this is that the package you proposed installed only .py files, and those are removed by default by Buildroot, which only keep .pyc files on the target. If you have the time, it would be nice to submit the setup.py to the upstream project. Thanks! Thomas
On 20 July 2012 20:10, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote: > If you have the time, it would be nice to submit the setup.py to the > upstream project. Thanks for your work on this Thomas. I'll see if I can get the setup script accepted upstream. Simon.
diff --git a/package/Config.in b/package/Config.in index d0daa18..46747d9 100644 --- a/package/Config.in +++ b/package/Config.in @@ -269,6 +269,7 @@ source "package/python-dpkt/Config.in" source "package/python-id3/Config.in" source "package/python-mad/Config.in" source "package/python-netifaces/Config.in" +source "package/python-nfc/Config.in" source "package/python-pygame/Config.in" source "package/python-serial/Config.in" source "package/python-setuptools/Config.in" diff --git a/package/python-nfc/Config.in b/package/python-nfc/Config.in new file mode 100644 index 0000000..c928ba1 --- /dev/null +++ b/package/python-nfc/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PYTHON_NFC + bool "python-nfc" + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_LIBUSB_COMPAT + help + Python module for near field communication. + + https://launchpad.net/nfcpy diff --git a/package/python-nfc/python-nfc.mk b/package/python-nfc/python-nfc.mk new file mode 100644 index 0000000..5a54eb0 --- /dev/null +++ b/package/python-nfc/python-nfc.mk @@ -0,0 +1,20 @@ +############################################################# +# +# python-nfc +# +############################################################# +PYTHON_NFC_VERSION = 112 +PYTHON_NFC_SITE = https://launchpad.net/nfcpy +PYTHON_NFC_SITE_METHOD = bzr +PYTHON_NFC_DEPENDENCIES = python libusb libusb-compat + +define PYTHON_NFC_INSTALL_TARGET_CMDS + $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/nfc + cp -a $(@D)/nfc $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR) +endef + +define PYTHON_NFC_UNINSTALL_TARGET_CMDS + $(RM) -r $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/nfc +endef + +$(eval $(generic-package))