I'm using conda-build to build a conda package from python source code, and I'm getting the following error whenever I add something to the "run" or "host" subsections of the "requirements" section in meta.yaml:
Tests failed for my_package-0.1.0-0.tar.bz2 - moving package to /home/ec2-user/anaconda3/conda-bld/broken
Removing the "run" and "host" subsections makes the test run fine - the built tar.bz2 file is installed without issue, and the import succeeds. Adding a "build" subsection works fine. Running with the --debug flag didn't add any useful information. How can I debug this??
this is my meta.yaml:
package:
name: my_package
version: 0.1.0
source:
path: ..
build:
script: "python setup.py install --single-version-externally-managed --record=record.txt --verbose"
requirements:
# removing this subsection makes everything work
run:
- python
this is my run_test.sh (using a run_test.py instead produces same result):
echo 'test is running' > /tmp/test_ran.txt
python -c "import my_package; print('Success!')" >> /tmp/test_ran.txt
this is my setup.py:
from setuptools import find_packages, setup
setup(
name='my_package',
version='0.1.0',
packages=find_packages()
)
The meta.yaml and run_test.sh scripts are in a conda.recipe
subfolder under the project root.
For some reason, the test script isn't even being run (the file /tmp/test_ran.txt is not created)! As mentioned above, removing the "run" subsection makes the test run just fine, including the import.
Thanks in advance. Can anyone please help? Going nuts over this...