Commit Graph

37 Commits

Author SHA1 Message Date
Gerard Marull-Paretas 7f9215da0e doc: move requirements to doc/
Zephyr scripts do not require documentation dependencies, so let's
move them from scripts/ to doc/.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-07-12 09:13:49 -04:00
Peter Bigot 78f36fa534 python3: add check_compliance package requirements
Running check_compliance on a PR before submitting it can avert
embarrassing mistakes.  Ensure the packages needed to do so are
installed along with all the others.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-08-11 14:49:48 -04:00
Kumar Gala a457681b1c scripts/requirements: Split & document requirement.txt
Split up requirements.txt into several files so that CI tools can
utilize/reference the specific requirements-<FOO>.txt they may need
while keep things in sync with the development.  This is to reduce
both time and amount of work CI actions due to python package install.

Create the following groupings:

1. BASE - needed to build or create zephyr images
2. BUILD-TEST - need to run compile/build tests
3. DOC - need to build the docs
4. RUN-TEST - need for runtime testing
5. EXTRAS - optional or useful for development/developers workflow

Also tried to add a comment about what or why a given package is being
pulled in for.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-03-19 15:41:08 +01:00
Kumar Gala 0ce53610f8 scripts/requirements: Remove unused packages
Remove 'git-spindle' as there are not users in any scripts or build
system and not references in any of our docs.

Remove 'wheel' as nothing seems to use or need it directly.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-02-12 10:30:56 -06:00
Anas Nashif a9f2fcb64a requirements: require gcovr >= 4.2
This is the version needed to generate coverage using sanitycheck.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-02-07 15:14:24 -05:00
Erwan Gouriou a11405df52 scripts: requirements: Request version 0.24.0 for pyocd
pyocd 0.24.0 provides support for more user options.
This enables flashing of additional boards using pyocd.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-01-13 11:49:57 +01:00
Anas Nashif 2ebb2ea5e8 requirements: require tabulate and anytree modules for sanitycheck
tabulate: Needed to show list of devices in a well formatted table.
anytree: needed to list testsuite in a tree form.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-12-17 17:21:56 -05:00
Peter Bigot 1042b04152 scripts/requirements: update PyYAML to >=5.1
sanitycheck now requires yaml.FullLoader to support generating
hardware maps.  This feature was introduced in PyYAML 5.1.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-11-05 08:30:30 -05:00
Martí Bolívar 34ca048d4b scripts: use compatible release specifiers in requirements.txt
Using exact versions for our PyPI dependencies (i.e. requirements.txt
lines that look like "dependency==X.Y.Z") is rude since we're asking
users to install these dependencies outside of any virtual
environment. This causes conflicts with other packages which may
depend on the same things as us.

Use inclusive ordered comparison (>=) release specifiers instead:

https://www.python.org/dev/peps/pep-0440/#inclusive-ordered-comparison

If this causes problems for individual packages, we can refine them
using compatible release specifiers (~=):

https://www.python.org/dev/peps/pep-0440/#compatible-release

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2019-10-23 14:43:06 +02:00
Marti Bolivar 146580e555 scripts: west_commands: verify minimum cmake version
A recent developer experience study has pointed out that it's very
common for people to miss that the minimum cmake version required by
zephyr is higher than that which is commonly packaged by Linux
distributions.

Since this is a serious usability issue, it's worth adding extra
checking from zcmake.py to make sure that west commands which run
cmake always print a sensible error message if the cmake version used
is too old. Make that happen.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-09-07 10:08:23 -04:00
David B. Kinder 02ee3754c6 west: update requirements.txt to avoid west 0.6.1
Update scripts/requirements.txt to use 0.6.2 or later (avoiding 0.6.1
that has an known issue)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-09-06 19:12:33 +02:00
David B. Kinder 2c93d1f1f2 doc: add sphinx-tabs extension
The sphinx-tabs extension provides a tabbed interface within documents
that will let us dynamically display information based on a user
selection, for example, for instruction variations based on the user's
development OS (Linux, macOS, Windows).

I'm adding this early so it can get integrated into the CI doc build
before subsequent PRs using this extension are submitted.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-08-23 19:38:44 -04:00
Anas Nashif 35d4177a0b requirements: add west>-0.6.0
west is yet another python package, so lets add it here. This will
provide us with one single file with all python requirements that can be
used during setup and for example for docker images.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-08-23 13:50:16 -04:00
Anas Nashif dd3776cfa5 requirements: sort alphabetically
Sort packages alphabetically.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-08-23 13:50:16 -04:00
Marcin Sloniewski b78bf8d6c1 requirements.txt: change package name "hub" to "git-spindle"
Package "hub" has been renamed some time ago to "git-spindle".
Recently package with the same name "hub" has been released on PyPi
page, which causes installing pip requirements.txt to fail since
it is trying to install different package.

Signed-off-by: Marcin Sloniewski <marcin.sloniewski@gmail.com>
2019-08-12 11:53:10 +02:00
Erwan Gouriou 8a9ca0d864 scripts: Upgrade pyocd for pack support
pyocd 0.21.0 provides pack support 'pack support' functionality,
as opposed to current 'buitlin support'.
This new feature enables the possibility to add pyocd support
for any chip that is documented in Keil database. Then one doesn't
need anymore to wait pyocd is updated with a new target to use
pyocd with his target, as long as it is populated in Keil database.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-06-18 23:03:35 -04:00
Andrew Boie a42313d488 requirements.txt: add gcovr
This tool is cited in our documentation for producing coverage
reports, add it to the list of packages pulled in by pip during
workstation setup.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-06-07 14:15:16 -07:00
Marti Bolivar 100a2bba6c scripts: update pyocd in requirements.txt
This includes a bugfix for a pyocd requirement on pyyaml
that could not be satisfied using officially supported
releases.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-04-10 17:52:15 -04:00
Michael Scott 4278bf5673 scripts/dts: Fix for PyYAML 5.1 Loader changes
PyYAML 5.1 was just released and it doesn't support !include as
previous versions do.  This breaks our DTS bindings parsing.

Let's fix our extract_dts_include.py script to work with both
3.13 and 5.1.

Also, update the pyyaml requirement to >=3.13 to be sure we're
compatible.

Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/14496

Signed-off-by: Michael Scott <mike@foundries.io>
2019-03-13 23:21:42 -05:00
Maureen Helm 6de4578dc6 scripts: Update pyocd version to 0.16.1
Update the pyocd version to pick up a fix for the command 'pyocd erase',
which was broken in 0.15.0 and fixed in 0.16.0. Although we don't have
any in-tree uses of this command in zephyr, there will soon be in-tree
uses in mcuboot when the deprecated 'pyocd-flashtool' and 'pyocd-tool'
commands are replaced with the new unified pyocd commands.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-02-18 22:34:25 -05:00
Marti Bolivar 63841df184 scripts: run_ci.sh: add pytest-based testing for west commands
Incorporate these into run_ci.sh the same way that btsim results were
done. This adds a dependency on pytest.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2019-01-29 10:15:01 +01:00
Anas Nashif 939f15195d requirements: update to pyocd 0.15.0
Previous release had some issues with unicode and was failing to install
in our CI. Those issues were fixed in this release.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-23 15:42:40 -05:00
Maureen Helm 73956a398e scripts: Update pyocd version to 0.14.3
pyocd recently merged its command-line tools into a unified pyocd tool
with subcommands. The separate command-line tools still remain, but are
deprecated. Update the pyocd version required by zephyr in preparation
for updating the pyocd runner to use the new unified tool commands.

Pin pyocd to a specific version rather than allowing any version greater
than or equal to 0.14.0 because there have been a few unstable releases
recently. Version 0.14.3 is what I have been using locally and know to
be stable.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-01-11 21:33:28 -06:00
Håkon Øye Amundsen 81c6662d23 cmake: flash: scripts: Include externally built hex files
Allow user to add externally built hex files to the cmake property
HEX_FILES_TO_MERGE. The hex files in this list will be merged
with the hex file generated when building the zephyr application.

This allows users to leverage the application configuration
available in Kconfig and CMake to help decide what hex file
should be merged with the zephyr application.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2018-12-04 19:04:13 +01:00
Henrik Brix Andersen 9e8c9ca8fb subsys: fb: add support for generating CFB font headers at build time
Add script and cmake functions for automatically generating Character
Frame Buffer (CFB) font header files from image files, TrueType, or
OpenType font files.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2018-11-28 11:46:00 +01:00
Mikkel Jakobsen 9c8a6099a7 scripts: locked pyocd version to 0.12.0 in requirements.txt
The recently released version 0.13.0 of pyocd does not install cleanly
in linux and prevents installation of requirements.txt. Locking pyocd to
version 0.12.0 is a temporary workaround until problem is solved by
pyocd maintainers.

Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@prevas.dk>
2018-11-10 10:06:17 -05:00
Marti Bolivar ddad53abe2 scripts: add colorama to requirements.txt
This got missed in the latest west code import.

Fixes #10241.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-09-27 05:52:39 +05:30
Marti Bolivar 5cf80e4e22 scripts: requirements.txt: fix PyYAML for python 3.7
PyYAML 3.13 includes a fix necessary to install on Python 3.7:

    3.13 (2018-07-05)

    Rebuild wheels using latest Cython for Python 3.7 support.

Support it by accepting any PyYAML at least as recent as the current
version in requirements.txt, currently 3.12.

Signed-off-by: Marti Bolivar <marti@foundries.io>
2018-09-11 20:58:09 -04:00
Daniel Leung 9945e7fda0 doc: add ability to generate PDF
This adds new targets to generate build documentation through
LaTEX to PDF.

There are a few notes:

1. pdflatex complains about the tex file generated by doxygen
   so it needs to be fixed with a Python script before feeding
   in through pdflatex.

2. SVG files are not recognized by pdflatex so they are converted
   to known good format on the fly, only for producing PDF. This
   uses the libRSVG's rsvg-convert tool.

Relates to #6782.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-08-29 18:16:56 -04:00
Maureen Helm d7d1090422 doc: scripts: Updates for pyocd v0.11.1
pyocd recently added support for python 3 so we can now remove the
python 2 package requirements. It also merged Zephyr thread awareness
upstream, so we can remove the reference to my pyocd pull request.

Tested debugging and flashing on Linux and Windows.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-07-27 00:54:55 +02:00
David B. Kinder a3d83ec9f4 doc: update doc build tools documentation
Update the doc build tools versions listed in requirements.txt (and
mentioned in the doc building instructions).

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-06-18 12:42:18 -04:00
Anas Nashif de7fc9dec9 sanitycheck: we need pyserial for sanitycheck
Needed for testing on real hardware and connecting to the serial console
to capture output.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-08 07:56:18 -04:00
Ulf Magnusson 133bad7899 scripts: install windows-curses package on Windows
The new menuconfig implementation needs it when run on Windows.

Use an environment marker to only install windows-curses on Windows. See
https://www.python.org/dev/peps/pep-0508/#id23.

From some googling, sys_platform might be more widely supported than
platform_system, so use that.

Suggested-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
2018-05-07 21:53:37 +02:00
Anas Nashif 61346f0c42 doc: install pyocd using pip2
pyocd does not exist as a python 3 module, use pip2 to install it.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-02-06 19:40:42 -05:00
David B. Kinder 77d877c0d9 doc: update doc tools versions
I've been successfully using the latest sphinx/breathe/docutils
and doxygen versions for local doc build testing. The CI system
already uses the latest doxygen, so this patch updates the
pip-installed sphinx, breathe, and docutils tools too.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-01-11 06:51:22 -05:00
Anas Nashif 8fe8df23ba scripts: require python module wheel
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-10-31 12:32:34 -04:00
Anas Nashif 35a70b41dd doc: add python pip requirements.txt
List all required modules in one file and just call pip with this
file to install all needed modules instead of listing them
individually.

Added gitlint and pyocd and other required packages to the list.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-22 14:04:20 -04:00