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

Allow to exclude test files from conda package #1228

Open
borchero opened this issue Nov 29, 2024 · 2 comments
Open

Allow to exclude test files from conda package #1228

borchero opened this issue Nov 29, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@borchero
Copy link

Currently, whenever a recipe specifies test files, these test files end up in the final conda package. For example,

source:
  path: ../
build:
  number: 0
  noarch: python
package:
  name: test
  version: v1
requirements:
  run:
    - python >=3.9
tests:
  - script: test -f foo.txt
    files:
      source:
        - foo.txt

causes foo.txt to end up in /etc/conda/test-files/test/0 of the final package.

In some cases, it would be desirable to not include these test files into the final package. Would it be possible to introduce a flag to prevent this behavior?


@pavelzw suggested that this might even make sense to do when --no-include-recipe is specified, I personally can't comment on that in detail 😄

@pavelzw pavelzw added the enhancement New feature or request label Nov 29, 2024
@wolfv
Copy link
Member

wolfv commented Nov 29, 2024

Yeah this is how tests currently work. We could also think about creating additional -test packages automagically with a flag.

@borchero
Copy link
Author

Side-note: I also just realized that specifying --no-test still copies these files 🫣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants