-
Notifications
You must be signed in to change notification settings - Fork 45
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
Introduce python_version
in tests[0].python
#1170
base: main
Are you sure you want to change the base?
Conversation
Here is the kind of recipe that now works: package:
name: test-with-custom-deps
version: 0.0.1
build:
number: 0
noarch: python
script: touch $PREFIX/test-with-custom-deps
requirements:
run:
- python
tests:
- python:
imports:
- pandas
pip_check: true
requirements:
run:
- pandas |
Recipe format PR at prefix-dev/recipe-format#43 |
@wolfv what do you think about this approach? |
Excellent PR, really awesome! Hmm I am a bit conflicted about this. The python check is pretty simplistic anyways and one can also relatively easy make better tests using the script tests. One can even write Python scripts directly in the scripts test, e.g.
Although it's clearly a bit more verbose. Instead of the total flexibility of requirements we could also add a python version field to the python test as another idea:
So in general I am a bit on the fence. |
Yes, I understand your point here.
This is an alternative solution I also proposed at #1168. I think that one is better since it's specific to python and, as you said, for a more complex scenarios, the user already has other options. So would you be okay if I give it a try to |
python_version
in tests[0].python
@wolfv I gave it a try to No stress if you still don't want that feature. Just let me know. |
It's a proposal to fix #1168
Please let me know if you would prefer another approach.