aboutsummaryrefslogtreecommitdiffstats
path: root/meta-python
diff options
context:
space:
mode:
authorPascal Bach <pascal.bach@nextrem.ch>2017-01-05 18:12:31 +0100
committerMartin Jansa <Martin.Jansa@gmail.com>2017-01-25 15:58:54 +0100
commit1161ab8f8dda272eb5d09917446cc5b971be1335 (patch)
tree6d54ae1bce773d0aae59257634081705430e8e8d /meta-python
parent0c41b5e3148a7d6233b4e3704ab53bb726f814d6 (diff)
downloadmeta-openembedded-contrib-1161ab8f8dda272eb5d09917446cc5b971be1335.tar.gz
python-yaml: provide both python2 and python3 package
Further the recipe is simplified by using the pypi and setuptools class. The custom setup.py is no onger necessary. Signed-off-by: Pascal Bach <pascal.bach@nextrem.ch> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-python')
-rwxr-xr-xmeta-python/recipes-devtools/python/python-pyyaml.inc14
-rw-r--r--meta-python/recipes-devtools/python/python-pyyaml/setup.py64
-rwxr-xr-x[-rw-r--r--]meta-python/recipes-devtools/python/python-pyyaml_3.12.bb26
-rwxr-xr-xmeta-python/recipes-devtools/python/python3-pyyaml_3.12.bb2
4 files changed, 18 insertions, 88 deletions
diff --git a/meta-python/recipes-devtools/python/python-pyyaml.inc b/meta-python/recipes-devtools/python/python-pyyaml.inc
new file mode 100755
index 0000000000..41321ca401
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python-pyyaml.inc
@@ -0,0 +1,14 @@
+SUMMARY = "Python support for YAML"
+HOMEPAGE = "http://www.pyyaml.org"
+SECTION = "devel/python"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=6015f088759b10e0bc2bf64898d4ae17"
+DEPENDS = "libyaml ${PYTHON_PN}-cython-native"
+
+PYPI_PACKAGE = "PyYAML"
+inherit pypi
+
+SRC_URI[md5sum] = "4c129761b661d181ebf7ff4eb2d79950"
+SRC_URI[sha256sum] = "592766c6303207a20efc445587778322d7f73b161bd994f227adaa341ba212ab"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-python/recipes-devtools/python/python-pyyaml/setup.py b/meta-python/recipes-devtools/python/python-pyyaml/setup.py
deleted file mode 100644
index 2ed1c94beb..0000000000
--- a/meta-python/recipes-devtools/python/python-pyyaml/setup.py
+++ /dev/null
@@ -1,64 +0,0 @@
-NAME = 'PyYAML'
-VERSION = '3.10'
-DESCRIPTION = "YAML parser and emitter for Python"
-LONG_DESCRIPTION = """\
-YAML is a data serialization format designed for human readability and
-interaction with scripting languages. PyYAML is a YAML parser and
-emitter for Python.
-
-PyYAML features a complete YAML 1.1 parser, Unicode support, pickle
-support, capable extension API, and sensible error messages. PyYAML
-supports standard YAML tags and provides Python-specific tags that allow
-to represent an arbitrary Python object.
-
-PyYAML is applicable for a broad range of tasks from complex
-configuration files to object serialization and persistance."""
-AUTHOR = "Kirill Simonov"
-AUTHOR_EMAIL = 'xi@resolvent.net'
-LICENSE = "MIT"
-PLATFORMS = "Any"
-URL = "http://pyyaml.org/wiki/PyYAML"
-DOWNLOAD_URL = "http://pyyaml.org/download/pyyaml/%s-%s.tar.gz" % (NAME, VERSION)
-CLASSIFIERS = [
- "Development Status :: 5 - Production/Stable",
- "Intended Audience :: Developers",
- "License :: OSI Approved :: MIT License",
- "Operating System :: OS Independent",
- "Programming Language :: Python",
- "Topic :: Software Development :: Libraries :: Python Modules",
- "Topic :: Text Processing :: Markup",
-]
-
-from distutils.core import setup
-from distutils.extension import Extension
-from Cython.Distutils import build_ext
-
-import sys, os.path
-
-
-if __name__ == '__main__':
-
- setup(
- name=NAME,
- version=VERSION,
- description=DESCRIPTION,
- long_description=LONG_DESCRIPTION,
- author=AUTHOR,
- author_email=AUTHOR_EMAIL,
- license=LICENSE,
- platforms=PLATFORMS,
- url=URL,
- download_url=DOWNLOAD_URL,
- classifiers=CLASSIFIERS,
-
- package_dir={'': 'lib'},
- packages=['yaml'],
-
- ext_modules = [
- Extension( "_yaml", ["ext/_yaml.pyx"], libraries = ["yaml"] )
- ],
-
- cmdclass={
- 'build_ext': build_ext,
- },
- )
diff --git a/meta-python/recipes-devtools/python/python-pyyaml_3.12.bb b/meta-python/recipes-devtools/python/python-pyyaml_3.12.bb
index 0899a2ee53..6d9f3e95af 100644..100755
--- a/meta-python/recipes-devtools/python/python-pyyaml_3.12.bb
+++ b/meta-python/recipes-devtools/python/python-pyyaml_3.12.bb
@@ -1,24 +1,2 @@
-SUMMARY = "Python support for YAML"
-HOMEPAGE = "http://www.pyyaml.org"
-SECTION = "devel/python"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=6015f088759b10e0bc2bf64898d4ae17"
-DEPENDS = "libyaml python-cython-native"
-
-SRC_URI = "http://pyyaml.org/download/pyyaml/PyYAML-${PV}.tar.gz \
- file://setup.py \
-"
-
-SRC_URI[md5sum] = "4c129761b661d181ebf7ff4eb2d79950"
-SRC_URI[sha256sum] = "592766c6303207a20efc445587778322d7f73b161bd994f227adaa341ba212ab"
-
-S = "${WORKDIR}/PyYAML-${PV}"
-
-inherit distutils
-
-do_configure_prepend() {
- # upstream setup.py overcomplicated, use ours
- install -m 0644 ${WORKDIR}/setup.py ${S}
-}
-
-BBCLASSEXTEND = "native nativesdk"
+inherit setuptools
+require python-pyyaml.inc
diff --git a/meta-python/recipes-devtools/python/python3-pyyaml_3.12.bb b/meta-python/recipes-devtools/python/python3-pyyaml_3.12.bb
new file mode 100755
index 0000000000..470aca608b
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-pyyaml_3.12.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-pyyaml.inc