Python package infrastructure
v2 cover Python package infrastructure
Hello,
This set of patches add a new infrastructure for Python packages, which support both distutils and setuptools based packages. It also converts all the current Python packages to this infrastructure, and adds a bunch of new Python packages that have been sitting in patchwork for a while.
Thanks to this infrastructure, the vast majority of Python packages no longer need to write any <something>_CMDS. All they need to do is to explicitly say, through the <pkg>_SETUP_TYPE variable, whether the setup.py of the package is distutils-based or setuptools-based.
When it's setuptools-based, then the infrastructure will automatically build host-setuptools an host-distutilscross.
A short overview of the patches:
* Patch 1 adds the Python infrastructure itself.
* Patches 2 to 23 convert all the existing Python packages to use the new infrastructure.
* Patches 23 to 36 add new Python packages that have been sitting on patchwork for some time, including some contributed by Ryan Barnett, who did rebase them on the Python infrastructure.
I have already started working on making the infrastructure work with Python 3 as well, and I have a bunch of patches that do this. However, they are not completely ready yet, and since Python modules anyway can't be used today with Python 3, merging this Python 2 only package infrastructure is not a regression.
Changes since v1
================
* Rebased on top of the latest master, so I dropped the first two patches on the 'dialog' patches, since they have already been merged.
* Fix a number of typos in the documentation, and generally give a number of additional details, according to suggestions made by Thomas DS.
* Fixed all the spacing issues reported by Thomas DS in packages.
* Significantly improved the comment that explains the mysterious $(2)_DEPENDENCIES line in pkg-python.mk, as well as minor other improvements suggested by Thomas DS.
* Fixed some copy and paste error in the python-pysnmp packages.
* Fixed some comments in Config.in related to toolchain dependencies, according to Thomas DS comments.
This branch is available at:
http://git.free-electrons.com/users/thomas-petazzoni/buildroot/log/?h=python-pkg-v2
Of course, testing is more than welcome.
Thanks a lot!
Thomas
Ludovic Desroches (4):
python-versiontools: new package
python-keyring: new package
python-simplejson: new package
python-json-schema-validator: new package
Ryan Barnett (6):
python-tornado: new package
python-pyasn: new package
python-pycrypto: new package
python-pysnmp: new package
python-pysnmp-apps: new package
python-pysnmp-mibs: new package
Thomas Petazzoni (23):
package: introduce Python package infrastructure
python-bottle: convert to the Python package infrastructure
python-crc16: convert to the Python package infrastructure
python-dpkt: convert to the Python package infrastructure
python-id3: convert to the Python package infrastructure
python-ipy: convert to the Python package infrastructure
python-m2crypto: convert to the Python package infrastructure
python-mad: convert to the Python package infrastructure
python-meld3: convert to the Python package infrastructure
python-nfc: convert to the Python package infrastructure
python-protobuf: convert to the Python package infrastructure
python-pygame: convert to the Python package infrastructure
python-pyparsing: convert to the Python package infrastructure
python-pyro: convert to the Python package infrastructure
python-pyzmq: convert to the Python package infrastructure
python-serial: convert to the Python package infrastructure
python-setuptools: convert to the Python package infrastructure
scons: convert to the Python package infrastructure
python-netifaces: convert to the Python package infrastructure
supervisor: convert to the Python package infrastructure
python-distutilscross: convert to the Python package infrastructure
python-thrift: convert to the Python package infrastructure
python-dialog: convert to the Python package infrastructure
Wojciech M. Zabolotny (2):
python-pyusb: new package
python-msgpack: new package
Zoltan Gyarmati (1):
python-configobj: new package
docs/manual/adding-packages-python.txt | 159 +++++++++++++++ docs/manual/adding-packages.txt | 2 + package/Config.in | 13 ++ package/Makefile.in | 1 + package/pkg-python.mk | 219 +++++++++++++++++++++ package/python-bottle/python-bottle.mk | 12 +- package/python-configobj/Config.in | 10 + package/python-configobj/python-configobj.mk | 14 ++ package/python-crc16/python-crc16.mk | 25 +-- package/python-dialog/python-dialog.mk | 14 +- .../python-distutilscross/python-distutilscross.mk | 13 +- package/python-dpkt/python-dpkt.mk | 13 +- package/python-id3/python-id3.mk | 13 +- package/python-ipy/python-ipy.mk | 17 +- package/python-json-schema-validator/Config.in | 8 + .../python-json-schema-validator.mk | 15 ++ package/python-keyring/Config.in | 8 + package/python-keyring/python-keyring.mk | 19 ++ package/python-m2crypto/python-m2crypto.mk | 20 +- package/python-mad/python-mad.mk | 20 +- package/python-meld3/python-meld3.mk | 12 +- package/python-msgpack/Config.in | 16 ++ package/python-msgpack/python-msgpack.mk | 15 ++ package/python-netifaces/Config.in | 1 - package/python-netifaces/python-netifaces.mk | 19 +- package/python-nfc/python-nfc.mk | 13 +- package/python-protobuf/python-protobuf.mk | 20 +- package/python-pyasn/Config.in | 13 ++ package/python-pyasn/python-pyasn.mk | 19 ++ package/python-pycrypto/Config.in | 9 + package/python-pycrypto/python-pycrypto.mk | 35 ++++ package/python-pygame/python-pygame.mk | 25 +-- package/python-pyparsing/python-pyparsing.mk | 28 +-- package/python-pyro/python-pyro.mk | 8 +- package/python-pysnmp-apps/Config.in | 14 ++ package/python-pysnmp-apps/python-pysnmp-apps.mk | 16 ++ package/python-pysnmp-mibs/Config.in | 13 ++ package/python-pysnmp-mibs/python-pysnmp-mibs.mk | 16 ++ package/python-pysnmp/Config.in | 14 ++ package/python-pysnmp/python-pysnmp.mk | 17 ++ package/python-pyusb/Config.in | 14 ++ package/python-pyusb/python-pyusb.mk | 14 ++ package/python-pyzmq/python-pyzmq.mk | 26 +-- package/python-serial/python-serial.mk | 13 +- package/python-setuptools/python-setuptools.mk | 28 +-- package/python-simplejson/Config.in | 7 + package/python-simplejson/python-simplejson.mk | 14 ++ package/python-thrift/python-thrift.mk | 26 +-- package/python-tornado/Config.in | 8 + package/python-tornado/python-tornado.mk | 13 ++ package/python-versiontools/Config.in | 7 + package/python-versiontools/python-versiontools.mk | 13 ++ package/scons/scons.mk | 13 +- package/supervisor/Config.in | 1 - package/supervisor/supervisor.mk | 22 +-- 55 files changed, 830 insertions(+), 327 deletions(-) create mode 100644 docs/manual/adding-packages-python.txt create mode 100644 package/pkg-python.mk create mode 100644 package/python-configobj/Config.in create mode 100644 package/python-configobj/python-configobj.mk create mode 100644 package/python-json-schema-validator/Config.in create mode 100644 package/python-json-schema-validator/python-json-schema-validator.mk create mode 100644 package/python-keyring/Config.in create mode 100644 package/python-keyring/python-keyring.mk create mode 100644 package/python-msgpack/Config.in create mode 100644 package/python-msgpack/python-msgpack.mk 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 create mode 100644 package/python-pyusb/Config.in create mode 100644 package/python-pyusb/python-pyusb.mk create mode 100644 package/python-simplejson/Config.in create mode 100644 package/python-simplejson/python-simplejson.mk create mode 100644 package/python-tornado/Config.in create mode 100644 package/python-tornado/python-tornado.mk create mode 100644 package/python-versiontools/Config.in create mode 100644 package/python-versiontools/python-versiontools.mk
Signature · 1 line
1.8.1.2
PATCH v2 1/36 package: introduce Python package infrastructure
--- docs/manual/adding-packages-python.txt | 159 ++++++++++++++++++++++++ docs/manual/adding-packages.txt | 2 + package/Makefile.in | 1 + package/pkg-python.mk | 219 +++++++++++++++++++++++++++++++++ 4 files changed, 381 insertions(+) create mode 100644 docs/manual/adding-packages-python.txt create mode 100644 package/pkg-python.mk
docs/manual/adding-packages-python.txt new file +159 -0
@@ -0,0 +1,159 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Infrastructure for Python packages +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This infrastructure applies to Python packages that use the standard +Python setuptools mechanism as their build system, generally +recognizable by the usage of a +setup.py+ script. + +[[python-package-tutorial]] + ++python-package+ tutorial +^^^^^^^^^^^^^^^^^^^^^^^^^ + +First, let's see how to write a +.mk+ file for a Python package, +with an example : + +------------------------ +01: ################################################################################ +02: # +03: # python-foo +04: # +05: ################################################################################ +06: +07: PYTHON_FOO_VERSION = 1.0 +08: PYTHON_FOO_SOURCE = python-foo-$(LIBFOO_VERSION).tar.xz +09: PYTHON_FOO_SITE = http://www.foosoftware.org/download +10: PYTHON_FOO_LICENSE = BSD-3c +11: PYTHON_FOO_LICENSE_FILES = LICENSE +12: PYTHON_FOO_ENV = SOME_VAR=1 +13: PYTHON_FOO_DEPENDENCIES = libmad +14: PYTHON_FOO_SETUP_TYPE = distutils +15: +16: $(eval $(python-package)) +------------------------ + +On line 7, we declare the version of the package. + +On line 8 and 9, we declare the name of the tarball (xz-ed tarball +recommended) and the location of the tarball on the Web. Buildroot +will automatically download the tarball from this location. + +On line 10 and 11, we give licensing details about the package (its +license on line 10, and the file containing the license text on line +11). + +On line 12, we tell Buildroot to pass custom options to the Python ++setup.py+ script when it is configuring the package. + +On line 13, we declare our dependencies, so that they are built +before the build process of our package starts. + +On line 14, we declare the specific Python build system being used. In +this case the +distutils+ Python build system is used. The two +supported ones are +distutils+ and +setuptools+. + +Finally, on line 16, we invoke the +python-package+ macro that +generates all the Makefile rules that actually allow the package to be +built. + +[[python-package-reference]] + ++python-package+ reference +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +As a policy, packages that merely provide Python modules should all be +named +python-<something>+ in Buildroot. Other packages that use the +Python build system, but are not Python modules, can freely choose +their name (existing examples in Buildroot are +scons+ and ++supervisor+). + +In their +Config.in+ file, they should depend on +BR2_PACKAGE_PYTHON+ +so that when Buildroot will enable Python 3 usage for modules, we will +be able to enable Python modules progressively on Python 3. + +The main macro of the Python package infrastructure is ++python-package+. It is similar to the +generic-package+ macro. It is +also possible to create Python host packages with the ++host-python-package+ macro. + +Just like the generic infrastructure, the Python infrastructure works +by defining a number of variables before calling the +python-package+ +or +host-python-package+ macros. + +All the package metadata information variables that exist in the +xref:generic-package-reference[generic package infrastructure] also +exist in the Python infrastructure: +PYTHON_FOO_VERSION+, ++PYTHON_FOO_SOURCE+, +PYTHON_FOO_PATCH+, +PYTHON_FOO_SITE+, ++PYTHON_FOO_SUBDIR+, +PYTHON_FOO_DEPENDENCIES+, +PYTHON_FOO_LICENSE+, ++PYTHON_FOO_LICENSE_FILES+, etc. + +Note that: + + * Setting +PYTHON_FOO_INSTALL_STAGING+ to +YES+ has no effect (unless + a +PYTHON_FOO_INSTALL_STAGING_CMDS+ variable is defined), since + Python modules generally don't need to be installed to the + +staging+ directory. + + * It is not necessary to add +python+ or +host-python+ in the + +PYTHON_FOO_DEPENDENCIES+ variable of a package, since these basic + dependencies are automatically added as needed by the Python + package infrastructure. + + * Similarly, it is not needed to add +host-setuptools+ and/or + +host-distutilscross+ dependencies to +PYTHON_FOO_DEPENDENCIES+ for + setuptools-based packages, since these are automatically added by + the Python infrastructure as needed. + +One variable specific to the Python infrastructure is mandatory: + +* +PYTHON_FOO_BUILD_TYPE+, to define which Python build system is used + by the package. The two supported values are +distutils+ and + +setuptools+. If you don't know which one is used in your package, + look at the +setup.py+ file in your package source code, and see + whether it imports things from the +distutils+ module or the + +setuptools+ module. + +A few additional variables, specific to the Python infrastructure, can +optionally be defined, depending on the package's needs. Many of them +are only useful in very specific cases, typical packages will +therefore only use a few of them, or none. + +* +PYTHON_FOO_ENV+, to specify additional environment variables to + pass to the Python +setup.py+ script (for both the build and install + steps). Note that the infrastructure is automatically passing + several standard variables, defined in +PKG_PYTHON_DISTUTILS_ENV+ + (for distutils target packages), +HOST_PKG_PYTHON_DISTUTILS_ENV+ + (for distutils host packages), +PKG_PYTHON_SETUPTOOLS_ENV+ (for + setuptools target packages) and +HOST_PKG_PYTHON_SETUPTOOLS_ENV+ + (for setuptools host packages). + +* +PYTHON_FOO_BUILD_OPT+, to specify additional options to pass to the + Python +setup.py+ script during the build step. For target distutils + packages, the +PKG_PYTHON_DISTUTILS_BUILD_OPT+ options are already + passed automatically by the infrastructure. + +* +PYTHON_FOO_INSTALL_OPT+, to specify additional options to pass to + the Python +setup.py+ script during the installation step. Note that + the infrastructure is automatically passing some options, defined in + +PKG_PYTHON_DISTUTILS_INSTALL_OPT+ (for target distutils packages), + +HOST_PKG_PYTHON_DISTUTILS_INSTALL_OPT+ (for host distutils + packages), +PKG_PYTHON_SETUPTOOLS_INSTALL_OPT+ (for target + setuptools packages) and +HOST_PKG_PYTHON_SETUPTOOLS_INSTALL_OPT+ + (for host setuptools packages). + +With the Python infrastructure, all the steps required to build and +install the packages are already defined, and they generally work well +for most Python-based packages. However, when required, it is still +possible to customize what is done in any particular step: + +* By adding a post-operation hook (after extract, patch, configure, + build or install). See xref:hooks[] for details. + +* By overriding one of the steps. For example, even if the Python + infrastructure is used, if the package +.mk+ file defines its own + +PYTHON_FOO_BUILD_CMDS+ variable, it will be used instead of the + default Python one. However, using this method should be restricted + to very specific cases. Do not use it in the general case.
docs/manual/adding-packages.txt +2 -0
@@ -18,6 +18,8 @@ include::adding-packages-autotools.txt[] include::adding-packages-cmake.txt[] +include::adding-packages-python.txt[] + include::adding-packages-hooks.txt[] include::adding-packages-gettext.txt[]
package/Makefile.in +1 -0
@@ -371,4 +371,5 @@ include package/pkg-utils.mk include package/pkg-download.mk include package/pkg-autotools.mk include package/pkg-cmake.mk +include package/pkg-python.mk include package/pkg-generic.mk
package/pkg-python.mk new file +219 -0
219 lines not on this page · raw message
Signature · 1 line
1.8.1.2
PATCH v2 1/36 package: introduce Python package infrastructure
Hi Thomas,
2013/12/11 Thomas Petazzoni <[email protected]>
Quoted 123 lines
Signed-off-by Thomas Petazzoni <[email protected]>--- docs/manual/adding-packages-python.txt | 159 ++++++++++++++++++++++++ docs/manual/adding-packages.txt | 2 + package/Makefile.in | 1 + package/pkg-python.mk | 219 +++++++++++++++++++++++++++++++++ 4 files changed, 381 insertions(+) create mode 100644 docs/manual/adding-packages-python.txt create mode 100644 package/pkg-python.mkdocs/manual/adding-packages-python.txt new file +20
-0@@ -0,0 +1,159 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +Infrastructure for Python packages +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This infrastructure applies to Python packages that use the standard +Python setuptools mechanism as their build system, generally +recognizable by the usage of a +setup.py+ script. + +[[python-package-tutorial]] + ++python-package+ tutorial +^^^^^^^^^^^^^^^^^^^^^^^^^ + +First, let's see how to write a +.mk+ file for a Python package, +with an example : + +------------------------ +01:################################################################################
+02: #
+03: # python-foo
+04: #
+05:
################################################################################
+06:
+07:PYTHON_FOO_VERSION= 1.0
+08:PYTHON_FOO_SOURCE= python-foo-$(LIBFOO_VERSION).tar.xz +09:PYTHON_FOO_SITE= http://www.foosoftware.org/download
+10:PYTHON_FOO_LICENSE= BSD-3c
+11:PYTHON_FOO_LICENSE_FILES= LICENSE
+12:PYTHON_FOO_ENV= SOME_VAR=1
+13:PYTHON_FOO_DEPENDENCIES= libmad
+14:PYTHON_FOO_SETUP_TYPE= distutils
+15:
+16: $(eval $(python-package))
+------------------------docs/manual/adding-packages-python.txt new file +66
-0+ +On line 7, we declare the version of the package. + +On line 8 and 9, we declare the name of the tarball (xz-ed tarball +recommended) and the location of the tarball on the Web. Buildroot +will automatically download the tarball from this location. + +On line 10 and 11, we give licensing details about the package (its +license on line 10, and the file containing the license text on line +11). + +On line 12, we tell Buildroot to pass custom options to the Python ++setup.py+ script when it is configuring the package. + +On line 13, we declare our dependencies, so that they are built +before the build process of our package starts. + +On line 14, we declare the specific Python build system being used. In +this case the +distutils+ Python build system is used. The two +supported ones are +distutils+ and +setuptools+. + +Finally, on line 16, we invoke the +python-package+ macro that +generates all the Makefile rules that actually allow the package to be +built. + +[[python-package-reference]] + ++python-package+ reference +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +As a policy, packages that merely provide Python modules should all be +named +python-<something>+ in Buildroot. Other packages that use the +Python build system, but are not Python modules, can freely choose +their name (existing examples in Buildroot are +scons+ and ++supervisor+). + +In their +Config.in+ file, they should depend on +BR2_PACKAGE_PYTHON+ +so that when Buildroot will enable Python 3 usage for modules, we will +be able to enable Python modules progressively on Python 3. + +The main macro of the Python package infrastructure is ++python-package+. It is similar to the +generic-package+ macro. It is +also possible to create Python host packages with the ++host-python-package+ macro. + +Just like the generic infrastructure, the Python infrastructure works +by defining a number of variables before calling the +python-package+ +or +host-python-package+ macros. + +All the package metadata information variables that exist in the +xref:generic-package-reference[generic package infrastructure] also +exist in the Python infrastructure: +PYTHON_FOO_VERSION+, ++PYTHON_FOO_SOURCE+, +PYTHON_FOO_PATCH+, +PYTHON_FOO_SITE+, ++PYTHON_FOO_SUBDIR+, +PYTHON_FOO_DEPENDENCIES+, +PYTHON_FOO_LICENSE+, ++PYTHON_FOO_LICENSE_FILES+, etc. + +Note that: + + * Setting +PYTHON_FOO_INSTALL_STAGING+ to +YES+ has no effect (unless + a +PYTHON_FOO_INSTALL_STAGING_CMDS+ variable is defined), since + Python modules generally don't need to be installed to the + +staging+ directory. + + * It is not necessary to add +python+ or +host-python+ in the + +PYTHON_FOO_DEPENDENCIES+ variable of a package, since these basic + dependencies are automatically added as needed by the Python
docs/manual/adding-packages-python.txt line 112
Quoted 10 lines
docs/manual/adding-packages-python.txt new file +10
-0+ package infrastructure. + + * Similarly, it is not needed to add +host-setuptools+ and/or + +host-distutilscross+ dependencies to +PYTHON_FOO_DEPENDENCIES+ for + setuptools-based packages, since these are automatically added by + the Python infrastructure as needed. + +One variable specific to the Python infrastructure is mandatory: + +* +PYTHON_FOO_BUILD_TYPE+, to define which Python build system is used
s/PYTHON_FOO_BUILD_TYPE/PYTHON_FOO_SETUP_TYPE/
Quoted 313 lines
docs/manual/adding-packages-python.txt new file +47
-0+ by the package. The two supported values are +distutils+ and + +setuptools+. If you don't know which one is used in your package, + look at the +setup.py+ file in your package source code, and see + whether it imports things from the +distutils+ module or the + +setuptools+ module. + +A few additional variables, specific to the Python infrastructure, can +optionally be defined, depending on the package's needs. Many of them +are only useful in very specific cases, typical packages will +therefore only use a few of them, or none. + +* +PYTHON_FOO_ENV+, to specify additional environment variables to + pass to the Python +setup.py+ script (for both the build and install + steps). Note that the infrastructure is automatically passing + several standard variables, defined in +PKG_PYTHON_DISTUTILS_ENV+ + (for distutils target packages), +HOST_PKG_PYTHON_DISTUTILS_ENV+ + (for distutils host packages), +PKG_PYTHON_SETUPTOOLS_ENV+ (for + setuptools target packages) and +HOST_PKG_PYTHON_SETUPTOOLS_ENV+ + (for setuptools host packages). + +* +PYTHON_FOO_BUILD_OPT+, to specify additional options to pass to the + Python +setup.py+ script during the build step. For target distutils + packages, the +PKG_PYTHON_DISTUTILS_BUILD_OPT+ options are already + passed automatically by the infrastructure. + +* +PYTHON_FOO_INSTALL_OPT+, to specify additional options to pass to + the Python +setup.py+ script during the installation step. Note that + the infrastructure is automatically passing some options, defined in + +PKG_PYTHON_DISTUTILS_INSTALL_OPT+ (for target distutils packages), + +HOST_PKG_PYTHON_DISTUTILS_INSTALL_OPT+ (for host distutils + packages), +PKG_PYTHON_SETUPTOOLS_INSTALL_OPT+ (for target + setuptools packages) and +HOST_PKG_PYTHON_SETUPTOOLS_INSTALL_OPT+ + (for host setuptools packages). + +With the Python infrastructure, all the steps required to build and +install the packages are already defined, and they generally work well +for most Python-based packages. However, when required, it is still +possible to customize what is done in any particular step: + +* By adding a post-operation hook (after extract, patch, configure, + build or install). See xref:hooks[] for details. + +* By overriding one of the steps. For example, even if the Python + infrastructure is used, if the package +.mk+ file defines its own + +PYTHON_FOO_BUILD_CMDS+ variable, it will be used instead of the + default Python one. However, using this method should be restricted + to very specific cases. Do not use it in the general case.docs/manual/adding-packages.txt +2
-0@@ -18,6 +18,8 @@ include::adding-packages-autotools.txt[] include::adding-packages-cmake.txt[] +include::adding-packages-python.txt[] + include::adding-packages-hooks.txt[] include::adding-packages-gettext.txt[]package/Makefile.in +1
-0@@ -371,4 +371,5 @@ include package/pkg-utils.mk include package/pkg-download.mk include package/pkg-autotools.mk include package/pkg-cmake.mk +include package/pkg-python.mk include package/pkg-generic.mkpackage/pkg-python.mk new file +52
-0@@ -0,0 +1,219 @@ +################################################################################ +# Python package infrastructure +# +# This file implements an infrastructure that eases development of +# package .mk files for Python packages. It should be used for all +# packages that use Python setup.py/setuptools as their build system. +# +# See the Buildroot documentation for details on the usage of this +# infrastructure +# +# In terms of implementation, this Python infrastructure requires the +# .mk file to only specify metadata informations about the package: +# name, version, download URL, etc. +# +# We still allow the package .mk file to override what the different +# steps are doing, if needed. For example, if <PKG>_BUILD_CMDS is +# already defined, it is used as the list of commands to perform to +# build the package, instead of the default Python behaviour. The +# package can also define some post operation hooks. +# +################################################################################ + +# Target distutils-based packages +PKG_PYTHON_DISTUTILS_ENV = \ + PATH="$(TARGET_PATH)" \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + LDSHARED="$(TARGET_CROSS)gcc -shared" \ + CROSS_COMPILING=yes \ + _python_sysroot=$(STAGING_DIR) \ + _python_srcdir=$(PYTHON_DIR) \ + _python_prefix=/usr \ + _python_exec_prefix=/usr + +PKG_PYTHON_DISTUTILS_BUILD_OPT = \ + --executable=/usr/bin/python + +PKG_PYTHON_DISTUTILS_INSTALL_OPT = \ + --prefix=$(TARGET_DIR)/usr + +# Host distutils-based packages +HOST_PKG_PYTHON_DISTUTILS_ENV = \ + PATH="$(HOST_PATH)" + +HOST_PKG_PYTHON_DISTUTILS_INSTALL_OPT = \ + --prefix=$(HOST_DIR)/usr + +# Target setuptools-based packages +PKG_PYTHON_SETUPTOOLS_ENV = \ + PATH="$(TARGET_PATH)" \ +PYTHONPATH="$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages" \
package/pkg-python.mk new file +89
-0+ PYTHONXCPREFIX="$(STAGING_DIR)/usr/" + +PKG_PYTHON_SETUPTOOLS_INSTALL_OPT = \ + --prefix=$(TARGET_DIR)/usr \ + --executable=/usr/bin/python \ + --single-version-externally-managed \ + --root=/ + +# Host setuptools-based packages +HOST_PKG_PYTHON_SETUPTOOLS_ENV = \ + PATH="$(HOST_PATH)" \ + PYTHONXCPREFIX="$(HOST_DIR)/usr/" + +HOST_PKG_PYTHON_SETUPTOOLS_INSTALL_OPT = \ + --prefix=$(HOST_DIR)/usr + +################################################################################ +# inner-python-package -- defines how the configuration, compilation +# and installation of a Python package should be done, implements a +# few hooks to tune the build process and calls the generic package +# infrastructure to generate the necessary make targets +# +# argument 1 is the lowercase package name +# argument 2 is the uppercase package name, including an HOST_ prefix +# for host packages +# argument 3 is the uppercase package name, without the HOST_ prefix +# for host packages +# argument 4 is the package directory prefix +# argument 5 is the type (target or host) +################################################################################ + +define inner-python-package + +$(2)_SRCDIR = $$($(2)_DIR)/$($(2)_SUBDIR) +$(2)_BUILDDIR = $$($(2)_SRCDIR) + +$(2)_ENV ?= +$(2)_BUILD_OPT ?= +$(2)_INSTALL_OPT ?= + +ifndef $(2)_SETUP_TYPE + ifdef $(3)_SETUP_TYPE + $(2)_SETUP_TYPE = $($(3)_SETUP_TYPE) + else + $$(error "$(1): Unknown or undefined <pkg>_SETUP_TYPE") + endif +endif + +# Distutils +ifeq ($$($(2)_SETUP_TYPE),distutils) +ifeq ($(5),target) +$(2)_BASE_ENV = $$(PKG_PYTHON_DISTUTILS_ENV) +$(2)_BASE_BUILD_TGT = build +$(2)_BASE_BUILD_OPT = $$(PKG_PYTHON_DISTUTILS_BUILD_OPT) +$(2)_BASE_INSTALL_OPT = $$(PKG_PYTHON_DISTUTILS_INSTALL_OPT) +else +$(2)_BASE_ENV = $$(HOST_PKG_PYTHON_DISTUTILS_ENV) +$(2)_BASE_BUILD_TGT = build +$(2)_BASE_BUILD_OPT = +$(2)_BASE_INSTALL_OPT = $$(HOST_PKG_PYTHON_DISTUTILS_INSTALL_OPT) +endif +# Setuptools +else ifeq ($$($(2)_SETUP_TYPE),setuptools) +ifeq ($(5),target) +$(2)_BASE_ENV = $$(PKG_PYTHON_SETUPTOOLS_ENV) +$(2)_BASE_BUILD_TGT = build -x +$(2)_BASE_BUILD_OPT = +$(2)_BASE_INSTALL_OPT = $$(PKG_PYTHON_SETUPTOOLS_INSTALL_OPT) +else +$(2)_BASE_ENV = $$(HOST_PKG_PYTHON_SETUPTOOLS_ENV) +$(2)_BASE_BUILD_TGT = build +$(2)_BASE_BUILD_OPT = +$(2)_BASE_INSTALL_OPT = $$(HOST_PKG_PYTHON_SETUPTOOLS_INSTALL_OPT) +endif +endif + +# The below statement intends to calculate the dependencies of host +# packages by derivating them from the dependencies of the +# corresponding target package, after adding the 'host-' prefix in +# front of the dependencies. +# +# However it must be repeated from inner-generic-package, as we need +# to exclude the python, host-python, host-python-setuptools and +# host-distutilscross packages, which are added below in the list of +# dependencies depending on the package characteristics, and shouldn't +# be derived automatically from the dependencies of the corresponding +# target package. For example, target packages need +# host-python-distutilscross, but not host packages. +$(2)_DEPENDENCIES ?= $(filter-out host-python host-python-setuptoolshost-python-distutilscross $(1),$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES))))
package/pkg-python.mk new file +77
-0+ +# Target packages need both the python interpreter on the target (for +# runtime) and the python interpreter on the host (for +# compilation). However, host packages only need the python +# interpreter on the host. +ifeq ($(5),target) +$(2)_DEPENDENCIES += host-python python +else +$(2)_DEPENDENCIES += host-python +endif + +# Setuptools based packages will need host-python-setuptools (both +# host and target) and host-python-distutilscross (only target +# packages). We need to have a special exclusion for the +# host-setuptools package itself: it is setuptools-based, but +# shouldn't depend on host-setuptools (because it would otherwise +# depend on itself!). +ifeq ($$($(2)_SETUP_TYPE),setuptools) +ifneq ($(2),HOST_PYTHON_SETUPTOOLS) +$(2)_DEPENDENCIES += host-python-setuptools +ifeq ($(5),target) +$(2)_DEPENDENCIES += host-python-distutilscross +endif +endif +endif + +# +# Build step. Only define it if not already defined by the package .mk +# file. +# +ifndef $(2)_BUILD_CMDS +define $(2)_BUILD_CMDS + (cd $$($$(PKG)_BUILDDIR)/; \ + $$($$(PKG)_BASE_ENV) $$($$(PKG)_ENV) \ + $(HOST_DIR)/usr/bin/python setup.py \ + $$($$(PKG)_BASE_BUILD_TGT) \ + $$($$(PKG)_BASE_BUILD_OPT) $$($$(PKG)_BUILD_OPT)) +endef +endif + +# +# Host installation step. Only define it if not already defined by the +# package .mk file. +# +ifndef $(2)_INSTALL_CMDS +define $(2)_INSTALL_CMDS + (cd $$($$(PKG)_BUILDDIR)/; \ + $$($$(PKG)_BASE_ENV) $$($$(PKG)_ENV) \ + $(HOST_DIR)/usr/bin/python setup.py install \ + $$($$(PKG)_BASE_INSTALL_OPT) $$($$(PKG)_INSTALL_OPT)) +endef +endif + +# +# Target installation step. Only define it if not already defined by +# the package .mk file. +# +ifndef $(2)_INSTALL_TARGET_CMDS +define $(2)_INSTALL_TARGET_CMDS + (cd $$($$(PKG)_BUILDDIR)/; \ + $$($$(PKG)_BASE_ENV) $$($$(PKG)_ENV) \ + $(HOST_DIR)/usr/bin/python setup.py install \ + $$($$(PKG)_BASE_INSTALL_OPT) $$($$(PKG)_INSTALL_OPT)) +endef +endif + +# Call the generic package infrastructure to generate the necessary +# make targets +$(call inner-generic-package,$(1),$(2),$(3),$(4),$(5)) + +endef + +################################################################################ +# python-package -- the target generator macro for Python packages +################################################################################ + +python-package = $(call inner-python-package,$(call pkgname),$(callUPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),target)
+host-python-package = $(call inner-python-package,host-$(call pkgname),$(call UPPERCASE,host-$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),host)
--
1.8.1.2
Quoted 5 lines
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Regards,
Signature · 4 lines
Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20131211/ad4e1c37/attachment-0001.html>
PATCH v2 1/36 package: introduce Python package infrastructure
Dear Samuel Martin,
(Would be good to trim down a little bit the e-mails you are replying to, to keep only the relevant parts. Thanks! :-))
Quoted 5 lines · Samuel Martin
docs/manual/adding-packages-python.txt line 112
Quoted 4 lines
docs/manual/adding-packages-python.txt new file +3
-0+One variable specific to the Python infrastructure is mandatory: + +* +PYTHON_FOO_BUILD_TYPE+, to define which Python build system is useds/PYTHON_FOO_BUILD_TYPE/PYTHON_FOO_SETUP_TYPE/
Aah, yes, indeed. I named it _BUILD_TYPE originally, but then changed my mind and renamed it _SETUP_TYPE, but forgot to adjust my documentation.
I will wait for some other comments to show up. If any, I will address this one in v3. If no further comments are made, hopefully Peter can fix that typo when applying the patch (which would avoid the need for me to respam the list with another set of 37 patches).
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 1/36 package: introduce Python package infrastructure
Quoted 14 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Dear Samuel Martin,
(Would be good to trim down a little bit the e-mails you are replying to, to keep only the relevant parts. Thanks! :-))Quoted 5 lines · Samuel Martin
docs/manual/adding-packages-python.txt line 112
Quoted 4 lines
docs/manual/adding-packages-python.txt new file +3
-0+One variable specific to the Python infrastructure is mandatory: + +* +PYTHON_FOO_BUILD_TYPE+, to define which Python build system is useds/PYTHON_FOO_BUILD_TYPE/PYTHON_FOO_SETUP_TYPE/
Quoted 8 lines
Aah, yes, indeed. I named it
_BUILD_TYPEoriginally, but then changed my mind and renamed it_SETUP_TYPE, but forgot to adjust my documentation.I will wait for some other comments to show up. If any, I will address this one in v3. If no further comments are made, hopefully Peter can fix that typo when applying the patch (which would avoid the need for me to respam the list with another set of 37 patches).
Sure, committed with that fixed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 2/36 python-bottle: convert to the Python package infrastructure
In reply to Thomas Petazzoni--- package/python-bottle/python-bottle.mk | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
package/python-bottle/python-bottle.mk +2 -10
@@ -7,16 +7,8 @@ PYTHON_BOTTLE_VERSION = 0.11.6 PYTHON_BOTTLE_SOURCE = bottle-$(PYTHON_BOTTLE_VERSION).tar.gz PYTHON_BOTTLE_SITE = http://pypi.python.org/packages/source/b/bottle -PYTHON_BOTTLE_DEPENDENCIES = python PYTHON_BOTTLE_LICENSE = MIT # README.rst refers to the file "LICENSE" but it's not included +PYTHON_BOTTLE_SETUP_TYPE = distutils -define PYTHON_BOTTLE_BUILD_CMDS - (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build --executable=/usr/bin/python) -endef - -define PYTHON_BOTTLE_INSTALL_TARGET_CMDS - (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr) -endef - -$(eval $(generic-package)) +$(eval $(python-package))
Signature · 1 line
1.8.1.2
PATCH v2 3/36 python-crc16: convert to the Python package infrastructure
In reply to Thomas Petazzoni--- package/python-crc16/python-crc16.mk | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-)
package/python-crc16/python-crc16.mk +2 -23
@@ -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))
Signature · 1 line
1.8.1.2
PATCH v2 4/36 python-dpkt: convert to the Python package infrastructure
In reply to Thomas Petazzoni--- package/python-dpkt/python-dpkt.mk | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-)
package/python-dpkt/python-dpkt.mk +2 -11
@@ -7,15 +7,6 @@ PYTHON_DPKT_VERSION = 1.7 PYTHON_DPKT_SOURCE = dpkt-$(PYTHON_DPKT_VERSION).tar.gz PYTHON_DPKT_SITE = http://dpkt.googlecode.com/files +PYTHON_DPKT_SETUP_TYPE = distutils -PYTHON_DPKT_DEPENDENCIES = python - -define PYTHON_DPKT_BUILD_CMDS - (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build) -endef - -define PYTHON_DPKT_INSTALL_TARGET_CMDS - (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr) -endef - -$(eval $(generic-package)) +$(eval $(python-package))
Signature · 1 line
1.8.1.2
PATCH v2 5/36 python-id3: convert to the Python package infrastructure
In reply to Thomas Petazzoni--- package/python-id3/python-id3.mk | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-)
package/python-id3/python-id3.mk +2 -11
@@ -7,15 +7,6 @@ PYTHON_ID3_VERSION = 1.2 PYTHON_ID3_SOURCE = id3-py_$(PYTHON_ID3_VERSION).tar.gz PYTHON_ID3_SITE = http://downloads.sourceforge.net/project/id3-py/id3-py/$(PYTHON_ID3_VERSION) +PYTHON_ID3_SETUP_TYPE = distutils -PYTHON_ID3_DEPENDENCIES = python - -define PYTHON_ID3_BUILD_CMDS - (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build) -endef - -define PYTHON_ID3_INSTALL_TARGET_CMDS - (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr) -endef - -$(eval $(generic-package)) +$(eval $(python-package))
Signature · 1 line
1.8.1.2
PATCH v2 6/36 python-ipy: convert to the Python package infrastructure
In reply to Thomas Petazzoni--- package/python-ipy/python-ipy.mk | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-)
package/python-ipy/python-ipy.mk +2 -15
@@ -6,21 +6,8 @@ PYTHON_IPY_VERSION = IPy-0.75 PYTHON_IPY_SITE = $(call github,haypo,python-ipy,$(PYTHON_IPY_VERSION)) -PYTHON_IPY_DEPENDENCIES = host-python python PYTHON_IPY_LICENSE = BSD-3c PYTHON_IPY_LICENSE_FILES = COPYING +PYTHON_IPY_SETUP_TYPE = distutils -define PYTHON_IPY_BUILD_CMDS - (cd $(@D); \ - $(TARGET_CONFIGURE_OPTS) \ - $(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_IPY_INSTALL_TARGET_CMDS - (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr) -endef - -$(eval $(generic-package)) +$(eval $(python-package))
Signature · 1 line
1.8.1.2
PATCH v2 7/36 python-m2crypto: convert to the Python package infrastructure
In reply to Thomas Petazzoni--- package/python-m2crypto/python-m2crypto.mk | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-)
package/python-m2crypto/python-m2crypto.mk +8 -12
@@ -7,20 +7,16 @@ PYTHON_M2CRYPTO_VERSION = 0.21.1 PYTHON_M2CRYPTO_SITE = http://pypi.python.org/packages/source/M/M2Crypto PYTHON_M2CRYPTO_SOURCE = M2Crypto-$(PYTHON_M2CRYPTO_VERSION).tar.gz -HOST_PYTHON_M2CRYPTO_DEPENDENCIES = host-openssl host-python host-python-setuptools host-swig +PYTHON_M2CRYPTO_SETUP_TYPE = setuptools +HOST_PYTHON_M2CRYPTO_DEPENDENCIES = host-openssl host-swig +# We need to override the build commands to be able to use build_ext, +# which accepts the --openssl option. define HOST_PYTHON_M2CRYPTO_BUILD_CMDS (cd $(@D); \ - $(HOST_CONFIGURE_OPTS) \ - PYTHONXCPREFIX="$(HOST_DIR)/usr/" \ - LDFLAGS="-L$(HOST_DIR)/lib -L$(HOST_DIR)/usr/lib" \ - $(HOST_DIR)/usr/bin/python setup.py build_ext --openssl=$(HOST_DIR)/usr) + $(HOST_PKG_PYTHON_SETUPTOOLS_ENV) \ + $(HOST_DIR)/usr/bin/python setup.py build_ext \ + --openssl=$(HOST_DIR)/usr) endef -define HOST_PYTHON_M2CRYPTO_INSTALL_CMDS - (cd $(@D); \ - PYTHONPATH=$(HOST_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \ - $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(HOST_DIR)/usr) -endef - -$(eval $(host-generic-package)) +$(eval $(host-python-package))
Signature · 1 line
1.8.1.2
PATCH v2 8/36 python-mad: convert to the Python package infrastructure
In reply to Thomas Petazzoni--- package/python-mad/python-mad.mk | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-)
package/python-mad/python-mad.mk +3 -17
@@ -7,8 +7,9 @@ PYTHON_MAD_VERSION = 0.6 PYTHON_MAD_SOURCE = pymad-$(PYTHON_MAD_VERSION).tar.gz PYTHON_MAD_SITE = http://spacepants.org/src/pymad/download/ +PYTHON_MAD_SETUP_TYPE = distutils -PYTHON_MAD_DEPENDENCIES = python libmad +PYTHON_MAD_DEPENDENCIES = libmad ifeq ($(BR2_ENDIAN),"LITTLE") PYTHON_MAD_ENDIAN=little
@@ -23,19 +24,4 @@ define PYTHON_MAD_CONFIGURE_CMDS echo "mad_include_dir = $(STAGING_DIR)/usr/include" >> $(@D)/Setup endef -define PYTHON_MAD_BUILD_CMDS - (cd $(@D); \ - CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS)" \ - LDSHARED="$(TARGET_CC) -shared" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ - $(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_MAD_INSTALL_TARGET_CMDS - (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr) -endef - -$(eval $(generic-package)) +$(eval $(python-package))
Signature · 1 line
1.8.1.2
PATCH v2 9/36 python-meld3: convert to the Python package infrastructure
In reply to Thomas Petazzoni--- package/python-meld3/python-meld3.mk | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
package/python-meld3/python-meld3.mk +2 -10
@@ -7,16 +7,8 @@ PYTHON_MELD3_VERSION = 0.6.8 PYTHON_MELD3_SOURCE = meld3-$(PYTHON_MELD3_VERSION).tar.gz PYTHON_MELD3_SITE = http://pypi.python.org/packages/source/m/meld3/ -PYTHON_MELD3_DEPENDENCIES = python PYTHON_MELD3_LICENSE = ZPLv2.1 PYTHON_MELD3_LICENSE_FILES = COPYRIGHT.txt LICENSE.txt +PYTHON_MELD3_SETUP_TYPE = distutils -define PYTHON_MELD3_BUILD_CMDS - (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build) -endef - -define PYTHON_MELD3_INSTALL_TARGET_CMDS - (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr) -endef - -$(eval $(generic-package)) +$(eval $(python-package))
Signature · 1 line
1.8.1.2
PATCH v2 10/36 python-nfc: convert to the Python package infrastructure
In reply to Thomas Petazzoni--- package/python-nfc/python-nfc.mk | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-)
package/python-nfc/python-nfc.mk +3 -10
@@ -7,14 +7,7 @@ PYTHON_NFC_VERSION = 142 PYTHON_NFC_SITE = https://launchpad.net/nfcpy PYTHON_NFC_SITE_METHOD = bzr -PYTHON_NFC_DEPENDENCIES = python libusb libusb-compat +PYTHON_NFC_DEPENDENCIES = libusb libusb-compat +PYTHON_NFC_SETUP_TYPE = distutils -define PYTHON_NFC_BUILD_CMDS - (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build) -endef - -define PYTHON_NFC_INSTALL_TARGET_CMDS - (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr) -endef - -$(eval $(generic-package)) +$(eval $(python-package))
Signature · 1 line
1.8.1.2
PATCH v2 11/36 python-protobuf: convert to the Python package infrastructure
In reply to Thomas Petazzoni--- package/python-protobuf/python-protobuf.mk | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-)
package/python-protobuf/python-protobuf.mk +4 -16
@@ -9,20 +9,8 @@ PYTHON_PROTOBUF_SOURCE = $(PROTOBUF_SOURCE) PYTHON_PROTOBUF_SITE = $(PROTOBUF_SITE) PYTHON_PROTOBUF_LICENSE = BSD-3c PYTHON_PROTOBUF_LICENSE_FILES = COPYING.txt +PYTHON_PROTOBUF_DEPENDENCIES = host-protobuf +PYTHON_PROTOBUF_SETUP_TYPE = setuptools +PYTHON_PROTOBUF_SUBDIR = python -PYTHON_PROTOBUF_DEPENDENCIES = python host-python-setuptools \ - host-python-distutilscross host-protobuf - -define PYTHON_PROTOBUF_BUILD_CMDS - (cd $(@D)/python; \ - PYTHONXCPREFIX="$(STAGING_DIR)/usr/" \ - PATH=$(HOST_PATH) \ - $(HOST_DIR)/usr/bin/python setup.py build -x) -endef - -define PYTHON_PROTOBUF_INSTALL_TARGET_CMDS - (cd $(@D)/python; 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 $(generic-package)) +$(eval $(python-package))
Signature · 1 line
1.8.1.2
PATCH v2 12/36 python-pygame: convert to the Python package infrastructure
In reply to Thomas Petazzoni--- package/python-pygame/python-pygame.mk | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-)
package/python-pygame/python-pygame.mk +8 -17
@@ -10,6 +10,7 @@ PYTHON_PYGAME_VERSION = f0bb4a4b365d PYTHON_PYGAME_SOURCE = pygame-$(PYTHON_PYGAME_VERSION).tar.gz PYTHON_PYGAME_SITE = https://bitbucket.org/pygame/pygame PYTHON_PYGAME_SITE_METHOD = hg +PYTHON_PYGAME_SETUP_TYPE = distutils ifeq ($(BR2_PACKAGE_PYTHON_PYGAME_IMAGE),y) PYTHON_PYGAME_OPT_DEPENDS += sdl_image
@@ -23,7 +24,7 @@ ifeq ($(BR2_PACKAGE_PYTHON_PYGAME_MIXER),y) PYTHON_PYGAME_OPT_DEPENDS += sdl_mixer endif -PYTHON_PYGAME_DEPENDENCIES = python sdl $(PYTHON_PYGAME_OPT_DEPENDS) +PYTHON_PYGAME_DEPENDENCIES = sdl $(PYTHON_PYGAME_OPT_DEPENDS) ifneq ($(BR2_PACKAGE_PYTHON_PYGAME_IMAGE),y) define PYTHON_PYGAME_UNCONFIGURE_IMAGE
@@ -81,28 +82,18 @@ define PYTHON_PYGAME_CONFIGURE_CMDS $(PYTHON_PYGAME_UNCONFIGURE_SCRAP) endef -define PYTHON_PYGAME_BUILD_CMDS - (cd $(@D); CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \ - LDSHARED="$(TARGET_CROSS)gcc -shared" \ - CROSS_COMPILING=yes \ - _python_sysroot=$(STAGING_DIR) \ - _python_srcdir=$(BUILD_DIR)/python$(PYTHON_VERSION) \ - _python_prefix=/usr \ - _python_exec_prefix=/usr \ - $(HOST_DIR)/usr/bin/python setup.py build) -endef - ifneq ($(BR2_HAVE_DOCUMENTATION),y) define PYTHON_PYGAME_REMOVE_DOC rm -rf $(TARGET_DIR)/usr/lib/python*/site-packages/pygame/docs endef + +PYTHON_PYGAME_POST_INSTALL_TARGET_HOOKS += PYTHON_PYGAME_REMOVE_DOC endif -define PYTHON_PYGAME_INSTALL_TARGET_CMDS - (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install \ - --prefix=$(TARGET_DIR)/usr) +define PYTHON_PYGAME_REMOVE_TESTS rm -rf $(TARGET_DIR)/usr/lib/python*/site-packages/pygame/tests - $(PYTHON_PYGAME_REMOVE_DOC) endef -$(eval $(generic-package)) +PYTHON_PYGAME_POST_INSTALL_TARGET_HOOKS += PYTHON_PYGAME_REMOVE_TESTS + +$(eval $(python-package))
Signature · 1 line
1.8.1.2
PATCH v2 13/36 python-pyparsing: convert to the Python package infrastructure
In reply to Thomas Petazzoni--- package/python-pyparsing/python-pyparsing.mk | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-)
package/python-pyparsing/python-pyparsing.mk +2 -26
@@ -9,30 +9,6 @@ PYTHON_PYPARSING_SOURCE = pyparsing-$(PYTHON_PYPARSING_VERSION).tar.gz PYTHON_PYPARSING_SITE = http://downloads.sourceforge.net/project/pyparsing/pyparsing/pyparsing-$(PYTHON_PYPARSING_VERSION) PYTHON_PYPARSING_LICENSE = MIT PYTHON_PYPARSING_LICENSE_FILES = LICENSE -PYTHON_PYPARSING_INSTALL_STAGING = YES -PYTHON_PYPARSING_DEPENDENCIES = python +PYTHON_PYPARSING_SETUP_TYPE = distutils -# Shamelessly vampirised from python-pygame ;-) -define PYTHON_PYPARSING_BUILD_CMDS - (cd $(@D); \ - CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS)" \ - LDSHARED="$(TARGET_CROSS)gcc -shared" \ - CROSS_COMPILING=yes \ - _python_sysroot=$(STAGING_DIR) \ - _python_srcdir=$(BUILD_DIR)/python$(PYTHON_VERSION) \ - _python_prefix=/usr \ - _python_exec_prefix=/usr \ - $(HOST_DIR)/usr/bin/python setup.py build \ - ) -endef - -# Shamelessly vampirised from python-pygame ;-) -define PYTHON_PYPARSING_INSTALL_TARGET_CMDS - (cd $(@D); \ - $(HOST_DIR)/usr/bin/python setup.py install \ - --prefix=$(TARGET_DIR)/usr \ - ) -endef - -$(eval $(generic-package)) +$(eval $(python-package))
Signature · 1 line
1.8.1.2
PATCH v2 14/36 python-pyro: convert to the Python package infrastructure
In reply to Thomas Petazzoni--- package/python-pyro/python-pyro.mk | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
package/python-pyro/python-pyro.mk +2 -6
@@ -9,10 +9,6 @@ PYTHON_PYRO_SOURCE = Pyro-$(PYTHON_PYRO_VERSION).tar.gz PYTHON_PYRO_SITE = https://pypi.python.org/packages/source/P/Pyro/ PYTHON_PYRO_LICENSE = MIT PYTHON_PYRO_LICENSE_FILES = LICENSE -PYTHON_PYRO_DEPENDENCIES = python +PYTHON_PYRO_SETUP_TYPE = distutils -define PYTHON_PYRO_INSTALL_TARGET_CMDS - (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr) -endef - -$(eval $(generic-package)) +$(eval $(python-package))
Signature · 1 line
1.8.1.2
PATCH v2 15/36 python-pyzmq: convert to the Python package infrastructure
In reply to Thomas Petazzoni--- package/python-pyzmq/python-pyzmq.mk | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-)
package/python-pyzmq/python-pyzmq.mk +3 -23
@@ -10,7 +10,8 @@ PYTHON_PYZMQ_SITE = http://pypi.python.org/packages/source/p/pyzmq/ PYTHON_PYZMQ_LICENSE = LGPLv3+ BSD-3c Apache License Version 2.0 # Apache license only online: http://www.apache.org/licenses/LICENSE-2.0 PYTHON_PYZMQ_LICENSE_FILES = COPYING.LESSER COPYING.BSD -PYTHON_PYZMQ_DEPENDENCIES = zeromq python host-python +PYTHON_PYZMQ_DEPENDENCIES = zeromq +PYTHON_PYZMQ_SETUP_TYPE = distutils # Due to issues with cross-compiling, hardcode to the zeromq in BR define PYTHON_PYZMQ_PATCH_ZEROMQ_VERSION
@@ -20,25 +21,4 @@ endef PYTHON_PYZMQ_POST_PATCH_HOOKS += PYTHON_PYZMQ_PATCH_ZEROMQ_VERSION -PYTHON_PYZMQ_PARAMS = CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS)" \ - LDSHARED="$(TARGET_CC) -shared" \ - CROSS_COMPILING=yes \ - _python_sysroot=$(STAGING_DIR) \ - _python_srcdir=$(PYTHON_DIR) \ - _python_prefix=/usr \ - _python_exec_prefix=/usr - -define PYTHON_PYZMQ_CONFIGURE_CMDS - (cd $(@D); $(PYTHON_PYZMQ_PARAMS) \ - $(HOST_DIR)/usr/bin/python setup.py configure \ - --zmq=$(STAGING_DIR)/usr) -endef - -define PYTHON_PYZMQ_INSTALL_TARGET_CMDS - (cd $(@D); $(PYTHON_PYZMQ_PARAMS) \ - $(HOST_DIR)/usr/bin/python setup.py install \ - --prefix=$(TARGET_DIR)/usr) -endef - -$(eval $(generic-package)) +$(eval $(python-package))
Signature · 1 line
1.8.1.2
PATCH v2 16/36 python-serial: convert to the Python package infrastructure
In reply to Thomas Petazzoni--- package/python-serial/python-serial.mk | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-)
package/python-serial/python-serial.mk +2 -11
@@ -7,15 +7,6 @@ PYTHON_SERIAL_VERSION = 2.6 PYTHON_SERIAL_SOURCE = pyserial-$(PYTHON_SERIAL_VERSION).tar.gz PYTHON_SERIAL_SITE = http://pypi.python.org/packages/source/p/pyserial +PYTHON_SERIAL_SETUP_TYPE = distutils -PYTHON_SERIAL_DEPENDENCIES = python - -define PYTHON_SERIAL_BUILD_CMDS - (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build --executable=/usr/bin/python) -endef - -define PYTHON_SERIAL_INSTALL_TARGET_CMDS - (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr) -endef - -$(eval $(generic-package)) +$(eval $(python-package))
Signature · 1 line
1.8.1.2
PATCH v2 17/36 python-setuptools: convert to the Python package infrastructure
In reply to Thomas Petazzoni--- package/python-setuptools/python-setuptools.mk | 28 +++----------------------- 1 file changed, 3 insertions(+), 25 deletions(-)
package/python-setuptools/python-setuptools.mk +3 -25
@@ -12,29 +12,7 @@ PYTHON_SETUPTOOLS_VERSION = 0.6.36 PYTHON_SETUPTOOLS_SOURCE = distribute-$(PYTHON_SETUPTOOLS_VERSION).tar.gz PYTHON_SETUPTOOLS_SITE = http://pypi.python.org/packages/source/d/distribute -PYTHON_SETUPTOOLS_DEPENDENCIES = python +PYTHON_SETUPTOOLS_SETUP_TYPE = setuptools -define HOST_PYTHON_SETUPTOOLS_BUILD_CMDS - (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build) -endef - -define PYTHON_SETUPTOOLS_BUILD_CMDS - (cd $(@D); \ - PYTHONPATH="$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages" \ - $(HOST_DIR)/usr/bin/python setup.py build) -endef - -define HOST_PYTHON_SETUPTOOLS_INSTALL_CMDS - (cd $(@D); \ - $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(HOST_DIR)/usr) -endef - -define PYTHON_SETUPTOOLS_INSTALL_TARGET_CMDS - (cd $(@D); \ - PYTHONPATH="$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages" \ - $(HOST_DIR)/usr/bin/python setup.py install --executable=/usr/bin/python \ - --single-version-externally-managed --root=/ --prefix=$(TARGET_DIR)/usr) -endef - -$(eval $(generic-package)) -$(eval $(host-generic-package)) +$(eval $(python-package)) +$(eval $(host-python-package))
Signature · 1 line
1.8.1.2
PATCH v2 18/36 scons: convert to the Python package infrastructure
In reply to Thomas Petazzoni--- package/scons/scons.mk | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-)
package/scons/scons.mk +4 -9
@@ -8,17 +8,12 @@ SCONS_VERSION = 2.3.0 SCONS_SITE = http://downloads.sourceforge.net/project/scons/scons/$(SCONS_VERSION) SCONS_LICENSE = MIT SCONS_LICENSE_FILES = LICENSE.txt +SCONS_SETUP_TYPE = distutils -define HOST_SCONS_BUILD_CMDS - (cd $(@D); python setup.py build) -endef +HOST_SCONS_INSTALL_OPT = \ + --install-lib=$(HOST_DIR)/usr/lib/scons-$(SCONS_VERSION) -define HOST_SCONS_INSTALL_CMDS - (cd $(@D); python setup.py install --prefix=$(HOST_DIR)/usr \ - --install-lib=$(HOST_DIR)/usr/lib/scons-$(SCONS_VERSION)) -endef - -$(eval $(host-generic-package)) +$(eval $(host-python-package)) # variables used by other packages SCONS = $(HOST_DIR)/usr/bin/scons
Signature · 1 line
1.8.1.2
PATCH v2 19/36 python-netifaces: convert to the Python package infrastructure
In reply to Thomas PetazzoniAlso, remove the "select BR2_PACKAGE_PYTHON_SETUPTOOLS", since setuptools is a host dependency (needed to built the package), not a target dependency.
--- package/python-netifaces/Config.in | 1 - package/python-netifaces/python-netifaces.mk | 19 ++----------------- 2 files changed, 2 insertions(+), 18 deletions(-)
package/python-netifaces/Config.in +0 -1
@@ -1,7 +1,6 @@ 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.
package/python-netifaces/python-netifaces.mk +2 -17
@@ -7,21 +7,6 @@ PYTHON_NETIFACES_VERSION = 0.7 PYTHON_NETIFACES_SOURCE = netifaces-$(PYTHON_NETIFACES_VERSION).tar.gz PYTHON_NETIFACES_SITE = http://alastairs-place.net/projects/netifaces +PYTHON_NETIFACES_SETUP_TYPE = setuptools -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 -x) -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 \ - --single-version-externally-managed --root=/ --prefix=$(TARGET_DIR)/usr) -endef - -$(eval $(generic-package)) +$(eval $(python-package))
Signature · 1 line
1.8.1.2
PATCH v2 20/36 supervisor: convert to the Python package infrastructure
In reply to Thomas PetazzoniRemove the select of BR2_PACKAGE_PYTHON_SETUPTOOLS, since what is really needed is host-setuptools (as can be seen from the original .mk file), and not setuptools for the target.
Also, remove the mangling of the Python shebang, since it's now done by passing the --executable= option at install time (done in the Python package infrastructure).
Finally, convert the package to use <pkg>_INSTALL_INIT_SYSV.
--- package/supervisor/Config.in | 1 - package/supervisor/supervisor.mk | 22 +++++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-)
package/supervisor/Config.in +0 -1
@@ -1,7 +1,6 @@ config BR2_PACKAGE_SUPERVISOR bool "supervisor" depends on BR2_PACKAGE_PYTHON - select BR2_PACKAGE_PYTHON_SETUPTOOLS select BR2_PACKAGE_PYTHON_MELD3 help A client/server system that allows its users to control a
package/supervisor/supervisor.mk +11 -11
@@ -7,19 +7,19 @@ SUPERVISOR_VERSION = 3.0a12 SUPERVISOR_SITE = http://pypi.python.org/packages/source/s/supervisor/ SUPERVISOR_LICENSE_FILES = LICENSES.txt +SUPERVISOR_SETUP_TYPE = setuptools -SUPERVISOR_DEPENDENCIES = python host-python-setuptools - -define SUPERVISOR_BUILD_CMDS - (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build) +define SUPERVISOR_INSTALL_CONF_FILES + $(INSTALL) -d -m 755 $(TARGET_DIR)/etc/supervisor.d + $(INSTALL) -D -m 644 package/supervisor/supervisord.conf \ + $(TARGET_DIR)/etc/supervisord.conf endef -define SUPERVISOR_INSTALL_TARGET_CMDS - (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=/usr --root=$(TARGET_DIR)) - sed -i '1s|#!.*python.*|#!/usr/bin/env python|' $(TARGET_DIR)/usr/bin/{echo_supervisord_conf,pidproxy,supervisorctl,supervisord} - $(INSTALL) -d -m 755 $(TARGET_DIR)/etc/supervisor.d - $(INSTALL) -D -m 644 package/supervisor/supervisord.conf $(TARGET_DIR)/etc/supervisord.conf - $(INSTALL) -m 755 package/supervisor/S99supervisord $(TARGET_DIR)/etc/init.d/S99supervisord +SUPERVISOR_POST_INSTALL_TARGET_HOOKS += SUPERVISOR_INSTALL_CONF_FILES + +define SUPERVISOR_INSTALL_INIT_SYSV + $(INSTALL) -D -m 755 package/supervisor/S99supervisord \ + $(TARGET_DIR)/etc/init.d/S99supervisord endef -$(eval $(generic-package)) +$(eval $(python-package))
Signature · 1 line
1.8.1.2
PATCH v2 21/36 python-distutilscross: convert to the Python package infrastructure
In reply to Thomas Petazzoni--- package/python-distutilscross/python-distutilscross.mk | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-)
package/python-distutilscross/python-distutilscross.mk +2 -11
@@ -7,15 +7,6 @@ PYTHON_DISTUTILSCROSS_VERSION = 0.1 PYTHON_DISTUTILSCROSS_SOURCE = distutilscross-$(PYTHON_DISTUTILSCROSS_VERSION).tar.gz PYTHON_DISTUTILSCROSS_SITE = http://pypi.python.org/packages/source/d/distutilscross +PYTHON_DISTUTILSCROSS_SETUP_TYPE = setuptools -HOST_PYTHON_DISTUTILSCROSS_DEPENDENCIES = host-python host-python-setuptools - -define HOST_PYTHON_DISTUTILSCROSS_BUILD_CMDS - (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build) -endef - -define HOST_PYTHON_DISTUTILSCROSS_INSTALL_CMDS - (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(HOST_DIR)/usr) -endef - -$(eval $(host-generic-package)) +$(eval $(host-python-package))
Signature · 1 line
1.8.1.2
PATCH v2 22/36 python-thrift: convert to the Python package infrastructure
In reply to Thomas Petazzoni--- package/python-thrift/python-thrift.mk | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-)
package/python-thrift/python-thrift.mk +3 -23
@@ -9,27 +9,7 @@ PYTHON_THRIFT_SOURCE = thrift-$(PYTHON_THRIFT_VERSION).tar.gz PYTHON_THRIFT_SITE = http://www.us.apache.org/dist/thrift/$(PYTHON_THRIFT_VERSION) PYTHON_THRIFT_LICENSE = Apache-2.0 PYTHON_THRIFT_LICENSE_FILES = LICENSE -PYTHON_THRIFT_DEPENDENCIES = python +PYTHON_THRIFT_SETUP_TYPE = setuptools +PYTHON_THRIFT_SUBDIR = lib/py -define PYTHON_THRIFT_BUILD_CMDS - (cd $(@D)/lib/py; \ - CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS)" \ - LDSHARED="$(TARGET_CROSS)gcc -shared" \ - CROSS_COMPILING=yes \ - _python_sysroot=$(STAGING_DIR) \ - _python_srcdir=$(BUILD_DIR)/python$(PYTHON_VERSION) \ - _python_prefix=/usr \ - _python_exec_prefix=/usr \ - $(HOST_DIR)/usr/bin/python setup.py build) -endef - -# host-distutilscross, if it has been installed before, will check that -# the installation directory is in python's load path. For host-python, -# it is not, so add it explicitly while installing to target. -define PYTHON_THRIFT_INSTALL_TARGET_CMDS - (cd $(@D)/lib/py; 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 $(generic-package)) +$(eval $(python-package))
Signature · 1 line
1.8.1.2
PATCH v2 23/36 python-dialog: convert to the Python package infrastructure
In reply to Thomas Petazzoni--- package/python-dialog/python-dialog.mk | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-)
package/python-dialog/python-dialog.mk +3 -11
@@ -9,15 +9,7 @@ PYTHON_DIALOG_SOURCE = python2-pythondialog-$(PYTHON_DIALOG_VERSION).tar.bz2 PYTHON_DIALOG_SITE = http://downloads.sourceforge.net/project/pythondialog/pythondialog/$(PYTHON_DIALOG_VERSION) PYTHON_DIALOG_LICENSE = LGPLv2.1+ PYTHON_DIALOG_LICENSE_FILES = COPYING +PYTHON_DIALOG_SETUP_TYPE = distutils +PYTHON_DIALOG_DEPENDENCIES = dialog -PYTHON_DIALOG_DEPENDENCIES = python dialog - -define PYTHON_DIALOG_BUILD_CMDS - (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py build) -endef - -define PYTHON_DIALOG_INSTALL_TARGET_CMDS - (cd $(@D); $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr) -endef - -$(eval $(generic-package)) +$(eval $(python-package))
Signature · 1 line
1.8.1.2
PATCH v2 24/36 python-pyusb: new package
In reply to Thomas PetazzoniFrom: "Wojciech M. Zabolotny" <[email protected]>
[Thomas: converted to the Python package infrastructure, added missing libusb dependency in the .mk file, added missing newline in the Config.in file, fix the package description]
--- package/Config.in | 1 + package/python-pyusb/Config.in | 14 ++++++++++++++ package/python-pyusb/python-pyusb.mk | 14 ++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 package/python-pyusb/Config.in create mode 100644 package/python-pyusb/python-pyusb.mk
package/Config.in +1 -0
@@ -399,6 +399,7 @@ source "package/python-protobuf/Config.in" source "package/python-pygame/Config.in" source "package/python-pyparsing/Config.in" source "package/python-pyro/Config.in" +source "package/python-pyusb/Config.in" source "package/python-pyzmq/Config.in" source "package/python-serial/Config.in" source "package/python-setuptools/Config.in"
package/python-pyusb/Config.in new file +14 -0
@@ -0,0 +1,14 @@ +config BR2_PACKAGE_PYTHON_PYUSB + bool "python-pyusb" + depends on BR2_PACKAGE_PYTHON + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + select BR2_PACKAGE_LIBUSB + help + The PyUSB module provides easy access to the Universal + Serial Bus (USB) from Python. + + http://sourceforge.net/apps/trac/pyusb/ + +comment "python-pyusb needs a toolchain w/ threads" + depends on BR2_PACKAGE_PYTHON + depends on !BR2_TOOLCHAIN_HAS_THREADS
package/python-pyusb/python-pyusb.mk new file +14 -0
@@ -0,0 +1,14 @@ +################################################################################ +# +# python-pyusb +# +################################################################################ + +PYTHON_PYUSB_VERSION = 0546cad8980783c39f96db717005a550059b730f +PYTHON_PYUSB_SITE = $(call github,walac,pyusb,$(PYTHON_PYUSB_VERSION)) +PYTHON_PYUSB_LICENSE = BSD-3c +PYTHON_PYUSB_LICENSE_FILES = LICENSE +PYTHON_PYUSB_SETUP_TYPE = distutils +PYTHON_PYUSB_DEPENDENCIES = libusb + +$(eval $(python-package))
Signature · 1 line
1.8.1.2
PATCH v2 25/36 python-msgpack: new package
In reply to Thomas PetazzoniFrom: "Wojciech M. Zabolotny" <[email protected]>
[Thomas: convert to the Python package infrastructure, added missing dependency on C++, inherited from msgpack.]
--- package/Config.in | 1 + package/python-msgpack/Config.in | 16 ++++++++++++++++ package/python-msgpack/python-msgpack.mk | 15 +++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 package/python-msgpack/Config.in create mode 100644 package/python-msgpack/python-msgpack.mk
package/Config.in +1 -0
@@ -393,6 +393,7 @@ source "package/python-id3/Config.in" source "package/python-ipy/Config.in" source "package/python-mad/Config.in" source "package/python-meld3/Config.in" +source "package/python-msgpack/Config.in" source "package/python-netifaces/Config.in" source "package/python-nfc/Config.in" source "package/python-protobuf/Config.in"
package/python-msgpack/Config.in new file +16 -0
@@ -0,0 +1,16 @@ +config BR2_PACKAGE_PYTHON_MSGPACK + bool "python-msgpack" + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_MSGPACK + depends on BR2_INSTALL_LIBSTDCPP # msgpack + help + MessagePack (http://msgpack.org/) is a fast, compact binary + serialization format, suitable for similar data to JSON. + This package provides CPython bindings for reading and + writing MessagePack data. + + https://pypi.python.org/pypi/msgpack-python/ + +comment "python-msgpack needs a toolchain w/ C++" + depends on BR2_PACKAGE_PYTHON + depends on !BR2_INSTALL_LIBSTDCPP
package/python-msgpack/python-msgpack.mk new file +15 -0
@@ -0,0 +1,15 @@ +################################################################################ +# +# python-msgpack +# +################################################################################ + +PYTHON_MSGPACK_VERSION = 0.4.0 +PYTHON_MSGPACK_SOURCE = msgpack-python-$(PYTHON_MSGPACK_VERSION).tar.gz +PYTHON_MSGPACK_SITE = https://pypi.python.org/packages/source/m/msgpack-python/ +PYTHON_MSGPACK_LICENSE = Apache License, Version 2.0 +PYTHON_MSGPACK_LICENSE_FILES = COPYING +PYTHON_MSGPACK_SETUP_TYPE = setuptools +PYTHON_MSGPACK_DEPENDENCIES = msgpack + +$(eval $(python-package))
Signature · 1 line
1.8.1.2
PATCH v2 26/36 python-configobj: new package
In reply to Thomas PetazzoniFrom: Zoltan Gyarmati <[email protected]>
[Thomas: convert to the Python package infrastructure.]
--- package/Config.in | 1 + package/python-configobj/Config.in | 10 ++++++++++ package/python-configobj/python-configobj.mk | 14 ++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 package/python-configobj/Config.in create mode 100644 package/python-configobj/python-configobj.mk
package/Config.in +1 -0
@@ -386,6 +386,7 @@ source "package/python/Config.in" if BR2_PACKAGE_PYTHON menu "external python modules" source "package/python-bottle/Config.in" +source "package/python-configobj/Config.in" source "package/python-crc16/Config.in" source "package/python-dialog/Config.in" source "package/python-dpkt/Config.in"
package/python-configobj/Config.in new file +10 -0
@@ -0,0 +1,10 @@ +config BR2_PACKAGE_PYTHON_CONFIGOBJ + bool "python-configobj" + depends on BR2_PACKAGE_PYTHON + help + ConfigObj is a simple but powerful config file reader and + writer: an ini file round tripper. Its main feature is that + it is very easy to use, with a straightforward programmer's + interface and a simple syntax for config files. + + http://www.voidspace.org.uk/python/configobj.html
package/python-configobj/python-configobj.mk new file +14 -0
@@ -0,0 +1,14 @@ +################################################################################ +# +# python-configobj +# +################################################################################ + +PYTHON_CONFIGOBJ_VERSION = 4.7.2 +PYTHON_CONFIGOBJ_SOURCE = configobj-$(PYTHON_CONFIGOBJ_VERSION).tar.gz +PYTHON_CONFIGOBJ_SITE = http://pypi.python.org/packages/source/c/configobj +PYTHON_CONFIGOBJ_LICENSE = BSD-3c +# License only mentioned in the source +PYTHON_CONFIGOBJ_SETUP_TYPE = distutils + +$(eval $(python-package))
Signature · 1 line
1.8.1.2
PATCH v2 27/36 python-versiontools: new package
In reply to Thomas PetazzoniFrom: Ludovic Desroches <[email protected]>
[Thomas: convert to the Python package infrastructure, added license informations.]
--- package/Config.in | 1 + package/python-versiontools/Config.in | 7 +++++++ package/python-versiontools/python-versiontools.mk | 13 +++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 package/python-versiontools/Config.in create mode 100644 package/python-versiontools/python-versiontools.mk
package/Config.in +1 -0
@@ -406,6 +406,7 @@ source "package/python-pyzmq/Config.in" source "package/python-serial/Config.in" source "package/python-setuptools/Config.in" source "package/python-thrift/Config.in" +source "package/python-versiontools/Config.in" endmenu endif source "package/python3/Config.in"
package/python-versiontools/Config.in new file +7 -0
@@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_VERSIONTOOLS + bool "python-versiontools" + depends on BR2_PACKAGE_PYTHON + help + Smart replacement for plain tuple used in __version__. + + https://pypi.python.org/pypi/versiontools
package/python-versiontools/python-versiontools.mk new file +13 -0
@@ -0,0 +1,13 @@ +################################################################################ +# +# python-versiontools +# +################################################################################ + +PYTHON_VERSIONTOOLS_VERSION = 1.9.1 +PYTHON_VERSIONTOOLS_SOURCE = versiontools-$(PYTHON_VERSIONTOOLS_VERSION).tar.gz +PYTHON_VERSIONTOOLS_SITE = http://pypi.python.org/packages/source/v/versiontools/ +PYTHON_VERSIONTOOLS_SETUP_TYPE = setuptools +PYTHON_VERSIONTOOLS_LICENSE = LGPLv3 + +$(eval $(python-package))
Signature · 1 line
1.8.1.2
PATCH v2 28/36 python-keyring: new package
In reply to Thomas PetazzoniFrom: Ludovic Desroches <[email protected]>
[Thomas: convert to the Python package infrastructure, improved the .zip handling, added license informations.]
--- package/Config.in | 1 + package/python-keyring/Config.in | 8 ++++++++ package/python-keyring/python-keyring.mk | 19 +++++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 package/python-keyring/Config.in create mode 100644 package/python-keyring/python-keyring.mk
package/Config.in +1 -0
@@ -392,6 +392,7 @@ source "package/python-dialog/Config.in" source "package/python-dpkt/Config.in" source "package/python-id3/Config.in" source "package/python-ipy/Config.in" +source "package/python-keyring/Config.in" source "package/python-mad/Config.in" source "package/python-meld3/Config.in" source "package/python-msgpack/Config.in"
package/python-keyring/Config.in new file +8 -0
@@ -0,0 +1,8 @@ +config BR2_PACKAGE_PYTHON_KEYRING + bool "python-keyring" + depends on BR2_PACKAGE_PYTHON + help + The Python keyring lib provides a easy way to access the + system keyring service from Python. + + https://pypi.python.org/pypi/keyring
package/python-keyring/python-keyring.mk new file +19 -0
@@ -0,0 +1,19 @@ +################################################################################ +# +# python-keyring +# +################################################################################ + +PYTHON_KEYRING_VERSION = 3.0.5 +PYTHON_KEYRING_SOURCE = keyring-$(PYTHON_KEYRING_VERSION).zip +PYTHON_KEYRING_SITE = http://pypi.python.org/packages/source/k/keyring/ +PYTHON_KEYRING_SETUP_TYPE = setuptools +PYTHON_KEYRING_LICENSE = python software foundation license + +define PYTHON_KEYRING_EXTRACT_CMDS + unzip -d $(@D) $(DL_DIR)/$(PYTHON_KEYRING_SOURCE) + mv $(@D)/keyring-$(PYTHON_KEYRING_VERSION)/* $(@D) + $(RM) -r $(@D)/keyring-$(PYTHON_KEYRING_VERSION) +endef + +$(eval $(python-package))
Signature · 1 line
1.8.1.2
PATCH v2 29/36 python-simplejson: new package
In reply to Thomas PetazzoniFrom: Ludovic Desroches <[email protected]>
[Thomas: convert to the Python package infrastructure, drop the setuptools dependency since the package uses distutils.]
--- package/Config.in | 1 + package/python-simplejson/Config.in | 7 +++++++ package/python-simplejson/python-simplejson.mk | 14 ++++++++++++++ 3 files changed, 22 insertions(+) create mode 100644 package/python-simplejson/Config.in create mode 100644 package/python-simplejson/python-simplejson.mk
package/Config.in +1 -0
@@ -406,6 +406,7 @@ source "package/python-pyusb/Config.in" source "package/python-pyzmq/Config.in" source "package/python-serial/Config.in" source "package/python-setuptools/Config.in" +source "package/python-simplejson/Config.in" source "package/python-thrift/Config.in" source "package/python-versiontools/Config.in" endmenu
package/python-simplejson/Config.in new file +7 -0
@@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_SIMPLEJSON + bool "python-simplejson" + depends on BR2_PACKAGE_PYTHON + help + Simple, fast, extensible JSON encoder/decoder for Python + + https://pypi.python.org/pypi/simplejson/
package/python-simplejson/python-simplejson.mk new file +14 -0
@@ -0,0 +1,14 @@ +################################################################################ +# +# python-simplejson +# +################################################################################ + +PYTHON_SIMPLEJSON_VERSION = 3.3.1 +PYTHON_SIMPLEJSON_SOURCE = simplejson-$(PYTHON_SIMPLEJSON_VERSION).tar.gz +PYTHON_SIMPLEJSON_SITE = http://pypi.python.org/packages/source/s/simplejson/ +PYTHON_SIMPLEJSON_LICENSE = MIT +PYTHON_SIMPLEJSON_LICENSE_FILES = LICENSE.txt +PYTHON_SIMPLEJSON_SETUP_TYPE = distutils + +$(eval $(python-package))
Signature · 1 line
1.8.1.2
PATCH v2 30/36 python-json-schema-validator: new package
In reply to Thomas PetazzoniFrom: Ludovic Desroches <[email protected]>
[Thomas: convert to the Python package infrastructure, fix license informations.]
--- package/Config.in | 1 + package/python-json-schema-validator/Config.in | 8 ++++++++ .../python-json-schema-validator.mk | 15 +++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 package/python-json-schema-validator/Config.in create mode 100644 package/python-json-schema-validator/python-json-schema-validator.mk
package/Config.in +1 -0
@@ -392,6 +392,7 @@ source "package/python-dialog/Config.in" source "package/python-dpkt/Config.in" source "package/python-id3/Config.in" source "package/python-ipy/Config.in" +source "package/python-json-schema-validator/Config.in" source "package/python-keyring/Config.in" source "package/python-mad/Config.in" source "package/python-meld3/Config.in"
package/python-json-schema-validator/Config.in new file +8 -0
@@ -0,0 +1,8 @@ +config BR2_PACKAGE_PYTHON_JSON_SCHEMA_VALIDATOR + bool "python-json-schema-validator" + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON_VERSIONTOOLS + help + JSON Schema Validator + + https://pypi.python.org/pypi/json-schema-validator
package/python-json-schema-validator/python-json-schema-validator.mk new file +15 -0
@@ -0,0 +1,15 @@ +################################################################################ +# +# python-json-schema-validator +# +################################################################################ + +PYTHON_JSON_SCHEMA_VALIDATOR_VERSION = 2.3 +PYTHON_JSON_SCHEMA_VALIDATOR_SOURCE = json-schema-validator-$(PYTHON_JSON_SCHEMA_VALIDATOR_VERSION).tar.gz +PYTHON_JSON_SCHEMA_VALIDATOR_SITE = http://pypi.python.org/packages/source/j/json-schema-validator/ +PYTHON_JSON_SCHEMA_VALIDATOR_LICENSE = LGPLv3 +PYTHON_JSON_SCHEMA_VALIDATOR_LICENSE_FILES = LICENSE.txt +PYTHON_JSON_SCHEMA_VALIDATOR_SETUP_TYPE = setuptools +PYTHON_JSON_SCHEMA_VALIDATOR_DEPENDENCIES = python-versiontools + +$(eval $(python-package))
Signature · 1 line
1.8.1.2
PATCH v2 30/36 python-json-schema-validator: new package
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
From: Ludovic Desroches <[email protected]> [Thomas: convert to the Python package infrastructure, fix license informations.]
Ehh, you didn't do a very good job then ;)
package/python-json-schema-validator/python-json-schema-validator.mk line 11
Quoted 2 lines
package/python-json-schema-validator/python-json-schema-validator.mk new file +2
-0+PYTHON_JSON_SCHEMA_VALIDATOR_LICENSE = LGPLv3 +PYTHON_JSON_SCHEMA_VALIDATOR_LICENSE_FILES = LICENSE.txt
cat: /home/peko/source/buildroot/output/build/python-json-schema-validator-2.3/LICENSE.txt: No such file or directory
But it is indeed LGPLv3. I don't see any license files, so I've dropped this line and committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 31/36 python-tornado: new package
In reply to Thomas PetazzoniFrom: Ryan Barnett <[email protected]>
--- package/Config.in | 1 + package/python-tornado/Config.in | 8 ++++++++ package/python-tornado/python-tornado.mk | 13 +++++++++++++ 3 files changed, 22 insertions(+) create mode 100644 package/python-tornado/Config.in create mode 100644 package/python-tornado/python-tornado.mk
package/Config.in +1 -0
@@ -409,6 +409,7 @@ source "package/python-serial/Config.in" source "package/python-setuptools/Config.in" source "package/python-simplejson/Config.in" source "package/python-thrift/Config.in" +source "package/python-tornado/Config.in" source "package/python-versiontools/Config.in" endmenu endif
package/python-tornado/Config.in new file +8 -0
@@ -0,0 +1,8 @@ +config BR2_PACKAGE_PYTHON_TORNADO + bool "python-tornado" + depends on BR2_PACKAGE_PYTHON + help + Tornado is a Python web framework and asynchronous networking + library, originally developed at FriendFeed. + + http://www.tornadoweb.org
package/python-tornado/python-tornado.mk new file +13 -0
@@ -0,0 +1,13 @@ +################################################################################ +# +# python-tornado +# +################################################################################ + +PYTHON_TORNADO_VERSION = 3.1.1 +PYTHON_TORNADO_SOURCE = tornado-$(PYTHON_TORNADO_VERSION).tar.gz +PYTHON_TORNADO_SITE = https://pypi.python.org/packages/source/t/tornado +PYTHON_TORNADO_LICENSE = Apache-v2 +PYTHON_TORNADO_SETUP_TYPE = setuptools + +$(eval $(python-package))
Signature · 1 line
1.8.1.2
PATCH v2 32/36 python-pyasn: new package
In reply to Thomas PetazzoniFrom: Ryan Barnett <[email protected]>
--- package/Config.in | 1 + package/python-pyasn/Config.in | 13 +++++++++++++ package/python-pyasn/python-pyasn.mk | 19 +++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 package/python-pyasn/Config.in create mode 100644 package/python-pyasn/python-pyasn.mk
package/Config.in +1 -0
@@ -400,6 +400,7 @@ source "package/python-msgpack/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"
package/python-pyasn/Config.in new file +13 -0
@@ -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 needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP
package/python-pyasn/python-pyasn.mk new file +19 -0
@@ -0,0 +1,19 @@ +################################################################################ +# +# 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_SETUP_TYPE = distutils + +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 + +$(eval $(python-package))
Signature · 1 line
1.8.1.2
PATCH v2 32/36 python-pyasn: new package
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
From: Ryan Barnett <[email protected]>
Signed-off-by Ryan Barnett <[email protected]>Signed-off-by Thomas Petazzoni <[email protected]>---
package/python-pyasn/python-pyasn.mk line 10
Quoted 10 lines
package/python-pyasn/python-pyasn.mk new file +10
-0+################################################################################ +# +# 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
Version?
Looking closer, there's no license files included, but the file header of pyasn.cpp states LGPLv3+ and the stuff under libgds states GPLv2+, so I've changed it to that and committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 33/36 python-pycrypto: new package
In reply to Thomas PetazzoniFrom: Ryan Barnett <[email protected]>
--- package/Config.in | 1 + package/python-pycrypto/Config.in | 9 ++++++++ package/python-pycrypto/python-pycrypto.mk | 35 ++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 package/python-pycrypto/Config.in create mode 100644 package/python-pycrypto/python-pycrypto.mk
package/Config.in +1 -0
@@ -401,6 +401,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"
package/python-pycrypto/Config.in new file +9 -0
@@ -0,0 +1,9 @@ +config BR2_PACKAGE_PYTHON_PYCRYPTO + bool "python-pycrypto" + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_GMP + help + PyCrypto is a collection of cryptographic algorithms and + protocols, implemented for use from Python. + + http://www.pycrypto.org/
package/python-pycrypto/python-pycrypto.mk new file +35 -0
@@ -0,0 +1,35 @@ +################################################################################ +# +# 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_SETUP_TYPE = distutils + +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 = gmp + +# The configure step needs to be run outside of the setup.py since it isn't +# run correctly for cross-compiling +define PYTHON_PYCRYPTO_CONFIGURE_CMDS + (cd $(@D) && \ + $(TARGET_CONFIGURE_OPTS) \ + $(TARGET_CONFIGURE_ARGS) \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --sysconfdir=/etc \ + --program-prefix="" \ + ) +endef + +$(eval $(python-package))
Signature · 1 line
1.8.1.2
PATCH v2 34/36 python-pysnmp: new package
In reply to Thomas PetazzoniFrom: Ryan Barnett <[email protected]>
--- package/Config.in | 1 + package/python-pysnmp/Config.in | 14 ++++++++++++++ package/python-pysnmp/python-pysnmp.mk | 17 +++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 package/python-pysnmp/Config.in create mode 100644 package/python-pysnmp/python-pysnmp.mk
package/Config.in +1 -0
@@ -405,6 +405,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-pyusb/Config.in" source "package/python-pyzmq/Config.in" source "package/python-serial/Config.in"
package/python-pysnmp/Config.in new file +14 -0
@@ -0,0 +1,14 @@ +config BR2_PACKAGE_PYTHON_PYSNMP + bool "python-pysnmp" + depends on BR2_PACKAGE_PYTHON + depends on BR2_INSTALL_LIBSTDCPP # pyasn + 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 + +comment "python-pysnmp needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP
package/python-pysnmp/python-pysnmp.mk new file +17 -0
@@ -0,0 +1,17 @@ +################################################################################ +# +# 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_SETUP_TYPE = setuptools + +PYTHON_PYSNMP_LICENSE = BSD-3c +PYTHON_PYSNMP_LICENSE_FILES = LICENSE + +PYTHON_PYSNMP_DEPENDENCIES = python-pyasn python-pycrypto + +$(eval $(python-package))
Signature · 1 line
1.8.1.2
PATCH v2 35/36 python-pysnmp-apps: new package
In reply to Thomas PetazzoniFrom: Ryan Barnett <[email protected]>
--- package/Config.in | 1 + package/python-pysnmp-apps/Config.in | 14 ++++++++++++++ package/python-pysnmp-apps/python-pysnmp-apps.mk | 16 ++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 package/python-pysnmp-apps/Config.in create mode 100644 package/python-pysnmp-apps/python-pysnmp-apps.mk
package/Config.in +1 -0
@@ -406,6 +406,7 @@ 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-pysnmp-apps/Config.in" source "package/python-pyusb/Config.in" source "package/python-pyzmq/Config.in" source "package/python-serial/Config.in"
package/python-pysnmp-apps/Config.in new file +14 -0
@@ -0,0 +1,14 @@ +config BR2_PACKAGE_PYTHON_PYSNMP_APPS + bool "python-pysnmp-apps" + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON_PYSNMP + depends on BR2_INSTALL_LIBSTDCPP # pysnmp -> pyasn + help + + A collection of command-line tools for SNMP management + purposes built on top of the PySNMP package. + + http://pysnmp.sf.net + +comment "python-pysnmp-apps needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP
package/python-pysnmp-apps/python-pysnmp-apps.mk new file +16 -0
@@ -0,0 +1,16 @@ +################################################################################ +# +# 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_SETUP_TYPE = setuptools +PYTHON_PYSNMP_APPS_LICENSE = BSD-3c +PYTHON_PYSNMP_APPS_LICENSE_FILES = LICENSE + +PYTHON_PYSNMP_APPS_DEPENDENCIES = python-pysnmp + +$(eval $(python-package))
Signature · 1 line
1.8.1.2
PATCH v2 35/36 python-pysnmp-apps: new package
Quoted 31 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
From: Ryan Barnett <[email protected]>
Signed-off-by Ryan Barnett <[email protected]>Signed-off-by Thomas Petazzoni <[email protected]>--- package/Config.in | 1 + package/python-pysnmp-apps/Config.in | 14 ++++++++++++++ package/python-pysnmp-apps/python-pysnmp-apps.mk | 16 ++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 package/python-pysnmp-apps/Config.in create mode 100644 package/python-pysnmp-apps/python-pysnmp-apps.mkpackage/Config.in +1
-0@@ -406,6 +406,7 @@ 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-pysnmp-apps/Config.in" source "package/python-pyusb/Config.in" source "package/python-pyzmq/Config.in" source "package/python-serial/Config.in"package/python-pysnmp-apps/Config.in new file +0
-0
package/python-pysnmp-apps/Config.in line 9
Quoted 9 lines
package/python-pysnmp-apps/Config.in new file +9
-0@@ -0,0 +1,14 @@ +config BR2_PACKAGE_PYTHON_PYSNMP_APPS + bool "python-pysnmp-apps" + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON_PYSNMP + depends on BR2_INSTALL_LIBSTDCPP # pysnmp -> pyasn + help + + A collection of command-line tools for SNMP management + purposes built on top of the PySNMP package.
There shouldn't be an empty line before the help text.
Committed with that fixed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 36/36 python-pysnmp-mibs: new package
In reply to Thomas PetazzoniFrom: Ryan Barnett <[email protected]>
--- package/Config.in | 1 + package/python-pysnmp-mibs/Config.in | 13 +++++++++++++ package/python-pysnmp-mibs/python-pysnmp-mibs.mk | 16 ++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 package/python-pysnmp-mibs/Config.in create mode 100644 package/python-pysnmp-mibs/python-pysnmp-mibs.mk
package/Config.in +1 -0
@@ -407,6 +407,7 @@ source "package/python-pyparsing/Config.in" source "package/python-pyro/Config.in" source "package/python-pysnmp/Config.in" source "package/python-pysnmp-apps/Config.in" +source "package/python-pysnmp-mibs/Config.in" source "package/python-pyusb/Config.in" source "package/python-pyzmq/Config.in" source "package/python-serial/Config.in"
package/python-pysnmp-mibs/Config.in new file +13 -0
@@ -0,0 +1,13 @@ +config BR2_PACKAGE_PYTHON_PYSNMP_MIBS + bool "python-pysnmp-mibs" + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON_PYSNMP + depends on BR2_INSTALL_LIBSTDCPP # pysnmp -> pyasn + 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 + +comment "python-pysnmp-libs needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP
package/python-pysnmp-mibs/python-pysnmp-mibs.mk new file +16 -0
@@ -0,0 +1,16 @@ +################################################################################ +# +# 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_SETUP_TYPE = setuptools +PYTHON_PYSNMP_MIBS_LICENSE = BSD-3c +PYTHON_PYSNMP_MIBS_LICENSE_FILES = LICENSE + +PYTHON_PYSNMP_MIBS_DEPENDENCIES = python-pysnmp + +$(eval $(python-package))
Signature · 1 line
1.8.1.2
v2 cover Python package infrastructure
In reply to Thomas PetazzoniQuoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Hello,
This set of patches add a new infrastructure for Python packages, which support both distutils and setuptools based packages. It also converts all the current Python packages to this infrastructure, and adds a bunch of new Python packages that have been sitting in patchwork for a while.
Committed series, thanks!
Signature · 1 line
Bye, Peter Korsgaard