]> code.ossystems Code Review - openembedded-core.git/commitdiff
python-nose: use pypi.bbclass
authorTim Orling <timothy.t.orling@linux.intel.com>
Sun, 19 Nov 2017 00:19:18 +0000 (16:19 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 13 Dec 2017 13:59:44 +0000 (13:59 +0000)
* Simplify python- and python3-nose by using pypi.bbclass
* Consolidate common content in python-nose.inc
  - Avoid duplication by using PYTHON_PN variable

Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-devtools/python/python-nose.inc [new file with mode: 0644]
meta/recipes-devtools/python/python-nose_1.3.7.bb
meta/recipes-devtools/python/python3-nose_1.3.7.bb

diff --git a/meta/recipes-devtools/python/python-nose.inc b/meta/recipes-devtools/python/python-nose.inc
new file mode 100644 (file)
index 0000000..ccec68a
--- /dev/null
@@ -0,0 +1,18 @@
+SUMMARY = "Extends Python unittest to make testing easier"
+HOMEPAGE = "http://readthedocs.org/docs/nose/"
+DESCRIPTION = "nose extends the test loading and running features of unittest, \
+making it easier to write, find and run tests."
+SECTION = "devel/python"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://lgpl.txt;md5=a6f89e2100d9b6cdffcea4f398e37343"
+
+SRC_URI[md5sum] = "4d3ad0ff07b61373d2cefc89c5d0b20b"
+SRC_URI[sha256sum] = "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98"
+
+inherit pypi
+
+RDEPENDS_${PN} = "\
+  ${PYTHON_PN}-unittest \
+  "
+
+BBCLASSEXTEND = "native nativesdk"
index 9b3509cafbb153d6f86e8ce2e164e06517d94844..6d69d2d62e2d86c1d0fdc99d1495d6f093a410e7 100644 (file)
@@ -1,25 +1,2 @@
-SUMMARY = "Extends Python unittest to make testing easier"
-HOMEPAGE = "http://readthedocs.org/docs/nose/"
-DESCRIPTION = "nose extends the test loading and running features of unittest, \
-making it easier to write, find and run tests."
-SECTION = "devel/python"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://lgpl.txt;md5=a6f89e2100d9b6cdffcea4f398e37343"
-
-SRC_URI = "https://files.pythonhosted.org/packages/source/n/nose/nose-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "4d3ad0ff07b61373d2cefc89c5d0b20b"
-SRC_URI[sha256sum] = "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98"
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/nose/"
-UPSTREAM_CHECK_REGEX = "/nose/(?P<pver>(\d+[\.\-_]*)+)"
-
-S = "${WORKDIR}/nose-${PV}"
-
 inherit setuptools
-
-RDEPENDS_${PN} = "\
-  python-unittest \
-  "
-
-BBCLASSEXTEND = "native nativesdk"
+require python-nose.inc
index 1e2ff74f5784392193d4efbc1c38122fc5cc900c..8bc1f49835e0f0f3aac41f75c631365a6f158022 100644 (file)
@@ -1,28 +1,6 @@
-SUMMARY = "Extends Python unittest to make testing easier"
-DESCRIPTION = "nose extends the test loading and running features of unittest, \
-making it easier to write, find and run tests."
-SECTION = "devel/python"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://lgpl.txt;md5=a6f89e2100d9b6cdffcea4f398e37343"
-
-SRC_URI = "https://files.pythonhosted.org/packages/source/n/nose/nose-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "4d3ad0ff07b61373d2cefc89c5d0b20b"
-SRC_URI[sha256sum] = "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98"
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/nose/"
-UPSTREAM_CHECK_REGEX = "/nose/(?P<pver>(\d+[\.\-_]*)+)"
-
-S = "${WORKDIR}/nose-${PV}"
-
 inherit setuptools3
+require python-nose.inc
 
 do_install_append() {
     mv ${D}${bindir}/nosetests ${D}${bindir}/nosetests3
 }
-
-RDEPENDS_${PN}_class-target = "\
-  python3-unittest \
-  "
-
-BBCLASSEXTEND = "native nativesdk"