sixty-north / venv-management

A Python package for programmatic creation of Python virtual environments
MIT License
0 stars 1 forks source link

Doesn't find fish config file #4

Open ordovician opened 2 years ago

ordovician commented 2 years ago

The system expects to find ~/.fishrc but fish uses ~/.config/fish/config.fish, and reads prompts and other "global" config stuff from ~/.config/fish/functions files

test_pycharm.py::test_step_into ERROR                                    [100%]
test setup failed
@pytest.fixture(scope="module")
    def venv():
        timestamp = int(time.time() * 100)
>       with virtual_env(f"replay-pytest-{timestamp}", "3.9") as env_path:

conftest.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/contextlib.py:117: in __enter__
    return next(self.gen)
../../../.virtualenvs/replay_python/lib/python3.9/site-packages/venv_management/api.py:151: in virtual_env
    venv_path = ensure_virtual_env(name, expected_version, force=force, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = 'replay-pytest-163593254410', expected_version = '3.9', force = False
kwargs = {}, status = 1
output = "STATUS: 1 ; \nSTDOUT:  ; \nSTDERR: source: Error encountered while sourcing file '/Users/erikengheim/.fishrc':\nsource: No such file or directory\n"

    def ensure_virtual_env(name, expected_version=None, *, force=False, **kwargs):
        """Ensure a virtualenv with the given name and version exists.

        Args:
            name: The name of the environment to check for.

            expected_version: An optional required version as a string. "3.8" will match "3.8.2"

            force: Force replacement of an existing virtual environment which has the wrong version.

            **kwargs: Arguments which will be forwarded to mkvirtualenv if the environment
                needs to be created.

        Returns:
            The path to the virtual environment.

        Raises:
            RuntimeError: If the virtual environment couldn't be created or replaced.
        """
        status, output = check_environment()
        if status != 0:
>           raise RuntimeError(output)
E           RuntimeError: STATUS: 1 ; 
E           STDOUT:  ; 
E           STDERR: source: Error encountered while sourcing file '/Users/erikengheim/.fishrc':
E           source: No such file or directory

../../../.virtualenvs/replay_python/lib/python3.9/site-packages/venv_management/api.py:179: RuntimeError

Assertion failed