Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report fully rendered recipe to stdout #5344

Merged
merged 11 commits into from
Jun 7, 2024
Merged

Conversation

jaimergp
Copy link
Contributor

@jaimergp jaimergp commented May 17, 2024

Description

Closes #3798

Example output
$ python -mconda build tests/test-recipes/metadata/outputs_overwrite_base_file
WARNING: No numpy version specified in conda_build_config.yaml.  Falling back to default numpy value of 1.22
Adding in variants from internal_defaults
Attempting to finalize metadata for base-outputs_overwrite_base_file
Attempting to finalize metadata for first-outputs_overwrite_base_file
Attempting to finalize metadata for second-outputs_overwrite_base_file
BUILD START: ['base-outputs_overwrite_base_file-1.0-0.tar.bz2', 'first-outputs_overwrite_base_file-1.0-0.tar.bz2', 'second-outputs_overwrite_base_file-1.0-0.tar.bz2']

Rendered as:
:::yaml
package:
  name: base-outputs_overwrite_base_file
  version: '1.0'
build:
  noarch: false
  noarch_python: false
  script: install.sh
requirements:
  build: []
  run: []
outputs:
  - name: base-outputs_overwrite_base_file
    script: install.sh
  - name: first-outputs_overwrite_base_file
    requirements:
      host:
        - base-outputs_overwrite_base_file >=1.0,<2.0a0
      run:
        - base-outputs_overwrite_base_file >=1.0,<2.0a0
    script: install.sh
    test:
      commands:
        - content="$(cat "${PREFIX}/file")"
        - test "${content}" = base
  - name: second-outputs_overwrite_base_file
    requirements:
      host:
        - base-outputs_overwrite_base_file >=1.0,<2.0a0
      run:
        - base-outputs_overwrite_base_file >=1.0,<2.0a0
    script: install.sh
    test:
      commands:
        - content="$(cat "${PREFIX}/file")"
        - test "${content}" = "base"
extra:
  copy_test_source_files: true
  final: true
  parent_recipe:
    name: outputs_overwrite_base_file
    path: /Users/jrodriguez/devel/conda-build/tests/test-recipes/metadata/outputs_overwrite_base_file
    version: '1.0'
:::

source tree in: /Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/outputs_overwrite_base_file_1715947692957/work
Packaging base-outputs_overwrite_base_file
Packaging base-outputs_overwrite_base_file-1.0-0

Resource usage statistics from bundling base-outputs_overwrite_base_file:
   Process count: 1
   CPU time: Sys=0:00:00.0, User=0:00:00.0
   Memory: 2.1M
   Disk usage: 16B
   Time elapsed: 0:00:02.0


number of files: 1
Fixing permissions
INFO :: Time taken to mark (prefix)
        0 replacements in 0 files was 0.02 seconds
Package verification results:
-----------------------------
/var/folders/1b/z374sygs1s96t_xxxv0hr3lr0000gn/T/tmp09ey0n99/base-outputs_overwrite_base_file-1.0-0.tar.bz2: C1115 Found invalid license "None" in info/index.json
Packaging first-outputs_overwrite_base_file
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done

## Package Plan ##

  environment location: /Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/outputs_overwrite_base_file_1715947692957/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p


The following NEW packages will be INSTALLED:

    base-outputs_overwrite_base_file: 1.0-0 local

Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done

Resource usage statistics from bundling first-outputs_overwrite_base_file:
   Process count: 2
   CPU time: Sys=0:00:00.0, User=0:00:00.0
   Memory: 9.0M
   Disk usage: 16B
   Time elapsed: 0:00:02.0


number of files: 0
Fixing permissions
INFO :: Time taken to mark (prefix)
        0 replacements in 0 files was 0.00 seconds
Package verification results:
-----------------------------
/var/folders/1b/z374sygs1s96t_xxxv0hr3lr0000gn/T/tmp4qi2fr5z/first-outputs_overwrite_base_file-1.0-0.tar.bz2: C1115 Found invalid license "None" in info/index.json
Packaging second-outputs_overwrite_base_file
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done

## Package Plan ##

  environment location: /Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/outputs_overwrite_base_file_1715947692957/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p


The following NEW packages will be INSTALLED:

    base-outputs_overwrite_base_file: 1.0-0 local

Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done

Resource usage statistics from bundling second-outputs_overwrite_base_file:
   Process count: 2
   CPU time: Sys=0:00:00.0, User=0:00:00.0
   Memory: 6.0M
   Disk usage: 16B
   Time elapsed: 0:00:02.0


number of files: 0
Fixing permissions
INFO :: Time taken to mark (prefix)
        0 replacements in 0 files was 0.00 seconds
Package verification results:
-----------------------------
/var/folders/1b/z374sygs1s96t_xxxv0hr3lr0000gn/T/tmp_rwu_c8c/second-outputs_overwrite_base_file-1.0-0.tar.bz2: C1115 Found invalid license "None" in info/index.json
TEST START: /Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/osx-arm64/base-outputs_overwrite_base_file-1.0-0.tar.bz2
WARNING: Multiple meta files found. The meta.yaml file in the base directory (/var/folders/1b/z374sygs1s96t_xxxv0hr3lr0000gn/T/tmp01qk8lro/info/recipe) will be used.
Nothing to test for: /Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/osx-arm64/base-outputs_overwrite_base_file-1.0-0.tar.bz2
TEST START: /Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/osx-arm64/first-outputs_overwrite_base_file-1.0-0.tar.bz2
WARNING: Multiple meta files found. The meta.yaml file in the base directory (/var/folders/1b/z374sygs1s96t_xxxv0hr3lr0000gn/T/tmpa3vobxah/info/recipe) will be used.
Renaming work directory '/Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/outputs_overwrite_base_file_1715947692957/work' to '/Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/outputs_overwrite_base_file_1715947692957/work_moved_first-outputs_overwrite_base_file-1.0-0_osx-arm64'
shutil.move(work)=/Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/outputs_overwrite_base_file_1715947692957/work, dest=/Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/outputs_overwrite_base_file_1715947692957/work_moved_first-outputs_overwrite_base_file-1.0-0_osx-arm64)
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done

## Package Plan ##

  environment location: /Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/outputs_overwrite_base_file_1715947692957/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh


The following NEW packages will be INSTALLED:

    base-outputs_overwrite_base_file:  1.0-0 local
    first-outputs_overwrite_base_file: 1.0-0 local

Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
export PREFIX=/Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/outputs_overwrite_base_file_1715947692957/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh
export SRC_DIR=/Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/outputs_overwrite_base_file_1715947692957/test_tmp
++ cat /Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/outputs_overwrite_base_file_1715947692957/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/file
+ content=base
+ test base = base
+ exit 0

Resource usage statistics from testing first-outputs_overwrite_base_file:
   Process count: 2
   CPU time: Sys=0:00:00.0, User=0:00:00.0
   Memory: 5.1M
   Disk usage: 24B
   Time elapsed: 0:00:02.1


TEST END: /Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/osx-arm64/first-outputs_overwrite_base_file-1.0-0.tar.bz2
TEST START: /Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/osx-arm64/second-outputs_overwrite_base_file-1.0-0.tar.bz2
WARNING: Multiple meta files found. The meta.yaml file in the base directory (/var/folders/1b/z374sygs1s96t_xxxv0hr3lr0000gn/T/tmpjz8gztqw/info/recipe) will be used.
Renaming work directory '/Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/outputs_overwrite_base_file_1715947692957/work' to '/Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/outputs_overwrite_base_file_1715947692957/work_moved_second-outputs_overwrite_base_file-1.0-0_osx-arm64'
shutil.move(work)=/Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/outputs_overwrite_base_file_1715947692957/work, dest=/Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/outputs_overwrite_base_file_1715947692957/work_moved_second-outputs_overwrite_base_file-1.0-0_osx-arm64)
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done

## Package Plan ##

  environment location: /Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/outputs_overwrite_base_file_1715947692957/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh


The following NEW packages will be INSTALLED:

    base-outputs_overwrite_base_file:   1.0-0 local
    second-outputs_overwrite_base_file: 1.0-0 local

Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
export PREFIX=/Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/outputs_overwrite_base_file_1715947692957/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh
export SRC_DIR=/Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/outputs_overwrite_base_file_1715947692957/test_tmp
++ cat /Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/outputs_overwrite_base_file_1715947692957/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/file
+ content=base
+ test base = base
+ exit 0

Resource usage statistics from testing second-outputs_overwrite_base_file:
   Process count: 2
   CPU time: Sys=0:00:00.0, User=0:00:00.0
   Memory: 5.1M
   Disk usage: 24B
   Time elapsed: 0:00:02.0


TEST END: /Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/osx-arm64/second-outputs_overwrite_base_file-1.0-0.tar.bz2
Renaming work directory '/Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/outputs_overwrite_base_file_1715947692957/work' to '/Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/outputs_overwrite_base_file_1715947692957/work_moved_outputs_overwrite_base_file-1.0-0_osx-arm64_main_build_loop'
shutil.move(work)=/Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/outputs_overwrite_base_file_1715947692957/work, dest=/Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/outputs_overwrite_base_file_1715947692957/work_moved_outputs_overwrite_base_file-1.0-0_osx-arm64_main_build_loop)
# Automatic uploading is disabled
# If you want to upload package(s) to anaconda.org later, type:


# To have conda build upload to anaconda.org automatically, use
# conda config --set anaconda_upload yes
anaconda upload \
    /Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/osx-arm64/base-outputs_overwrite_base_file-1.0-0.tar.bz2 \
    /Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/osx-arm64/first-outputs_overwrite_base_file-1.0-0.tar.bz2 \
    /Users/jrodriguez/.local/anaconda/envs/conda-build-dev/conda-bld/osx-arm64/second-outputs_overwrite_base_file-1.0-0.tar.bz2
anaconda_upload is not set.  Not uploading wheels: []

INFO :: The inputs making up the hashes for the built packages are as follows:
{
  "base-outputs_overwrite_base_file-1.0-0.tar.bz2": {
    "recipe": {}
  },
  "first-outputs_overwrite_base_file-1.0-0.tar.bz2": {
    "recipe": {}
  },
  "second-outputs_overwrite_base_file-1.0-0.tar.bz2": {
    "recipe": {}
  }
}


####################################################################################
Resource usage summary:

Total time: 0:01:06.1
CPU usage: sys=0:00:00.0, user=0:00:00.1
Maximum memory usage observed: 9.0M
Total disk usage observed (not including envs): 96B


####################################################################################

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label May 17, 2024
Copy link

codspeed-hq bot commented May 17, 2024

CodSpeed Performance Report

Merging #5344 will not alter performance

Comparing jaimergp:report-rendered (62f841e) with main (cdca0b4)

Summary

✅ 3 untouched benchmarks

@jaimergp jaimergp marked this pull request as ready for review May 18, 2024 08:09
@jaimergp jaimergp requested a review from a team as a code owner May 18, 2024 08:09
@@ -111,7 +111,7 @@ def setup(**kw):
exec(code, ns, ns)
else:
if not permit_undefined_jinja:
raise TypeError(f"{setup_file} is not a file that can be read")
raise TypeError("%s is not a file that can be read" % setup_file) # noqa: UP031
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need this old syntax because this module will be injected in the workdir to be executed by a potentially older Python (e.g. 3.5).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this more like a ValueError or RuntimeError (or FileNotFoundError)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷 I didn't put it there :/

Copy link
Contributor

@dholth dholth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@jaimergp jaimergp merged commit 4561699 into conda:main Jun 7, 2024
28 checks passed
@beeankha beeankha mentioned this pull request Jul 16, 2024
55 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed [bot] added once the contributor has signed the CLA
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Feature request: show rendered run dependencies
5 participants