diff options
| author | Pascal Bach <pascal.bach@nextrem.ch> | 2017-01-05 18:12:31 +0100 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-01-25 15:58:54 +0100 |
| commit | 1161ab8f8dda272eb5d09917446cc5b971be1335 (patch) | |
| tree | 6d54ae1bce773d0aae59257634081705430e8e8d /meta-python | |
| parent | 0c41b5e3148a7d6233b4e3704ab53bb726f814d6 (diff) | |
| download | meta-openembedded-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-x | meta-python/recipes-devtools/python/python-pyyaml.inc | 14 | ||||
| -rw-r--r-- | meta-python/recipes-devtools/python/python-pyyaml/setup.py | 64 | ||||
| -rwxr-xr-x[-rw-r--r--] | meta-python/recipes-devtools/python/python-pyyaml_3.12.bb | 26 | ||||
| -rwxr-xr-x | meta-python/recipes-devtools/python/python3-pyyaml_3.12.bb | 2 |
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 @@ | |||
| 1 | SUMMARY = "Python support for YAML" | ||
| 2 | HOMEPAGE = "http://www.pyyaml.org" | ||
| 3 | SECTION = "devel/python" | ||
| 4 | LICENSE = "MIT" | ||
| 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=6015f088759b10e0bc2bf64898d4ae17" | ||
| 6 | DEPENDS = "libyaml ${PYTHON_PN}-cython-native" | ||
| 7 | |||
| 8 | PYPI_PACKAGE = "PyYAML" | ||
| 9 | inherit pypi | ||
| 10 | |||
| 11 | SRC_URI[md5sum] = "4c129761b661d181ebf7ff4eb2d79950" | ||
| 12 | SRC_URI[sha256sum] = "592766c6303207a20efc445587778322d7f73b161bd994f227adaa341ba212ab" | ||
| 13 | |||
| 14 | 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 @@ | |||
| 1 | NAME = 'PyYAML' | ||
| 2 | VERSION = '3.10' | ||
| 3 | DESCRIPTION = "YAML parser and emitter for Python" | ||
| 4 | LONG_DESCRIPTION = """\ | ||
| 5 | YAML is a data serialization format designed for human readability and | ||
| 6 | interaction with scripting languages. PyYAML is a YAML parser and | ||
| 7 | emitter for Python. | ||
| 8 | |||
| 9 | PyYAML features a complete YAML 1.1 parser, Unicode support, pickle | ||
| 10 | support, capable extension API, and sensible error messages. PyYAML | ||
| 11 | supports standard YAML tags and provides Python-specific tags that allow | ||
| 12 | to represent an arbitrary Python object. | ||
| 13 | |||
| 14 | PyYAML is applicable for a broad range of tasks from complex | ||
| 15 | configuration files to object serialization and persistance.""" | ||
| 16 | AUTHOR = "Kirill Simonov" | ||
| 17 | AUTHOR_EMAIL = 'xi@resolvent.net' | ||
| 18 | LICENSE = "MIT" | ||
| 19 | PLATFORMS = "Any" | ||
| 20 | URL = "http://pyyaml.org/wiki/PyYAML" | ||
| 21 | DOWNLOAD_URL = "http://pyyaml.org/download/pyyaml/%s-%s.tar.gz" % (NAME, VERSION) | ||
| 22 | CLASSIFIERS = [ | ||
| 23 | "Development Status :: 5 - Production/Stable", | ||
| 24 | "Intended Audience :: Developers", | ||
| 25 | "License :: OSI Approved :: MIT License", | ||
| 26 | "Operating System :: OS Independent", | ||
| 27 | "Programming Language :: Python", | ||
| 28 | "Topic :: Software Development :: Libraries :: Python Modules", | ||
| 29 | "Topic :: Text Processing :: Markup", | ||
| 30 | ] | ||
| 31 | |||
| 32 | from distutils.core import setup | ||
| 33 | from distutils.extension import Extension | ||
| 34 | from Cython.Distutils import build_ext | ||
| 35 | |||
| 36 | import sys, os.path | ||
| 37 | |||
| 38 | |||
| 39 | if __name__ == '__main__': | ||
| 40 | |||
| 41 | setup( | ||
| 42 | name=NAME, | ||
| 43 | version=VERSION, | ||
| 44 | description=DESCRIPTION, | ||
| 45 | long_description=LONG_DESCRIPTION, | ||
| 46 | author=AUTHOR, | ||
| 47 | author_email=AUTHOR_EMAIL, | ||
| 48 | license=LICENSE, | ||
| 49 | platforms=PLATFORMS, | ||
| 50 | url=URL, | ||
| 51 | download_url=DOWNLOAD_URL, | ||
| 52 | classifiers=CLASSIFIERS, | ||
| 53 | |||
| 54 | package_dir={'': 'lib'}, | ||
| 55 | packages=['yaml'], | ||
| 56 | |||
| 57 | ext_modules = [ | ||
| 58 | Extension( "_yaml", ["ext/_yaml.pyx"], libraries = ["yaml"] ) | ||
| 59 | ], | ||
| 60 | |||
| 61 | cmdclass={ | ||
| 62 | 'build_ext': build_ext, | ||
| 63 | }, | ||
| 64 | ) | ||
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 @@ | |||
| 1 | SUMMARY = "Python support for YAML" | 1 | inherit setuptools |
| 2 | HOMEPAGE = "http://www.pyyaml.org" | 2 | require python-pyyaml.inc |
| 3 | SECTION = "devel/python" | ||
| 4 | LICENSE = "MIT" | ||
| 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=6015f088759b10e0bc2bf64898d4ae17" | ||
| 6 | DEPENDS = "libyaml python-cython-native" | ||
| 7 | |||
| 8 | SRC_URI = "http://pyyaml.org/download/pyyaml/PyYAML-${PV}.tar.gz \ | ||
| 9 | file://setup.py \ | ||
| 10 | " | ||
| 11 | |||
| 12 | SRC_URI[md5sum] = "4c129761b661d181ebf7ff4eb2d79950" | ||
| 13 | SRC_URI[sha256sum] = "592766c6303207a20efc445587778322d7f73b161bd994f227adaa341ba212ab" | ||
| 14 | |||
| 15 | S = "${WORKDIR}/PyYAML-${PV}" | ||
| 16 | |||
| 17 | inherit distutils | ||
| 18 | |||
| 19 | do_configure_prepend() { | ||
| 20 | # upstream setup.py overcomplicated, use ours | ||
| 21 | install -m 0644 ${WORKDIR}/setup.py ${S} | ||
| 22 | } | ||
| 23 | |||
| 24 | BBCLASSEXTEND = "native nativesdk" | ||
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 @@ | |||
| 1 | inherit setuptools3 | ||
| 2 | require python-pyyaml.inc | ||
