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

rattler-build doesn't fail when no license file was found #711

Closed
pavelzw opened this issue Mar 15, 2024 · 4 comments · Fixed by #749
Closed

rattler-build doesn't fail when no license file was found #711

pavelzw opened this issue Mar 15, 2024 · 4 comments · Fixed by #749
Labels
bug Something isn't working

Comments

@pavelzw
Copy link
Collaborator

pavelzw commented Mar 15, 2024

package:
  name: my-name
  version: 0.1.0

about:
  license: MIT
  license_file:
    - LICENSE
❯ rattler-build build -r rb/recipe.yaml
 Target platform: osx-arm64

 ╭─ Finding outputs from recipe
 │ Found 1 variants
 │ Build variant: my-name-0.1.0-h60d57d3_0
 │ ╭─────────────────┬───────────╮
 │ │ Variant         ┆ Version   │
 │ ╞═════════════════╪═══════════╡
 │ │ target_platform ┆ osx-arm64 │
 │ ╰─────────────────┴───────────╯
 │
 ╰─────────────────── (took 0 seconds)

 ╭─ Running build for recipe: my-name-0.1.0-h60d57d3_0
 │
 │ ╭─ Fetching source code
 │ │ No sources to fetch
 │ │
 │ ╰─────────────────── (took 0 seconds)
 │
 │ ╭─ Resolving environments
 │ │
 │ │ Finalized run dependencies: this output has no run dependencies
 │ │
 │ ╰─────────────────── (took 0 seconds)
 │
 │ ╭─ Running build script
 │ │
 │ ╰─────────────────── (took 0 seconds)
 │
 │ ╭─ Packaging new files
 │ │ Copying done!
 │ │ Post-processing done!
 │ │ Writing metadata for package
 │ │ ⚠ warning No include glob matched for copying license files
 │ │ ⚠ warning No license files were copied
 │ │
 │ │ Files in package:
 │ │   - info/about.json
 │ │   - info/hash_input.json
 │ │   - info/index.json
 │ │   - info/paths.json
 │ │   - info/recipe/recipe.yaml
 │ │   - info/recipe/rendered_recipe.yaml
 │ │   - info/recipe/variant_config.yaml
 │ │ Creating target folder "/private/tmp/output/osx-arm64"
 │ │ Compressing archive...
 │ │ Archive written to "/private/tmp/output/osx-arm64/my-name-0.1.0-h60d57d3_0.conda"
 │ │
 │ ╰─────────────────── (took 0 seconds)
 │
 │ ╭─ Running package tests
 │ │ Creating test environment in "/private/tmp/output/bld/rattler-build_my-name_1710498796/work/test"
 │ │ Collecting tests from "/Users/pavel/Library/Caches/rattler/cache/pkgs/my-name-0.1.0-h60d57d3_0"
 │ │
 │ ╰─────────────────── (took 0 seconds)
 │
 ╰─────────────────── (took 0 seconds)

 ╭─ Build summary
 │
 │ ╭─ Build summary for recipe: my-name-0.1.0-h60d57d3_0
 │ │ Artifact: /private/tmp/output/osx-arm64/my-name-0.1.0-h60d57d3_0.conda (1.33 KiB)
 │ │ Variant configuration (hash: h60d57d3_0):
 │ │ ╭─────────────────┬───────────╮
 │ │ │ target_platform ┆ osx-arm64 │
 │ │ ╰─────────────────┴───────────╯
 │ │
 │ │
 │ ╰─────────────────── (took 0 seconds)
 │
 ╰─────────────────── (took 0 seconds)

rattler-build should fail if no license was found imo.

@pavelzw pavelzw added the bug Something isn't working label Mar 15, 2024
@orhun
Copy link
Contributor

orhun commented Mar 27, 2024

rattler-build should fail if no license was found imo.

Sounds good to me.

Thoughts @wolfv?

@pavelzw
Copy link
Collaborator Author

pavelzw commented Mar 27, 2024

(that's also the default behavior for conda-build)

@wolfv
Copy link
Member

wolfv commented Mar 27, 2024

Yes, I think if a license file was specified but not found it should fail.

@orhun
Copy link
Contributor

orhun commented Mar 27, 2024

It turns out license_file can be used as a glob as well. In that case, should we just error out when "No license files were copied" instead of showing a warning?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants