From 1744840289a4f3b8e185625f0fa65aaaf8ec84db Mon Sep 17 00:00:00 2001 From: Amir MOHAMMADI <amir.mohammadi@idiap.ch> Date: Mon, 9 Nov 2020 12:11:45 +0100 Subject: [PATCH] Add make to the list of dependencies --- bob/devtools/data/conda_build_config.yaml | 6 ++++-- doc/templates.rst | 24 ++++++++++++----------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/bob/devtools/data/conda_build_config.yaml b/bob/devtools/data/conda_build_config.yaml index b80bfed3..23bfdbb3 100644 --- a/bob/devtools/data/conda_build_config.yaml +++ b/bob/devtools/data/conda_build_config.yaml @@ -78,12 +78,12 @@ zip_keys: # This version of bob-devel will be used at test time of packages: bob_devel: - - 2020.11.05 + - 2020.11.06 # This version of beat-devel will be used at test time of packages. Notice it # uses bob-devel and should have a version that is greater or equal its value beat_devel: - - 2020.11.05 + - 2020.11.06 # The build time only dependencies (build requirements). # Updating these to the latest version all the time is OK and a good idea. @@ -91,6 +91,8 @@ beat_devel: # overlap) so update them in both places. cmake: - 3.14.0 +make: + - 4.2.1 pkg_config: - 0.29.2 diff --git a/doc/templates.rst b/doc/templates.rst index 5ad5da2f..4c0d9b06 100644 --- a/doc/templates.rst +++ b/doc/templates.rst @@ -573,9 +573,10 @@ recipes. Here are some notes: - {{ compiler('cxx') }} - pkg-config {{ pkg_config }} - cmake {{ cmake }} + - make {{ make }} - The pkg-config and cmake lines are optional. If the package uses them, you - need to include these as well. + The pkg-config, cmake, and make lines are optional. If the package uses them, + you need to include these as well. * List all the packages that are in ``requirements.txt`` in the ``requirements / host`` section, adding a new line per dependence. For @@ -600,7 +601,11 @@ recipes. Here are some notes: You need to add a jinja variable like `{{ dependence }}` in front of the dependencies that we **do not** develop. The jinja variable name should not contain ``.`` or ``-``; replace those with ``_``. Bob_ and BEAT_ packages - (and gridtk) should be listed as is. + (and gridtk) should be listed as is. These jinja variables are defined inside + bob/bob.devtools> in ``bob/devtools/data/conda_build_config.yaml`` and the + version numbers are defined in bob/conda> in ``conda/bob-devel/meta.yaml``. + So, you will need to modify these two files before you can use a new package + in your Bob package. * Unlike ``pip``, ``conda`` is **not** limited to Python programs. If the package depends on some non-python package (like ``boost``), you need to list @@ -620,7 +625,7 @@ feature here which makes this slightly complicated. In summary, you put all the run-time dependencies in the ``requirements / run`` section **unless** this dependency was listed in the host section **and** the dependency has a ``run_exports`` set -on their own recipe (what a mess!). The problem is that you cannot easily find +on their own recipe. The problem is that you cannot easily find which packages actually do have ``run_exports`` unless you look at their conda recipe. Usually, all the C/C++ libraries like ``jpeg``, ``hdf5`` have ``run_exports`` (with exceptions - ``boost``, for instance, does not have @@ -631,17 +636,14 @@ inside the ``requirements / run`` section of ``bob/bob.measure``: run: - setuptools - - matplotlib - - boost + - {{ pin_compatible('matplotlib') }} + - {{ pin_compatible('boost') }} - {{ pin_compatible('numpy') }} - - docopt + - {{ pin_compatible('docopt') }} The ``pin_compatible`` jinja function is `explained in here <https://conda.io/docs/user-guide/tasks/build-packages/define-metadata.html#pin-downstream>`_. -You need to use it on ``numpy`` if and only if you use ``numpy`` in C level. -Otherwise, just list numpy normally. We do not know of any other package -besides numpy used in C level that needs to use the ``pin_compatible`` jinja -function. +You need to use it on all packages (except python and setuptools) that do not have run_exports. Here is a list of packages that we know that they have ``run_exports``: -- GitLab