Skip to contentSkip to conversation

New package: python-netifaces

Buildroot Peter Korsgaard 1 participant 1 message Jan 7, 2012

lore
Share & tools
lore
#0 lore raw

commit: http://git.buildroot.net/buildroot/commit/?id=221d609bcf6baed80ac07230e80da49d1522e069
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

---
 package/Config.in                                  |    1 +
 package/python-netifaces/Config.in                 |    8 +++
 .../python-netifaces-fix-cross-build.patch         |   54 ++++++++++++++++++++
 package/python-netifaces/python-netifaces.mk       |   25 +++++++++
 4 files changed, 88 insertions(+), 0 deletions(-)
package/Config.in +1 -0
index bfb6ac9..a82c658 100644
@@ -241,6 +241,7 @@ if BR2_PACKAGE_PYTHON
 menu "external python modules"
 source "package/python-dpkt/Config.in"
 source "package/python-mad/Config.in"
+source "package/python-netifaces/Config.in"
 source "package/python-serial/Config.in"
 source "package/python-setuptools/Config.in"
 endmenu
package/python-netifaces/Config.in new file +8 -0
new file mode 100644
index 0000000..b9d66d8
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_PYTHON_NETIFACES
+	bool "python-netifaces"
+	depends on BR2_PACKAGE_PYTHON
+	select BR2_PACKAGE_PYTHON_SETUPTOOLS
+	help
+	  Portable access to network interfaces from Python.
+
+	  http://alastairs-place.net/projects/netifaces
package/python-netifaces/python-netifaces-fix-cross-build.patch new file +54 -0

54 lines not on this page · raw message

package/python-netifaces/python-netifaces.mk new file +25 -0
new file mode 100644
index 0000000..e9a7099
@@ -0,0 +1,25 @@
+#############################################################
+#
+# python-netifaces
+#
+#############################################################
+
+PYTHON_NETIFACES_VERSION = 0.6
+PYTHON_NETIFACES_SOURCE  = netifaces-$(PYTHON_NETIFACES_VERSION).tar.gz
+PYTHON_NETIFACES_SITE    = http://alastairs-place.net/projects/netifaces
+
+PYTHON_NETIFACES_DEPENDENCIES = python host-python-setuptools host-python-distutilscross
+
+define PYTHON_NETIFACES_BUILD_CMDS
+	(cd $(@D); \
+		PYTHONXCPREFIX="$(STAGING_DIR)/usr/" \
+		LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
+	$(HOST_DIR)/usr/bin/python setup.py build)
+endef
+
+define PYTHON_NETIFACES_INSTALL_TARGET_CMDS
+	(cd $(@D); PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
+	$(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr)
+endef
+
+$(eval $(call GENTARGETS))