All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/5] Introduce New Package PySnmp
@ 2013-10-03 20:01 Ryan Barnett
  2013-10-03 20:01 ` [Buildroot] [PATCH 1/5] python-pyasn: new package Ryan Barnett
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Ryan Barnett @ 2013-10-03 20:01 UTC (permalink / raw)
  To: buildroot

This patchset adds support for building PySnmp. One thing that I'm not
sure on and am open to debate is the naming of the packages under
Target Packages > Interpreter languages and scripting > external python
modules in the menuconfig since the majority of the packages are named
python-<pkg_name> but pygame and pyparsing don't fall under this
category.

Menuconfig
 -> python-nfc
 -> python-protobuf
 -> pygame
 -> pyparsing
 -> python-pyro
 -> python-pyzmq

The make rules for the pygame and pyparsing packages are python-pygame
python-pyparsing.

Location of the packages in buildroot is package/python-pygame and
package/python-pyparsing.

Question I have for the packages I added is the following:

Should I follow what is currently done for pygame and pyparsing
or should I keep them how I have things done and change the name of
pygame and pyparsing in seperate patches? Whatever is chosen, I would
just like to have consistency with naming.

My vote is to change pygame and pyparsing names. But my mind can
easily be changed.

Ryan Barnett (5):
  python-pyasn: new package
  python-pycrypto: new package
  python-pysnmp: new package
  python-pysnmp-apps: new package
  python-pysnmp-mibs: new package

 package/Config.in                                |    7 ++++
 package/python-pyasn/Config.in                   |   13 +++++++
 package/python-pyasn/python-pyasn.mk             |   38 ++++++++++++++++++++++
 package/python-pycrypto/Config.in                |    8 ++++
 package/python-pycrypto/python-pycrypto.mk       |   25 ++++++++++++++
 package/python-pysnmp-apps/Config.in             |    7 ++++
 package/python-pysnmp-apps/python-pysnmp-apps.mk |   23 +++++++++++++
 package/python-pysnmp-mibs/Config.in             |    8 ++++
 package/python-pysnmp-mibs/python-pysnmp-mibs.mk |   23 +++++++++++++
 package/python-pysnmp/Config.in                  |   10 ++++++
 package/python-pysnmp/python-pysnmp.mk           |   23 +++++++++++++
 11 files changed, 185 insertions(+), 0 deletions(-)
 create mode 100644 package/python-pyasn/Config.in
 create mode 100644 package/python-pyasn/python-pyasn.mk
 create mode 100644 package/python-pycrypto/Config.in
 create mode 100644 package/python-pycrypto/python-pycrypto.mk
 create mode 100644 package/python-pysnmp-apps/Config.in
 create mode 100644 package/python-pysnmp-apps/python-pysnmp-apps.mk
 create mode 100644 package/python-pysnmp-mibs/Config.in
 create mode 100644 package/python-pysnmp-mibs/python-pysnmp-mibs.mk
 create mode 100644 package/python-pysnmp/Config.in
 create mode 100644 package/python-pysnmp/python-pysnmp.mk

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 1/5] python-pyasn: new package
  2013-10-03 20:01 [Buildroot] [PATCH 0/5] Introduce New Package PySnmp Ryan Barnett
@ 2013-10-03 20:01 ` Ryan Barnett
  2013-10-03 21:17   ` Thomas Petazzoni
  2013-10-03 20:01 ` [Buildroot] [PATCH 2/5] python-pycrypto: " Ryan Barnett
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Ryan Barnett @ 2013-10-03 20:01 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Ryan Barnett <rjbarnet@rockwellcollins.com>

---

The definition of CFLAGS/LDFLAGS/LDSHARED is necessary since the
compilation of won't work correctly using either TARGET_CONFIGURE_OPTS
because it won't link against the correct python library. Also using
python-distutilcross doesn't work as the setup.py doesn't understand
the -x option.

---
 package/Config.in                    |    1 +
 package/python-pyasn/Config.in       |   13 +++++++++++
 package/python-pyasn/python-pyasn.mk |   38 ++++++++++++++++++++++++++++++++++
 3 files changed, 52 insertions(+), 0 deletions(-)
 create mode 100644 package/python-pyasn/Config.in
 create mode 100644 package/python-pyasn/python-pyasn.mk

diff --git a/package/Config.in b/package/Config.in
index b7fdb89..3592cb7 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -396,6 +396,7 @@ source "package/python-meld3/Config.in"
 source "package/python-netifaces/Config.in"
 source "package/python-nfc/Config.in"
 source "package/python-protobuf/Config.in"
+source "package/python-pyasn/Config.in"
 source "package/python-pygame/Config.in"
 source "package/python-pyparsing/Config.in"
 source "package/python-pyro/Config.in"
diff --git a/package/python-pyasn/Config.in b/package/python-pyasn/Config.in
new file mode 100644
index 0000000..a352fe4
--- /dev/null
+++ b/package/python-pyasn/Config.in
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_PYTHON_PYASN
+	bool "python-pyasn"
+	depends on BR2_PACKAGE_PYTHON
+	depends on BR2_INSTALL_LIBSTDCPP
+	help
+	  PyASN is a Python extension module that enables you to
+	  perform very fast IP address to Autonomous System Number
+	  lookups.
+
+	  https://code.google.com/p/pyasn/
+
+comment "python-pyasn requires C++ support in toolchain"
+        depends on !BR2_INSTALL_LIBSTDCPP
diff --git a/package/python-pyasn/python-pyasn.mk b/package/python-pyasn/python-pyasn.mk
new file mode 100644
index 0000000..4579f38
--- /dev/null
+++ b/package/python-pyasn/python-pyasn.mk
@@ -0,0 +1,38 @@
+################################################################################
+#
+# python-pyasn
+#
+################################################################################
+
+PYTHON_PYASN_VERSION = 1.2
+PYTHON_PYASN_SOURCE  = PyASN-$(PYTHON_PYASN_VERSION).zip
+PYTHON_PYASN_SITE    = https://pyasn.googlecode.com/files
+PYTHON_PYASN_LICENSE = LGPL
+
+PYTHON_PYASN_DEPENDENCIES = python
+
+define PYTHON_PYASN_EXTRACT_CMDS
+	unzip -d $(@D) $(DL_DIR)/$(PYTHON_PYASN_SOURCE)
+	mv $(@D)/PyASN-$(PYTHON_PYASN_VERSION)/* $(@D)
+	$(RM) -r $(@D)/PyASN-$(PYTHON_PYASN_VERSION)
+endef
+
+define PYTHON_PYASN_BUILD_CMDS
+	(cd $(@D); \
+		CC="$(TARGET_CC)" \
+		CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
+		CXX="$(TARGET_CXX)" \
+		CXXFLAGS="$(TARGET_CXXFLAGS) -I$(STAGING_DIR)/usr/include" \
+		LDSHARED="$(TARGET_CC) -shared" \
+		LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
+		$(HOST_DIR)/usr/bin/python setup.py build_ext \
+		--include-dirs=$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR) \
+	)
+	(cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build)
+endef
+
+define PYTHON_PYASN_INSTALL_TARGET_CMDS
+	(cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr)
+endef
+
+$(eval $(generic-package))
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 2/5] python-pycrypto: new package
  2013-10-03 20:01 [Buildroot] [PATCH 0/5] Introduce New Package PySnmp Ryan Barnett
  2013-10-03 20:01 ` [Buildroot] [PATCH 1/5] python-pyasn: new package Ryan Barnett
@ 2013-10-03 20:01 ` Ryan Barnett
  2013-10-03 20:24   ` Ryan Barnett
  2013-10-03 20:01 ` [Buildroot] [PATCH 3/5] python-pysnmp: " Ryan Barnett
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Ryan Barnett @ 2013-10-03 20:01 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Ryan Barnett <rjbarnet@rockwellcollins.com>
---
 package/Config.in                          |    1 +
 package/python-pycrypto/Config.in          |    8 ++++++++
 package/python-pycrypto/python-pycrypto.mk |   25 +++++++++++++++++++++++++
 3 files changed, 34 insertions(+), 0 deletions(-)
 create mode 100644 package/python-pycrypto/Config.in
 create mode 100644 package/python-pycrypto/python-pycrypto.mk

diff --git a/package/Config.in b/package/Config.in
index 3592cb7..a1f7901 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -397,6 +397,7 @@ source "package/python-netifaces/Config.in"
 source "package/python-nfc/Config.in"
 source "package/python-protobuf/Config.in"
 source "package/python-pyasn/Config.in"
+source "package/python-pycrypto/Config.in"
 source "package/python-pygame/Config.in"
 source "package/python-pyparsing/Config.in"
 source "package/python-pyro/Config.in"
diff --git a/package/python-pycrypto/Config.in b/package/python-pycrypto/Config.in
new file mode 100644
index 0000000..bfb10f8
--- /dev/null
+++ b/package/python-pycrypto/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_PYTHON_PYCRYPTO
+	bool "python-pycrypto"
+	depends on BR2_PACKAGE_PYTHON
+	help
+	  PyCrypto is a collection of cryptographic algorithms and 
+	  protocols, implemented for use from Python.
+
+	  http://www.pycrypto.org/
diff --git a/package/python-pycrypto/python-pycrypto.mk b/package/python-pycrypto/python-pycrypto.mk
new file mode 100644
index 0000000..bba5de1
--- /dev/null
+++ b/package/python-pycrypto/python-pycrypto.mk
@@ -0,0 +1,25 @@
+################################################################################
+#
+# python-pycrypto
+#
+################################################################################
+
+PYTHON_PYCRYPTO_VERSION = 2.6
+PYTHON_PYCRYPTO_SOURCE  = pycrypto-$(PYTHON_PYCRYPTO_VERSION).tar.gz
+PYTHON_PYCRYPTO_SITE    = http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto
+PYTHON_PYCRYPTO_LICENSE = Public Domain, Python 2.2 License (HMAC.py, setup.py)
+
+PYTHON_PYCRYPTO_LICENSE_FILES = COPYRIGHT LEGAL/copy/LICENSE.libtom \
+		LEGAL/copy/LICENSE.orig LEGAL/copy/LICENSE.python-2.2
+
+PYTHON_PYCRYPTO_DEPENDENCIES = python
+
+define PYTHON_PYCRYPTO_BUILD_CMDS
+	(cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build --executable=/usr/bin/python)
+endef
+
+define PYTHON_PYCRYPTO_INSTALL_TARGET_CMDS
+	(cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr)
+endef
+
+$(eval $(generic-package))
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 3/5] python-pysnmp: new package
  2013-10-03 20:01 [Buildroot] [PATCH 0/5] Introduce New Package PySnmp Ryan Barnett
  2013-10-03 20:01 ` [Buildroot] [PATCH 1/5] python-pyasn: new package Ryan Barnett
  2013-10-03 20:01 ` [Buildroot] [PATCH 2/5] python-pycrypto: " Ryan Barnett
@ 2013-10-03 20:01 ` Ryan Barnett
  2013-10-03 20:01 ` [Buildroot] [PATCH 4/5] python-pysnmp-apps: " Ryan Barnett
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Ryan Barnett @ 2013-10-03 20:01 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Ryan Barnett <rjbarnet@rockwellcollins.com>
---
Even though the documentation for PySNMP says PyCrypto is an optional
dependancy, it is required for any system besides Windows.
(see Setup.py)
---
 package/Config.in                      |    1 +
 package/python-pysnmp/Config.in        |   10 ++++++++++
 package/python-pysnmp/python-pysnmp.mk |   23 +++++++++++++++++++++++
 3 files changed, 34 insertions(+), 0 deletions(-)
 create mode 100644 package/python-pysnmp/Config.in
 create mode 100644 package/python-pysnmp/python-pysnmp.mk

diff --git a/package/Config.in b/package/Config.in
index a1f7901..68262f9 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -401,6 +401,7 @@ source "package/python-pycrypto/Config.in"
 source "package/python-pygame/Config.in"
 source "package/python-pyparsing/Config.in"
 source "package/python-pyro/Config.in"
+source "package/python-pysnmp/Config.in"
 source "package/python-pyzmq/Config.in"
 source "package/python-serial/Config.in"
 source "package/python-setuptools/Config.in"
diff --git a/package/python-pysnmp/Config.in b/package/python-pysnmp/Config.in
new file mode 100644
index 0000000..88f6f6f
--- /dev/null
+++ b/package/python-pysnmp/Config.in
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_PYTHON_PYSNMP
+	bool "python-pysnmp"
+	depends on BR2_PACKAGE_PYTHON
+	select BR2_PACKAGE_PYTHON_PYASN
+	select BR2_PACKAGE_PYTHON_PYCRYPTO
+	help
+	  PySNMP is a cross-platform, pure-Python SNMP engine
+	  implementation.
+
+	  http://pysnmp.sf.net
diff --git a/package/python-pysnmp/python-pysnmp.mk b/package/python-pysnmp/python-pysnmp.mk
new file mode 100644
index 0000000..d4a25c8
--- /dev/null
+++ b/package/python-pysnmp/python-pysnmp.mk
@@ -0,0 +1,23 @@
+################################################################################
+#
+# python-pysnmp
+#
+################################################################################
+
+PYTHON_PYSNMP_VERSION = 4.2.4
+PYTHON_PYSNMP_SOURCE  = pysnmp-$(PYTHON_PYSNMP_VERSION).tar.gz
+PYTHON_PYSNMP_SITE    = https://pypi.python.org/packages/source/p/pysnmp
+PYTHON_PYSNMP_LICENSE = BSD-3c
+PYTHON_PYSNMP_LICENSE_FILES = LICENSE
+
+PYTHON_PYSNMP_DEPENDENCIES = python python-pyasn python-pycrypto
+
+define PYTHON_PYSNMP_BUILD_CMDS
+	(cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build --executable=/usr/bin/python)
+endef
+
+define PYTHON_PYSNMP_INSTALL_TARGET_CMDS
+	(cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr)
+endef
+
+$(eval $(generic-package))
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 4/5] python-pysnmp-apps: new package
  2013-10-03 20:01 [Buildroot] [PATCH 0/5] Introduce New Package PySnmp Ryan Barnett
                   ` (2 preceding siblings ...)
  2013-10-03 20:01 ` [Buildroot] [PATCH 3/5] python-pysnmp: " Ryan Barnett
@ 2013-10-03 20:01 ` Ryan Barnett
  2013-10-03 20:01 ` [Buildroot] [PATCH 5/5] python-pysnmp-mibs: " Ryan Barnett
  2013-10-03 21:15 ` [Buildroot] [PATCH 0/5] Introduce New Package PySnmp Thomas Petazzoni
  5 siblings, 0 replies; 13+ messages in thread
From: Ryan Barnett @ 2013-10-03 20:01 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Ryan Barnett <rjbarnet@rockwellcollins.com>
---
 package/Config.in                                |    3 ++
 package/python-pysnmp-apps/Config.in             |    7 ++++++
 package/python-pysnmp-apps/python-pysnmp-apps.mk |   23 ++++++++++++++++++++++
 3 files changed, 33 insertions(+), 0 deletions(-)
 create mode 100644 package/python-pysnmp-apps/Config.in
 create mode 100644 package/python-pysnmp-apps/python-pysnmp-apps.mk

diff --git a/package/Config.in b/package/Config.in
index 68262f9..970f5ce 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -402,6 +402,9 @@ source "package/python-pygame/Config.in"
 source "package/python-pyparsing/Config.in"
 source "package/python-pyro/Config.in"
 source "package/python-pysnmp/Config.in"
+if BR2_PACKAGE_PYTHON_PYSNMP
+source "package/python-pysnmp-apps/Config.in"
+endif
 source "package/python-pyzmq/Config.in"
 source "package/python-serial/Config.in"
 source "package/python-setuptools/Config.in"
diff --git a/package/python-pysnmp-apps/Config.in b/package/python-pysnmp-apps/Config.in
new file mode 100644
index 0000000..89a2610
--- /dev/null
+++ b/package/python-pysnmp-apps/Config.in
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_PYTHON_PYSNMP_APPS
+	bool "python-pysnmp-apps"
+	help
+	  PySNMP MIBs is a set of IETF & IANA MIBs pre-compiled and 
+	  packaged to simplify their use with the PySNMP library.
+
+	  http://pysnmp.sf.net
diff --git a/package/python-pysnmp-apps/python-pysnmp-apps.mk b/package/python-pysnmp-apps/python-pysnmp-apps.mk
new file mode 100644
index 0000000..f968f04
--- /dev/null
+++ b/package/python-pysnmp-apps/python-pysnmp-apps.mk
@@ -0,0 +1,23 @@
+################################################################################
+#
+# python-pysnmp-apps
+#
+################################################################################
+
+PYTHON_PYSNMP_APPS_VERSION = 0.3.3
+PYTHON_PYSNMP_APPS_SOURCE  = pysnmp-apps-$(PYTHON_PYSNMP_APPS_VERSION).tar.gz
+PYTHON_PYSNMP_APPS_SITE    = https://pypi.python.org/packages/source/p/pysnmp-apps
+PYTHON_PYSNMP_APPS_LICENSE = BSD-3c
+PYTHON_PYSNMP_APPS_LICENSE_FILES = LICENSE
+
+PYTHON_PYSNMP_APPS_DEPENDENCIES = python python-pysnmp
+
+define PYTHON_PYSNMP_APPS_BUILD_CMDS
+	(cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build --executable=/usr/bin/python)
+endef
+
+define PYTHON_PYSNMP_APPS_INSTALL_TARGET_CMDS
+	(cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr)
+endef
+
+$(eval $(generic-package))
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 5/5] python-pysnmp-mibs: new package
  2013-10-03 20:01 [Buildroot] [PATCH 0/5] Introduce New Package PySnmp Ryan Barnett
                   ` (3 preceding siblings ...)
  2013-10-03 20:01 ` [Buildroot] [PATCH 4/5] python-pysnmp-apps: " Ryan Barnett
@ 2013-10-03 20:01 ` Ryan Barnett
  2013-10-03 21:15 ` [Buildroot] [PATCH 0/5] Introduce New Package PySnmp Thomas Petazzoni
  5 siblings, 0 replies; 13+ messages in thread
From: Ryan Barnett @ 2013-10-03 20:01 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Ryan Barnett <rjbarnet@rockwellcollins.com>
---
 package/Config.in                                |    1 +
 package/python-pysnmp-mibs/Config.in             |    8 +++++++
 package/python-pysnmp-mibs/python-pysnmp-mibs.mk |   23 ++++++++++++++++++++++
 3 files changed, 32 insertions(+), 0 deletions(-)
 create mode 100644 package/python-pysnmp-mibs/Config.in
 create mode 100644 package/python-pysnmp-mibs/python-pysnmp-mibs.mk

diff --git a/package/Config.in b/package/Config.in
index 970f5ce..71a4357 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -404,6 +404,7 @@ source "package/python-pyro/Config.in"
 source "package/python-pysnmp/Config.in"
 if BR2_PACKAGE_PYTHON_PYSNMP
 source "package/python-pysnmp-apps/Config.in"
+source "package/python-pysnmp-mibs/Config.in"
 endif
 source "package/python-pyzmq/Config.in"
 source "package/python-serial/Config.in"
diff --git a/package/python-pysnmp-mibs/Config.in b/package/python-pysnmp-mibs/Config.in
new file mode 100644
index 0000000..2835678
--- /dev/null
+++ b/package/python-pysnmp-mibs/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_PYTHON_PYSNMP_MIBS
+	bool "python-pysnmp-mibs"
+	depends on BR2_PACKAGE_PYTHON && BR2_PACKAGE_PYTHON_PYSNMP
+	help
+	  PySNMP MIBs is a set of IETF & IANA MIBs pre-compiled and 
+	  packaged to simplify their use with the PySNMP library.
+
+	  http://pysnmp.sf.net
diff --git a/package/python-pysnmp-mibs/python-pysnmp-mibs.mk b/package/python-pysnmp-mibs/python-pysnmp-mibs.mk
new file mode 100644
index 0000000..1e2ee84
--- /dev/null
+++ b/package/python-pysnmp-mibs/python-pysnmp-mibs.mk
@@ -0,0 +1,23 @@
+################################################################################
+#
+# python-pysnmp-mibs
+#
+################################################################################
+
+PYTHON_PYSNMP_MIBS_VERSION = 0.1.4
+PYTHON_PYSNMP_MIBS_SOURCE  = pysnmp-mibs-$(PYTHON_PYSNMP_MIBS_VERSION).tar.gz
+PYTHON_PYSNMP_MIBS_SITE    = https://pypi.python.org/packages/source/p/pysnmp-mibs
+PYTHON_PYSNMP_MIBS_LICENSE = BSD-3c
+PYTHON_PYSNMP_MIBS_LICENSE_FILES = LICENSE
+
+PYTHON_PYSNMP_MIBS_DEPENDENCIES = python python-pysnmp
+
+define PYTHON_PYSNMP_MIBS_BUILD_CMDS
+	(cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build --executable=/usr/bin/python)
+endef
+
+define PYTHON_PYSNMP_MIBS_INSTALL_TARGET_CMDS
+	(cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr)
+endef
+
+$(eval $(generic-package))
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 2/5] python-pycrypto: new package
  2013-10-03 20:01 ` [Buildroot] [PATCH 2/5] python-pycrypto: " Ryan Barnett
@ 2013-10-03 20:24   ` Ryan Barnett
  0 siblings, 0 replies; 13+ messages in thread
From: Ryan Barnett @ 2013-10-03 20:24 UTC (permalink / raw)
  To: buildroot

Ryan Barnett <rjbarnet@rockwellcollins.com> wrote on 
10/03/2013 03:01:02 PM:

[...]

> @@ -0,0 +1,25 @@
> 
+################################################################################
> +#
> +# python-pycrypto
> +#
> 
+################################################################################
> +
> +PYTHON_PYCRYPTO_VERSION = 2.6
> +PYTHON_PYCRYPTO_SOURCE  = pycrypto-$(PYTHON_PYCRYPTO_VERSION).tar.gz
> +PYTHON_PYCRYPTO_SITE    = 
http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto
> +PYTHON_PYCRYPTO_LICENSE = Public Domain, Python 2.2 License 
(HMAC.py,setup.py)
> +
> +PYTHON_PYCRYPTO_LICENSE_FILES = COPYRIGHT LEGAL/copy/LICENSE.libtom \
> +      LEGAL/copy/LICENSE.orig LEGAL/copy/LICENSE.python-2.2
> +
> +PYTHON_PYCRYPTO_DEPENDENCIES = python
> +
> +define PYTHON_PYCRYPTO_BUILD_CMDS
> +   (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build --
> executable=/usr/bin/python)
> +endef

I realized now that I'm not actually compiling some of the shared library
objects for the target. I will fix this in my next version of this 
patchset.
I need to more closely follow what I did in python-pyasn with attempting
to use TARGET_CONFIG_OPT or python-distutilscross.

> +
> +define PYTHON_PYCRYPTO_INSTALL_TARGET_CMDS
> +   (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$
> (TARGET_DIR)/usr)
> +endef
> +
> +$(eval $(generic-package))

Thanks,
-Ryan

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 0/5] Introduce New Package PySnmp
  2013-10-03 20:01 [Buildroot] [PATCH 0/5] Introduce New Package PySnmp Ryan Barnett
                   ` (4 preceding siblings ...)
  2013-10-03 20:01 ` [Buildroot] [PATCH 5/5] python-pysnmp-mibs: " Ryan Barnett
@ 2013-10-03 21:15 ` Thomas Petazzoni
  2013-10-03 21:21   ` Ryan Barnett
  5 siblings, 1 reply; 13+ messages in thread
From: Thomas Petazzoni @ 2013-10-03 21:15 UTC (permalink / raw)
  To: buildroot

Dear Ryan Barnett,

On Thu, 3 Oct 2013 15:01:00 -0500, Ryan Barnett wrote:
> This patchset adds support for building PySnmp. One thing that I'm not
> sure on and am open to debate is the naming of the packages under
> Target Packages > Interpreter languages and scripting > external python
> modules in the menuconfig since the majority of the packages are named
> python-<pkg_name> but pygame and pyparsing don't fall under this
> category.
> 
> Menuconfig
>  -> python-nfc
>  -> python-protobuf
>  -> pygame
>  -> pyparsing
>  -> python-pyro
>  -> python-pyzmq
> 
> The make rules for the pygame and pyparsing packages are python-pygame
> python-pyparsing.
> 
> Location of the packages in buildroot is package/python-pygame and
> package/python-pyparsing.

Aaah, I now understand better what you were mentioning on IRC. Sorry
for not understanding earlier. I did understand that the name of the
package was "pyparsing", i.e that it was located in package/pyparsing/.
But indeed, it is located in package/python-pyparsing/, so the package
name is 'python-pyparsing'. The only thing that doesn't match is the
Config.in option prompt, and this is not nice.

So clearly, I'm all for changing the Config.in option name, i.e:

-	bool "pyparsing"
+	bool "python-pyparsing"

Thanks, and sorry again for the misunderstanding,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 1/5] python-pyasn: new package
  2013-10-03 20:01 ` [Buildroot] [PATCH 1/5] python-pyasn: new package Ryan Barnett
@ 2013-10-03 21:17   ` Thomas Petazzoni
  2013-10-03 22:39     ` Ryan Barnett
  0 siblings, 1 reply; 13+ messages in thread
From: Thomas Petazzoni @ 2013-10-03 21:17 UTC (permalink / raw)
  To: buildroot

Dear Ryan Barnett,

On Thu, 3 Oct 2013 15:01:01 -0500, Ryan Barnett wrote:

> +		CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
> +		CXX="$(TARGET_CXX)" \
> +		CXXFLAGS="$(TARGET_CXXFLAGS) -I$(STAGING_DIR)/usr/include" \
> +		LDSHARED="$(TARGET_CC) -shared" \
> +		LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \

These additional -I and -L are rather weird because they simply pass
what are already the default search paths for headers and libraries.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 0/5] Introduce New Package PySnmp
  2013-10-03 21:15 ` [Buildroot] [PATCH 0/5] Introduce New Package PySnmp Thomas Petazzoni
@ 2013-10-03 21:21   ` Ryan Barnett
  0 siblings, 0 replies; 13+ messages in thread
From: Ryan Barnett @ 2013-10-03 21:21 UTC (permalink / raw)
  To: buildroot

Thomas,

Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote on 
10/03/2013 04:15:52 PM:

> Dear Ryan Barnett,
> 
> On Thu, 3 Oct 2013 15:01:00 -0500, Ryan Barnett wrote:
> > This patchset adds support for building PySnmp. One thing that I'm not
> > sure on and am open to debate is the naming of the packages under
> > Target Packages > Interpreter languages and scripting > external 
python
> > modules in the menuconfig since the majority of the packages are named
> > python-<pkg_name> but pygame and pyparsing don't fall under this
> > category.
> > 
> > Menuconfig
> >  -> python-nfc
> >  -> python-protobuf
> >  -> pygame
> >  -> pyparsing
> >  -> python-pyro
> >  -> python-pyzmq
> > 
> > The make rules for the pygame and pyparsing packages are python-pygame
> > python-pyparsing.
> > 
> > Location of the packages in buildroot is package/python-pygame and
> > package/python-pyparsing.
> 
> Aaah, I now understand better what you were mentioning on IRC. Sorry
> for not understanding earlier. I did understand that the name of the
> package was "pyparsing", i.e that it was located in package/pyparsing/.
> But indeed, it is located in package/python-pyparsing/, so the package
> name is 'python-pyparsing'. The only thing that doesn't match is the
> Config.in option prompt, and this is not nice.
> 
> So clearly, I'm all for changing the Config.in option name, i.e:
> 
> -   bool "pyparsing"
> +   bool "python-pyparsing"
> 
> Thanks, and sorry again for the misunderstanding,

Not a problem, I figured I would explain the problem better in this
email. I'll work on the patch later but for now I've got to figure how
to get pycrypto to cross compile.

> Thomas
> -- 
> Thomas Petazzoni, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 1/5] python-pyasn: new package
  2013-10-03 21:17   ` Thomas Petazzoni
@ 2013-10-03 22:39     ` Ryan Barnett
  0 siblings, 0 replies; 13+ messages in thread
From: Ryan Barnett @ 2013-10-03 22:39 UTC (permalink / raw)
  To: buildroot

Thomas,

Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote on
10/03/2013 04:17:55 PM:

> Dear Ryan Barnett,
> 
> On Thu, 3 Oct 2013 15:01:01 -0500, Ryan Barnett wrote:
> 
> > +      CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
> > +      CXX="$(TARGET_CXX)" \
> > +      CXXFLAGS="$(TARGET_CXXFLAGS) -I$(STAGING_DIR)/usr/include" \
> > +      LDSHARED="$(TARGET_CC) -shared" \
> > +      LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/lib -L$
> (STAGING_DIR)/usr/lib" \
> 
> These additional -I and -L are rather weird because they simply pass
> what are already the default search paths for headers and libraries.

The additional -I and -L are needed to ensure that the $(STAGING_DIR)
header and library files are pulled. Otherwise the distutils package 
before the ones that the distutils package will find the 
headers/libraries that are located at $(HOST_DIR)/usr.

I've added this comment to both pyasn and pycrypto. I'm not a fan
of it but I don't really want to rewrite the setup.py in order to 
support cross compiling.

> Thomas
> -- 
> Thomas Petazzoni, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 0/5] Introduce New Package PySnmp
  2013-10-04  1:12 Ryan Barnett
@ 2013-10-04 14:25 ` Ryan Barnett
  0 siblings, 0 replies; 13+ messages in thread
From: Ryan Barnett @ 2013-10-04 14:25 UTC (permalink / raw)
  To: buildroot

All,

I accidentally forgot to put a "PATCH v2" in the title of these 
patches so the following patches in patchworks can be marked as
superseded.

http://patchwork.ozlabs.org/patch/280410/
http://patchwork.ozlabs.org/patch/280409/
http://patchwork.ozlabs.org/patch/280408/
http://patchwork.ozlabs.org/patch/280406/
http://patchwork.ozlabs.org/patch/280407/

I apologies for the inconvience.

Ryan Barnett <rjbarnet@rockwellcollins.com> wrote on 10/03/2013 08:12:04 
PM:

[...]

Thanks,
-Ryan

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 0/5] Introduce New Package PySnmp
@ 2013-10-04  1:12 Ryan Barnett
  2013-10-04 14:25 ` Ryan Barnett
  0 siblings, 1 reply; 13+ messages in thread
From: Ryan Barnett @ 2013-10-04  1:12 UTC (permalink / raw)
  To: buildroot

I apologies for the first patch set, I thought I tested it more
throughly than I actually did. I guess that is what I get for multi-
tasking...

The first version of this patch set has problem with cross-compiling
PyCrypto which it really didn't do. This second version fixes those
problems but because I wasn't compiling PyCrypto correctly, it lead
to more changes than I anticipated.

This updated patchset has added host compiling support for PyASN,
PySNMP, and PyCrypto because there are issues with the installing
PySNMP-Apps to target and not being able to find installed versions
of PyASN/PySNMP and PyCrypto since it uses setuptools and doesn't
search in the correct location (TARGET_DIR). The workaround for the
problem is to compile PyASN, PyCrypto and PySNMP for the target to
fake-out setuptools into thinking that packages are installed.

Note: PySNMP-Apps will install in the correct location just doesn't
search for the dependancies in the correct location.

========================================

This patchset adds support for building PySnmp. One thing that I'm not
sure on and am open to debate is the naming of the packages under
Target Packages > Interpreter languages and scripting > external python
modules in the menuconfig since the majority of the packages are named
python-<pkg_name> but pygame and pyparsing don't fall under this
category.

Menuconfig
 -> python-nfc
 -> python-protobuf
 -> pygame
 -> pyparsing
 -> python-pyro
 -> python-pyzmq

The make rules for the pygame and pyparsing packages are python-pygame
python-pyparsing.

Location of the packages in buildroot is package/python-pygame and
package/python-pyparsing.

Question I have for the packages I added is the following:

Should I follow what is currently done for pygame and pyparsing
or should I keep them how I have things done and change the name of
pygame and pyparsing in seperate patches? Whatever is chosen, I would
just like to have consistency with naming.

My vote is to change pygame and pyparsing names. But my mind can
easily be changed.

Ryan Barnett (5):
  python-pyasn: new package
  python-pycrypto: new package
  python-pysnmp: new package
  python-pysnmp-apps: new package
  python-pysnmp-mibs: new package

 package/Config.in                                |    7 ++++
 package/python-pyasn/Config.in                   |   13 +++++++
 package/python-pyasn/python-pyasn.mk             |   38 ++++++++++++++++++++++
 package/python-pycrypto/Config.in                |    8 ++++
 package/python-pycrypto/python-pycrypto.mk       |   25 ++++++++++++++
 package/python-pysnmp-apps/Config.in             |    7 ++++
 package/python-pysnmp-apps/python-pysnmp-apps.mk |   23 +++++++++++++
 package/python-pysnmp-mibs/Config.in             |    8 ++++
 package/python-pysnmp-mibs/python-pysnmp-mibs.mk |   23 +++++++++++++
 package/python-pysnmp/Config.in                  |   10 ++++++
 package/python-pysnmp/python-pysnmp.mk           |   23 +++++++++++++
 11 files changed, 185 insertions(+), 0 deletions(-)
 create mode 100644 package/python-pyasn/Config.in
 create mode 100644 package/python-pyasn/python-pyasn.mk
 create mode 100644 package/python-pycrypto/Config.in
 create mode 100644 package/python-pycrypto/python-pycrypto.mk
 create mode 100644 package/python-pysnmp-apps/Config.in
 create mode 100644 package/python-pysnmp-apps/python-pysnmp-apps.mk
 create mode 100644 package/python-pysnmp-mibs/Config.in
 create mode 100644 package/python-pysnmp-mibs/python-pysnmp-mibs.mk
 create mode 100644 package/python-pysnmp/Config.in
 create mode 100644 package/python-pysnmp/python-pysnmp.mk

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2013-10-04 14:25 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-03 20:01 [Buildroot] [PATCH 0/5] Introduce New Package PySnmp Ryan Barnett
2013-10-03 20:01 ` [Buildroot] [PATCH 1/5] python-pyasn: new package Ryan Barnett
2013-10-03 21:17   ` Thomas Petazzoni
2013-10-03 22:39     ` Ryan Barnett
2013-10-03 20:01 ` [Buildroot] [PATCH 2/5] python-pycrypto: " Ryan Barnett
2013-10-03 20:24   ` Ryan Barnett
2013-10-03 20:01 ` [Buildroot] [PATCH 3/5] python-pysnmp: " Ryan Barnett
2013-10-03 20:01 ` [Buildroot] [PATCH 4/5] python-pysnmp-apps: " Ryan Barnett
2013-10-03 20:01 ` [Buildroot] [PATCH 5/5] python-pysnmp-mibs: " Ryan Barnett
2013-10-03 21:15 ` [Buildroot] [PATCH 0/5] Introduce New Package PySnmp Thomas Petazzoni
2013-10-03 21:21   ` Ryan Barnett
2013-10-04  1:12 Ryan Barnett
2013-10-04 14:25 ` Ryan Barnett

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.