When doing a conda build, we have noticed an issue where pluggy 1.4 searches all home directories for init.py. Reverting to Pluggy 1.3 fixes the issue.
Here's the stack trace:
$PREFIX/lib/python3.12/site-packages/pluggy/_hooks.py:501: in __call__
return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
$PREFIX/lib/python3.12/site-packages/pluggy/_manager.py:119: in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
$PREFIX/lib/python3.12/site-packages/_pytest/python.py:210: in pytest_collect_directory
if pkginit.is_file():
$PREFIX/lib/python3.12/pathlib.py:892: in is_file
return S_ISREG(self.stat().st_mode)
$PREFIX/lib/python3.12/pathlib.py:840: in stat
return os.stat(self, follow_symlinks=follow_symlinks)
E PermissionError: [Errno 13] Permission denied: '${path_to_homedir_of_user}/__init__.py'
The project being tested is a pretty straight forward use of pytest:
requirements:
host:
- python>=3.8.8
run:
- python>=3.8.8
- pyyaml
- jsonschema
test:
imports:
- ${project_name}
commands:
- pytest --pyargs ${project_name}
- source ${project_name}
requires:
# Pluggy 1.4 attempts to search all home dirs for __init__.py
- pluggy <1.4
- pytest
When doing a conda build, we have noticed an issue where pluggy 1.4 searches all home directories for init.py. Reverting to Pluggy 1.3 fixes the issue.
Here's the stack trace:
The project being tested is a pretty straight forward use of pytest: