mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH 1/5] python3-transitions: new package
@ 2018-01-29 15:40 Bastian Stender
  2018-01-29 15:40 ` [ptxdist] [PATCH 2/5] python3-websockets: " Bastian Stender
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Bastian Stender @ 2018-01-29 15:40 UTC (permalink / raw)
  To: ptxdist; +Cc: David Jander

From: David Jander <david@protonic.nl>

Signed-off-by: David Jander <david@protonic.nl>
---
 rules/python3-transitions.in   | 10 ++++++++
 rules/python3-transitions.make | 54 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 64 insertions(+)
 create mode 100644 rules/python3-transitions.in
 create mode 100644 rules/python3-transitions.make

diff --git a/rules/python3-transitions.in b/rules/python3-transitions.in
new file mode 100644
index 000000000..2e2c05f3d
--- /dev/null
+++ b/rules/python3-transitions.in
@@ -0,0 +1,10 @@
+## SECTION=python3
+
+config PYTHON3_TRANSITIONS
+	tristate
+	prompt "python3-transitions"
+	select HOST_PYTHON3_SETUPTOOLS
+	select PYTHON3
+	select PYTHON3_SIX
+	help
+	  A lightweight, object-oriented finite state machine implementation in Python.
diff --git a/rules/python3-transitions.make b/rules/python3-transitions.make
new file mode 100644
index 000000000..d8eddcde9
--- /dev/null
+++ b/rules/python3-transitions.make
@@ -0,0 +1,54 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by David Jander <david@protonic.nl>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_PYTHON3_TRANSITIONS) += python3-transitions
+
+#
+# Paths and names
+#
+PYTHON3_TRANSITIONS_VERSION	:= 0.5.3
+PYTHON3_TRANSITIONS_MD5		:= 256d7714bfbbdbc4efe23dc2e58afc45
+PYTHON3_TRANSITIONS		:= python3-transitions-$(PYTHON3_TRANSITIONS_VERSION)
+PYTHON3_TRANSITIONS_SUFFIX	:= tar.gz
+PYTHON3_TRANSITIONS_URL		:= https://github.com/pytransitions/transitions/archive/$(PYTHON3_TRANSITIONS_VERSION).$(PYTHON3_TRANSITIONS_SUFFIX)
+PYTHON3_TRANSITIONS_SOURCE	:= $(SRCDIR)/$(PYTHON3_TRANSITIONS).$(PYTHON3_TRANSITIONS_SUFFIX)
+PYTHON3_TRANSITIONS_DIR		:= $(BUILDDIR)/$(PYTHON3_TRANSITIONS)
+PYTHON3_TRANSITIONS_LICENSE	:= MIT
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+PYTHON3_TRANSITIONS_CONF_TOOL	:= python3
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/python3-transitions.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, python3-transitions)
+	@$(call install_fixup, python3-transitions, PRIORITY, optional)
+	@$(call install_fixup, python3-transitions, SECTION, base)
+	@$(call install_fixup, python3-transitions, AUTHOR, "David Jander <david@protonic.nl>")
+	@$(call install_fixup, python3-transitions, DESCRIPTION, missing)
+
+	@$(call install_glob, python3-transitions, 0, 0, -, \
+		/usr/lib/python$(PYTHON3_MAJORMINOR)/site-packages/transitions,, *.py)
+
+	@$(call install_finish, python3-transitions)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.15.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* [ptxdist] [PATCH 2/5] python3-websockets: new package
  2018-01-29 15:40 [ptxdist] [PATCH 1/5] python3-transitions: new package Bastian Stender
@ 2018-01-29 15:40 ` Bastian Stender
  2018-01-29 15:40 ` [ptxdist] [PATCH 3/5] libyaml: " Bastian Stender
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Bastian Stender @ 2018-01-29 15:40 UTC (permalink / raw)
  To: ptxdist; +Cc: David Jander

From: David Jander <david@protonic.nl>

Signed-off-by: David Jander <david@protonic.nl>
---
 rules/python3-websockets.in   |  9 ++++++++
 rules/python3-websockets.make | 54 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 63 insertions(+)
 create mode 100644 rules/python3-websockets.in
 create mode 100644 rules/python3-websockets.make

diff --git a/rules/python3-websockets.in b/rules/python3-websockets.in
new file mode 100644
index 000000000..19e55f1e8
--- /dev/null
+++ b/rules/python3-websockets.in
@@ -0,0 +1,9 @@
+## SECTION=python3
+
+config PYTHON3_WEBSOCKETS
+	tristate
+	prompt "python3-websockets"
+	select HOST_PYTHON3_SETUPTOOLS
+	select PYTHON3
+	help
+	  An implementation of the WebSocket Protocol (RFC 6455 & 7692)
diff --git a/rules/python3-websockets.make b/rules/python3-websockets.make
new file mode 100644
index 000000000..ce27face5
--- /dev/null
+++ b/rules/python3-websockets.make
@@ -0,0 +1,54 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by David Jander <david@protonic.nl>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_PYTHON3_WEBSOCKETS) += python3-websockets
+
+#
+# Paths and names
+#
+PYTHON3_WEBSOCKETS_VERSION	:= 4.0.1
+PYTHON3_WEBSOCKETS_MD5		:= 671903b0e638a74aace98ff5cb341453
+PYTHON3_WEBSOCKETS		:= python3-websockets-$(PYTHON3_WEBSOCKETS_VERSION)
+PYTHON3_WEBSOCKETS_SUFFIX	:= tar.gz
+PYTHON3_WEBSOCKETS_URL		:= https://github.com/aaugustin/websockets/archive/$(PYTHON3_WEBSOCKETS_VERSION).$(PYTHON3_WEBSOCKETS_SUFFIX)
+PYTHON3_WEBSOCKETS_SOURCE	:= $(SRCDIR)/$(PYTHON3_WEBSOCKETS).$(PYTHON3_WEBSOCKETS_SUFFIX)
+PYTHON3_WEBSOCKETS_DIR		:= $(BUILDDIR)/$(PYTHON3_WEBSOCKETS)
+PYTHON3_WEBSOCKETS_LICENSE	:= BSD
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+PYTHON3_WEBSOCKETS_CONF_TOOL	:= python3
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/python3-websockets.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, python3-websockets)
+	@$(call install_fixup, python3-websockets, PRIORITY, optional)
+	@$(call install_fixup, python3-websockets, SECTION, base)
+	@$(call install_fixup, python3-websockets, AUTHOR, "David Jander <david@protonic.nl>")
+	@$(call install_fixup, python3-websockets, DESCRIPTION, missing)
+
+	@$(call install_glob, python3-websockets, 0, 0, -, \
+		/usr/lib/python$(PYTHON3_MAJORMINOR)/site-packages/websockets,, *.py)
+
+	@$(call install_finish, python3-websockets)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.15.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* [ptxdist] [PATCH 3/5] libyaml: new package
  2018-01-29 15:40 [ptxdist] [PATCH 1/5] python3-transitions: new package Bastian Stender
  2018-01-29 15:40 ` [ptxdist] [PATCH 2/5] python3-websockets: " Bastian Stender
@ 2018-01-29 15:40 ` Bastian Stender
  2018-01-29 15:40 ` [ptxdist] [PATCH 4/5] python3-pyyaml: " Bastian Stender
  2018-01-29 15:40 ` [ptxdist] [PATCH 5/5] python3-hbmqtt: " Bastian Stender
  3 siblings, 0 replies; 5+ messages in thread
From: Bastian Stender @ 2018-01-29 15:40 UTC (permalink / raw)
  To: ptxdist; +Cc: Bastian Stender

Signed-off-by: Bastian Stender <bst@pengutronix.de>
---
 patches/libyaml-0.1.7/autogen.sh |  1 +
 rules/libyaml.in                 |  7 +++++
 rules/libyaml.make               | 57 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 65 insertions(+)
 create mode 120000 patches/libyaml-0.1.7/autogen.sh
 create mode 100644 rules/libyaml.in
 create mode 100644 rules/libyaml.make

diff --git a/patches/libyaml-0.1.7/autogen.sh b/patches/libyaml-0.1.7/autogen.sh
new file mode 120000
index 000000000..9f8a4cb7d
--- /dev/null
+++ b/patches/libyaml-0.1.7/autogen.sh
@@ -0,0 +1 @@
+../autogen.sh
\ No newline at end of file
diff --git a/rules/libyaml.in b/rules/libyaml.in
new file mode 100644
index 000000000..c56f31cb4
--- /dev/null
+++ b/rules/libyaml.in
@@ -0,0 +1,7 @@
+## SECTION=system_libraries
+
+config LIBYAML
+	tristate
+	prompt "libyaml"
+	help
+	  A C library for parsing and emitting YAML.
diff --git a/rules/libyaml.make b/rules/libyaml.make
new file mode 100644
index 000000000..98675723e
--- /dev/null
+++ b/rules/libyaml.make
@@ -0,0 +1,57 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2018 by Bastian Stender <bst@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_LIBYAML) += libyaml
+
+#
+# Paths and names
+#
+LIBYAML_VERSION	:= 0.1.7
+LIBYAML_MD5	:= c966bdf434286e4f618d9ae8a5e8db97
+LIBYAML		:= libyaml-$(LIBYAML_VERSION)
+LIBYAML_SUFFIX	:= tar.gz
+LIBYAML_URL	:= https://github.com/yaml/libyaml/archive/$(LIBYAML_VERSION).$(LIBYAML_SUFFIX)
+LIBYAML_SOURCE	:= $(SRCDIR)/$(LIBYAML).$(LIBYAML_SUFFIX)
+LIBYAML_DIR	:= $(BUILDDIR)/$(LIBYAML)
+LIBYAML_LICENSE	:= MIT
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# autoconf
+#
+LIBYAML_CONF_TOOL	:= autoconf
+LIBYAML_CONF_OPT	:= $(CROSS_AUTOCONF_USR)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/libyaml.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, libyaml)
+	@$(call install_fixup, libyaml, PRIORITY, optional)
+	@$(call install_fixup, libyaml, SECTION, base)
+	@$(call install_fixup, libyaml, AUTHOR, "Bastian Stender <bst@pengutronix.de>")
+	@$(call install_fixup, libyaml, DESCRIPTION, missing)
+
+	@$(call install_lib, libyaml, 0, 0, 0644, libyaml-0)
+
+	@$(call install_finish, libyaml)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.15.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* [ptxdist] [PATCH 4/5] python3-pyyaml: new package
  2018-01-29 15:40 [ptxdist] [PATCH 1/5] python3-transitions: new package Bastian Stender
  2018-01-29 15:40 ` [ptxdist] [PATCH 2/5] python3-websockets: " Bastian Stender
  2018-01-29 15:40 ` [ptxdist] [PATCH 3/5] libyaml: " Bastian Stender
@ 2018-01-29 15:40 ` Bastian Stender
  2018-01-29 15:40 ` [ptxdist] [PATCH 5/5] python3-hbmqtt: " Bastian Stender
  3 siblings, 0 replies; 5+ messages in thread
From: Bastian Stender @ 2018-01-29 15:40 UTC (permalink / raw)
  To: ptxdist; +Cc: Bastian Stender

Signed-off-by: Bastian Stender <bst@pengutronix.de>
---
 ...move-overcomplicated-setup-resulting-in-w.patch | 324 +++++++++++++++++++++
 patches/pyyaml-3.12/series                         |   4 +
 rules/python3-pyyaml.in                            |  10 +
 rules/python3-pyyaml.make                          |  54 ++++
 4 files changed, 392 insertions(+)
 create mode 100644 patches/pyyaml-3.12/0001-setup.py-remove-overcomplicated-setup-resulting-in-w.patch
 create mode 100644 patches/pyyaml-3.12/series
 create mode 100644 rules/python3-pyyaml.in
 create mode 100644 rules/python3-pyyaml.make

diff --git a/patches/pyyaml-3.12/0001-setup.py-remove-overcomplicated-setup-resulting-in-w.patch b/patches/pyyaml-3.12/0001-setup.py-remove-overcomplicated-setup-resulting-in-w.patch
new file mode 100644
index 000000000..af96199ab
--- /dev/null
+++ b/patches/pyyaml-3.12/0001-setup.py-remove-overcomplicated-setup-resulting-in-w.patch
@@ -0,0 +1,324 @@
+From: Bastian Stender <bst@pengutronix.de>
+Date: Mon, 29 Jan 2018 16:18:38 +0100
+Subject: [PATCH] setup.py: remove overcomplicated setup resulting in wrong
+ paths
+
+All these checks are unnecessary with ptxdist. These checks make
+wrong assumptions about install paths resulting in absolute paths
+concatenated to DistroKit/platform-qemu/packages/pyyaml-3.12/.
+
+Signed-off-by: Bastian Stender <bst@pengutronix.de>
+---
+ setup.py | 290 +++------------------------------------------------------------
+ 1 file changed, 10 insertions(+), 280 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 9dc5e8d4855a..d65b5a7b46c2 100644
+--- a/setup.py
++++ b/setup.py
+@@ -35,281 +35,11 @@ CLASSIFIERS = [
+     "Topic :: Text Processing :: Markup",
+ ]
+ 
++from distutils.core import setup
++from distutils.extension import Extension
++from Cython.Distutils import build_ext
+ 
+-LIBYAML_CHECK = """
+-#include <yaml.h>
+-
+-int main(void) {
+-    yaml_parser_t parser;
+-    yaml_emitter_t emitter;
+-
+-    yaml_parser_initialize(&parser);
+-    yaml_parser_delete(&parser);
+-
+-    yaml_emitter_initialize(&emitter);
+-    yaml_emitter_delete(&emitter);
+-
+-    return 0;
+-}
+-"""
+-
+-
+-import sys, os.path, platform
+-
+-from distutils import log
+-from distutils.core import setup, Command
+-from distutils.core import Distribution as _Distribution
+-from distutils.core import Extension as _Extension
+-from distutils.dir_util import mkpath
+-from distutils.command.build_ext import build_ext as _build_ext
+-from distutils.command.bdist_rpm import bdist_rpm as _bdist_rpm
+-from distutils.errors import DistutilsError, CompileError, LinkError, DistutilsPlatformError
+-
+-if 'setuptools.extension' in sys.modules:
+-    _Extension = sys.modules['setuptools.extension']._Extension
+-    sys.modules['distutils.core'].Extension = _Extension
+-    sys.modules['distutils.extension'].Extension = _Extension
+-    sys.modules['distutils.command.build_ext'].Extension = _Extension
+-
+-with_cython = False
+-try:
+-    from Cython.Distutils.extension import Extension as _Extension
+-    from Cython.Distutils import build_ext as _build_ext
+-    with_cython = True
+-except ImportError:
+-    pass
+-
+-try:
+-    from wheel.bdist_wheel import bdist_wheel
+-except ImportError:
+-    bdist_wheel = None
+-
+-
+-class Distribution(_Distribution):
+-
+-    def __init__(self, attrs=None):
+-        _Distribution.__init__(self, attrs)
+-        if not self.ext_modules:
+-            return
+-        for idx in range(len(self.ext_modules)-1, -1, -1):
+-            ext = self.ext_modules[idx]
+-            if not isinstance(ext, Extension):
+-                continue
+-            setattr(self, ext.attr_name, None)
+-            self.global_options = [
+-                    (ext.option_name, None,
+-                        "include %s (default if %s is available)"
+-                        % (ext.feature_description, ext.feature_name)),
+-                    (ext.neg_option_name, None,
+-                        "exclude %s" % ext.feature_description),
+-            ] + self.global_options
+-            self.negative_opt = self.negative_opt.copy()
+-            self.negative_opt[ext.neg_option_name] = ext.option_name
+-
+-    def has_ext_modules(self):
+-        if not self.ext_modules:
+-            return False
+-        for ext in self.ext_modules:
+-            with_ext = self.ext_status(ext)
+-            if with_ext is None or with_ext:
+-                return True
+-        return False
+-
+-    def ext_status(self, ext):
+-        implementation = platform.python_implementation()
+-        if implementation != 'CPython':
+-            return False
+-        if isinstance(ext, Extension):
+-            with_ext = getattr(self, ext.attr_name)
+-            return with_ext
+-        else:
+-            return True
+-
+-
+-class Extension(_Extension):
+-
+-    def __init__(self, name, sources, feature_name, feature_description,
+-            feature_check, **kwds):
+-        if not with_cython:
+-            for filename in sources[:]:
+-                base, ext = os.path.splitext(filename)
+-                if ext == '.pyx':
+-                    sources.remove(filename)
+-                    sources.append('%s.c' % base)
+-        _Extension.__init__(self, name, sources, **kwds)
+-        self.feature_name = feature_name
+-        self.feature_description = feature_description
+-        self.feature_check = feature_check
+-        self.attr_name = 'with_' + feature_name.replace('-', '_')
+-        self.option_name = 'with-' + feature_name
+-        self.neg_option_name = 'without-' + feature_name
+-
+-
+-class build_ext(_build_ext):
+-
+-    def run(self):
+-        optional = True
+-        disabled = True
+-        for ext in self.extensions:
+-            with_ext = self.distribution.ext_status(ext)
+-            if with_ext is None:
+-                disabled = False
+-            elif with_ext:
+-                optional = False
+-                disabled = False
+-                break
+-        if disabled:
+-            return
+-        try:
+-            _build_ext.run(self)
+-        except DistutilsPlatformError:
+-            exc = sys.exc_info()[1]
+-            if optional:
+-                log.warn(str(exc))
+-                log.warn("skipping build_ext")
+-            else:
+-                raise
+-
+-    def get_source_files(self):
+-        self.check_extensions_list(self.extensions)
+-        filenames = []
+-        for ext in self.extensions:
+-            if with_cython:
+-                self.cython_sources(ext.sources, ext)
+-            for filename in ext.sources:
+-                filenames.append(filename)
+-                base = os.path.splitext(filename)[0]
+-                for ext in ['c', 'h', 'pyx', 'pxd']:
+-                    filename = '%s.%s' % (base, ext)
+-                    if filename not in filenames and os.path.isfile(filename):
+-                        filenames.append(filename)
+-        return filenames
+-
+-    def get_outputs(self):
+-        self.check_extensions_list(self.extensions)
+-        outputs = []
+-        for ext in self.extensions:
+-            fullname = self.get_ext_fullname(ext.name)
+-            filename = os.path.join(self.build_lib,
+-                                    self.get_ext_filename(fullname))
+-            if os.path.isfile(filename):
+-                outputs.append(filename)
+-        return outputs
+-
+-    def build_extensions(self):
+-        self.check_extensions_list(self.extensions)
+-        for ext in self.extensions:
+-            with_ext = self.distribution.ext_status(ext)
+-            if with_ext is None:
+-                with_ext = self.check_extension_availability(ext)
+-            if not with_ext:
+-                continue
+-            if with_cython:
+-                ext.sources = self.cython_sources(ext.sources, ext)
+-            self.build_extension(ext)
+-
+-    def check_extension_availability(self, ext):
+-        cache = os.path.join(self.build_temp, 'check_%s.out' % ext.feature_name)
+-        if not self.force and os.path.isfile(cache):
+-            data = open(cache).read().strip()
+-            if data == '1':
+-                return True
+-            elif data == '0':
+-                return False
+-        mkpath(self.build_temp)
+-        src = os.path.join(self.build_temp, 'check_%s.c' % ext.feature_name)
+-        open(src, 'w').write(ext.feature_check)
+-        log.info("checking if %s is compilable" % ext.feature_name)
+-        try:
+-            [obj] = self.compiler.compile([src],
+-                    macros=ext.define_macros+[(undef,) for undef in ext.undef_macros],
+-                    include_dirs=ext.include_dirs,
+-                    extra_postargs=(ext.extra_compile_args or []),
+-                    depends=ext.depends)
+-        except CompileError:
+-            log.warn("")
+-            log.warn("%s is not found or a compiler error: forcing --%s"
+-                     % (ext.feature_name, ext.neg_option_name))
+-            log.warn("(if %s is installed correctly, you may need to"
+-                    % ext.feature_name)
+-            log.warn(" specify the option --include-dirs or uncomment and")
+-            log.warn(" modify the parameter include_dirs in setup.cfg)")
+-            open(cache, 'w').write('0\n')
+-            return False
+-        prog = 'check_%s' % ext.feature_name
+-        log.info("checking if %s is linkable" % ext.feature_name)
+-        try:
+-            self.compiler.link_executable([obj], prog,
+-                    output_dir=self.build_temp,
+-                    libraries=ext.libraries,
+-                    library_dirs=ext.library_dirs,
+-                    runtime_library_dirs=ext.runtime_library_dirs,
+-                    extra_postargs=(ext.extra_link_args or []))
+-        except LinkError:
+-            log.warn("")
+-            log.warn("%s is not found or a linker error: forcing --%s"
+-                     % (ext.feature_name, ext.neg_option_name))
+-            log.warn("(if %s is installed correctly, you may need to"
+-                    % ext.feature_name)
+-            log.warn(" specify the option --library-dirs or uncomment and")
+-            log.warn(" modify the parameter library_dirs in setup.cfg)")
+-            open(cache, 'w').write('0\n')
+-            return False
+-        open(cache, 'w').write('1\n')
+-        return True
+-
+-
+-class bdist_rpm(_bdist_rpm):
+-
+-    def _make_spec_file(self):
+-        argv0 = sys.argv[0]
+-        features = []
+-        for ext in self.distribution.ext_modules:
+-            if not isinstance(ext, Extension):
+-                continue
+-            with_ext = getattr(self.distribution, ext.attr_name)
+-            if with_ext is None:
+-                continue
+-            if with_ext:
+-                features.append('--'+ext.option_name)
+-            else:
+-                features.append('--'+ext.neg_option_name)
+-        sys.argv[0] = ' '.join([argv0]+features)
+-        spec_file = _bdist_rpm._make_spec_file(self)
+-        sys.argv[0] = argv0
+-        return spec_file
+-
+-
+-class test(Command):
+-
+-    user_options = []
+-
+-    def initialize_options(self):
+-        pass
+-
+-    def finalize_options(self):
+-        pass
+-
+-    def run(self):
+-        build_cmd = self.get_finalized_command('build')
+-        build_cmd.run()
+-        sys.path.insert(0, build_cmd.build_lib)
+-        if sys.version_info[0] < 3:
+-            sys.path.insert(0, 'tests/lib')
+-        else:
+-            sys.path.insert(0, 'tests/lib3')
+-        import test_all
+-        if not test_all.main([]):
+-            raise DistutilsError("Tests failed")
+-
+-
+-cmdclass = {
+-    'build_ext': build_ext,
+-    'bdist_rpm': bdist_rpm,
+-    'test': test,
+-}
+-if bdist_wheel:
+-    cmdclass['bdist_wheel'] = bdist_wheel
++import sys, os.path
+ 
+ 
+ if __name__ == '__main__':
+@@ -329,13 +59,13 @@ if __name__ == '__main__':
+ 
+         package_dir={'': {2: 'lib', 3: 'lib3'}[sys.version_info[0]]},
+         packages=['yaml'],
+-        ext_modules=[
+-            Extension('_yaml', ['ext/_yaml.pyx'],
+-                'libyaml', "LibYAML bindings", LIBYAML_CHECK,
+-                libraries=['yaml']),
++
++        ext_modules = [
++            Extension( "_yaml", ["ext/_yaml.pyx"], libraries = ["yaml"] )
+         ],
+ 
+-        distclass=Distribution,
+-        cmdclass=cmdclass,
++        cmdclass={
++            'build_ext': build_ext,
++        },
+     )
+ 
diff --git a/patches/pyyaml-3.12/series b/patches/pyyaml-3.12/series
new file mode 100644
index 000000000..03ecdd494
--- /dev/null
+++ b/patches/pyyaml-3.12/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-setup.py-remove-overcomplicated-setup-resulting-in-w.patch
+# 0889f93d4365cb044851381b29479e78  - git-ptx-patches magic
diff --git a/rules/python3-pyyaml.in b/rules/python3-pyyaml.in
new file mode 100644
index 000000000..91035c50c
--- /dev/null
+++ b/rules/python3-pyyaml.in
@@ -0,0 +1,10 @@
+## SECTION=python3
+
+config PYTHON3_PYYAML
+	tristate
+	prompt "python3-pyyaml"
+	select HOST_CYTHON3
+	select PYTHON3
+	select LIBYAML
+	help
+	  YAML parser and emitter for Python
diff --git a/rules/python3-pyyaml.make b/rules/python3-pyyaml.make
new file mode 100644
index 000000000..cd195097f
--- /dev/null
+++ b/rules/python3-pyyaml.make
@@ -0,0 +1,54 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2018 by Bastian Stender <bst@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_PYTHON3_PYYAML) += python3-pyyaml
+
+#
+# Paths and names
+#
+PYTHON3_PYYAML_VERSION	:= 3.12
+PYTHON3_PYYAML_MD5	:= 5c41a91fae3da4f5302e25e5d8f4deeb
+PYTHON3_PYYAML		:= pyyaml-$(PYTHON3_PYYAML_VERSION)
+PYTHON3_PYYAML_SUFFIX	:= tar.gz
+PYTHON3_PYYAML_URL	:= https://github.com/yaml/pyyaml/archive/$(PYTHON3_PYYAML_VERSION).$(PYTHON3_PYYAML_SUFFIX)
+PYTHON3_PYYAML_SOURCE	:= $(SRCDIR)/$(PYTHON3_PYYAML).$(PYTHON3_PYYAML_SUFFIX)
+PYTHON3_PYYAML_DIR	:= $(BUILDDIR)/$(PYTHON3_PYYAML)
+PYTHON3_PYYAML_LICENSE	:= MIT
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+PYTHON3_PYYAML_CONF_TOOL	:= python3
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/python3-pyyaml.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, python3-pyyaml)
+	@$(call install_fixup, python3-pyyaml, PRIORITY, optional)
+	@$(call install_fixup, python3-pyyaml, SECTION, base)
+	@$(call install_fixup, python3-pyyaml, AUTHOR, "Bastian Stender <bst@pengutronix.de>")
+	@$(call install_fixup, python3-pyyaml, DESCRIPTION, missing)
+
+	@$(call install_glob, python3-pyyaml, 0, 0, -, \
+		/usr/lib/python$(PYTHON3_MAJORMINOR)/site-packages/yaml,, *.py)
+
+	@$(call install_finish, python3-pyyaml)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.15.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* [ptxdist] [PATCH 5/5] python3-hbmqtt: new package
  2018-01-29 15:40 [ptxdist] [PATCH 1/5] python3-transitions: new package Bastian Stender
                   ` (2 preceding siblings ...)
  2018-01-29 15:40 ` [ptxdist] [PATCH 4/5] python3-pyyaml: " Bastian Stender
@ 2018-01-29 15:40 ` Bastian Stender
  3 siblings, 0 replies; 5+ messages in thread
From: Bastian Stender @ 2018-01-29 15:40 UTC (permalink / raw)
  To: ptxdist; +Cc: David Jander

From: David Jander <david@protonic.nl>

Signed-off-by: David Jander <david@protonic.nl>
---
 rules/python3-hbmqtt.in   | 12 +++++++++++
 rules/python3-hbmqtt.make | 54 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 66 insertions(+)
 create mode 100644 rules/python3-hbmqtt.in
 create mode 100644 rules/python3-hbmqtt.make

diff --git a/rules/python3-hbmqtt.in b/rules/python3-hbmqtt.in
new file mode 100644
index 000000000..e4313876e
--- /dev/null
+++ b/rules/python3-hbmqtt.in
@@ -0,0 +1,12 @@
+## SECTION=python3
+
+config PYTHON3_HBMQTT
+	tristate
+	prompt "python3-hbmqtt"
+	select HOST_PYTHON3_SETUPTOOLS
+	select PYTHON3
+	select PYTHON3_TRANSITIONS
+	select PYTHON3_WEBSOCKETS
+	select PYTHON3_PYYAML
+	help
+	  MQTT client/broker using Python asyncio
diff --git a/rules/python3-hbmqtt.make b/rules/python3-hbmqtt.make
new file mode 100644
index 000000000..a3dade74f
--- /dev/null
+++ b/rules/python3-hbmqtt.make
@@ -0,0 +1,54 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by David Jander <david@protonic.nl>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_PYTHON3_HBMQTT) += python3-hbmqtt
+
+#
+# Paths and names
+#
+PYTHON3_HBMQTT_VERSION	:= 0.9
+PYTHON3_HBMQTT_MD5	:= 6789d964c0e3573ca70d20a0e2ff191e
+PYTHON3_HBMQTT		:= python3-hbmqtt-$(PYTHON3_HBMQTT_VERSION)
+PYTHON3_HBMQTT_SUFFIX	:= tar.gz
+PYTHON3_HBMQTT_URL	:= https://github.com/beerfactory/hbmqtt/archive/$(PYTHON3_HBMQTT_VERSION).$(PYTHON3_HBMQTT_SUFFIX)
+PYTHON3_HBMQTT_SOURCE	:= $(SRCDIR)/$(PYTHON3_HBMQTT).$(PYTHON3_HBMQTT_SUFFIX)
+PYTHON3_HBMQTT_DIR	:= $(BUILDDIR)/$(PYTHON3_HBMQTT)
+PYTHON3_HBMQTT_LICENSE	:= MIT
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+PYTHON3_HBMQTT_CONF_TOOL	:= python3
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/python3-hbmqtt.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, python3-hbmqtt)
+	@$(call install_fixup, python3-hbmqtt, PRIORITY, optional)
+	@$(call install_fixup, python3-hbmqtt, SECTION, base)
+	@$(call install_fixup, python3-hbmqtt, AUTHOR, "David Jander <david@protonic.nl>")
+	@$(call install_fixup, python3-hbmqtt, DESCRIPTION, missing)
+
+	@$(call install_glob, python3-hbmqtt, 0, 0, -, \
+		/usr/lib/python$(PYTHON3_MAJORMINOR)/site-packages/hbmqtt,, *.py)
+
+	@$(call install_finish, python3-hbmqtt)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.15.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

end of thread, other threads:[~2018-01-29 15:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-29 15:40 [ptxdist] [PATCH 1/5] python3-transitions: new package Bastian Stender
2018-01-29 15:40 ` [ptxdist] [PATCH 2/5] python3-websockets: " Bastian Stender
2018-01-29 15:40 ` [ptxdist] [PATCH 3/5] libyaml: " Bastian Stender
2018-01-29 15:40 ` [ptxdist] [PATCH 4/5] python3-pyyaml: " Bastian Stender
2018-01-29 15:40 ` [ptxdist] [PATCH 5/5] python3-hbmqtt: " Bastian Stender

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox