Commit Graph

20 Commits

Author SHA1 Message Date
Felix Moessbauer
6131038c00 drop support for Python 3.5
As all currently supported distros provide at least python 3.6, we
drop the support for 3.5. At time of this commit, the python versions
of the supported distros are as following:

- Debian: 3.7 (buster)
- Ubuntu: 3.7 (18.04)
- Fedora: 3.11 (Fedora 36)
- RHEL: 2.x (RHEL 7), 3.6 (RHEL 8)
- OpenSUSE: 3.6 (Leap / 15.4)

While updating the lower bound version, we also unify the upper bound in
the setup.py script with the versions tested in the CI.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2023-04-23 11:57:30 +02:00
Konrad Weihmann
e9bdbe8cfa setup.py: bundle kas-container script
so it will be shipped with the pypi release and users can
use this script from a secure and verifiable source, as pypi
if providing checksum for package verification, unlike as if
the script would be fetched just from github and set executable.

Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2022-03-29 09:24:37 +02:00
Jan Kiszka
257e5bdd5e setup: Drop include_package_data
This prevents adding package_data to the source distribution, which we
have to.

Reported by: Ralf Beier <rbeier57@gmail.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2021-10-22 19:58:59 +02:00
Jan Kiszka
4f23045ce8 Add kconfiglib-based menu plugin
This uses the kconfiglib python module to implement simple interactive
configuration for complex layers with many kas options and even variable
input. See the menu.py documentation header for details on the Kconfig
format and its translation to kas.

Rather than using the limited menuconfig implementation of kconfiglib,
this comes with an own, python-newt based version. The permits smooth
integration in the workflow, e.g. to offer an option that directly
triggers a build after completing a configuration. And it comes with a
nicer layout.

Unfortunately, python-newt can't be fulfilled via pip. But it is
available as proper package via common distros. So warn if the package
is missing.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2021-10-09 15:00:05 +02:00
ciarancourtney
460699685e yml: Move json schema from python dict to standalone json file
- Easier to reference as schema for IDEs
- Can be added to schemastore.org

Signed-off-by: ciarancourtney <ciaran.courtney@activeenergy.ie>
[Jan: rebased, merged in schema installation]
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2021-10-05 10:28:24 +02:00
Jan Kiszka
5981664b25 setup: Set upper version limit for dependencies
Let's avoid that any of our dependencies decides to break interfaces
that we use and that users run into surprises. As a safe bet, limit us
to the currently know-to-work major versions.

Closes #34
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2021-02-24 09:01:08 +01:00
Jan Kiszka
4744c8946b Declare Python 3.9 compatibility
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2020-11-13 08:56:31 +01:00
Jan Kiszka
e383e16570 Drop Python 3.4 compatibility, include 3.8
PyYAML started to require at least 3.5. There is possibly a way to pick
an older version of it to fulfill its needs, but it's also not worth to
invest effort in this old version anymore.

Use that chance to include 3.8 in the support scope.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2020-01-09 11:35:40 +01:00
Jan Kiszka
61f31c75fd Update maintainer name
I took over the maintainership from Daniel.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2019-09-11 13:43:15 +02:00
Andreas Reichel
10cd13cf9c Correct grammar, spelling and copyright year in files
Signed-off-by: Andreas Reichel <andreas.reichel.ext@siemens.com>
2018-09-05 12:46:35 +02:00
Claudius Heine
5fac90611f setup: added python 3.6 line
Signed-off-by: Claudius Heine <ch@denx.de>
2017-11-10 09:21:42 +01:00
Claudius Heine
6d6e7ff2e7 setup: added python version requirement
Signed-off-by: Claudius Heine <ch@denx.de>
2017-11-10 09:21:37 +01:00
Claudius Heine
75fa095aa5 config: Added schema validation for configuration files
Currently many of the error messages regarding the configuration file
are not really helpful.

To improve reporting this patch adds validation of the configuration
files using the jsonschema module.

Example:

  Forgetting ':' at the end of a layer definition, like this:

    repos:
      meta-iot2000:
        layers:
          meta-iot2000-example
                              ^

  Exception before:

    TypeError: string indices must be integers

  Exception after:

    Validation Error:
     'meta-iot2000-example' is not of type 'object'

     Failed validating 'type' in schema['properties']['repos']['additionalProperties']['properties']['layers']:
         {'additionalProperties': {'oneOf': [{'type': 'null'},
                                             {'type': 'integer'},
                                             {'type': 'boolean'},
                                             {'type': 'string'}]},
          'type': 'object'}

     On instance['repos']['meta-iot2000']['layers']:
         'meta-iot2000-example'

This patch adds 'jsonschema' as an additional dependency.

Signed-off-by: Claudius Heine <ch@denx.de>
2017-10-13 14:11:10 +02:00
Daniel Wagner
a4c424c253 Add missing URLs and maintainer information to setup.py
With these changes it is possible to upload the package to PyPI live.

Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com>
2017-07-20 16:08:28 +02:00
Jan Kiszka
4f5cd3ca5b README: Convert to structured text
This is a preferred format of Python READMEs and also properly rendered
by github.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2017-07-20 15:29:12 +02:00
Daniel Wagner
6bc7715f15 Release 0.10.0
Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com>
2017-07-10 12:27:26 +02:00
Claudius Heine
58b5014345 Add install_requires in setup.py
The necessary dependencies should also be defined in the setup.py file,
so that they are automatically installed by `pip`.

Signed-off-by: Claudius Heine <ch@denx.de>
2017-06-23 08:36:48 +02:00
Claudius Heine
33a21c8d0d run pylint3 and fixed report
This commit adds a pylint configuration and fixed all found issues.

Signed-off-by: Claudius Heine <ch@denx.de>
2017-06-21 17:30:51 +02:00
Claudius Heine
4df59537ba Make __version__ available in the whole module
This shortens the include from "from .__version__ import __version__"
to "from . import __version__" within the module.

Signed-off-by: Claudius Heine <ch@denx.de>
2017-06-19 12:26:08 +02:00
Daniel Wagner
daf0abab5e Initial public release
This is the first public release of kas.

Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com>
2017-06-14 15:21:19 +02:00