sqlmodel
sqlmodel copied to clipboard
test_select_gen: passthru environment variables
black and jinja2 may only be available via VIRTUAL_ENV or PYTHONPATH
error was:
sqlmodel> =================================== FAILURES ===================================
sqlmodel> _______________________________ test_select_gen ________________________________
sqlmodel>
sqlmodel> @needs_py39
sqlmodel> def test_select_gen() -> None:
sqlmodel> > result = subprocess.run(
sqlmodel> [sys.executable, "scripts/generate_select.py"],
sqlmodel> env={**os.environ, "CHECK_JINJA": "1"},
sqlmodel> check=True,
sqlmodel> cwd=root_path,
sqlmodel> capture_output=True,
sqlmodel> )
sqlmodel>
sqlmodel> tests/test_select_gen.py:12:
sqlmodel> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sqlmodel>
sqlmodel> input = None, capture_output = True, timeout = None, check = True
sqlmodel> popenargs = (['/nix/store/7hnr99nxrd2aw6lghybqdmkckq60j6l9-python3-3.11.9/bin/python3.11', 'scripts/generate_select.py'],)
sqlmodel> kwargs = {'cwd': PosixPath('/build/source'), 'env': {'AR': 'ar', 'AS': 'as', 'CC': 'gcc', 'CHECK_JINJA': '1', ...}, 'stderr': -1, 'stdout': -1}
sqlmodel> process = <Popen: returncode: 1 args: ['/nix/store/7hnr99nxrd2aw6lghybqdmkckq60j6l9-py...>
sqlmodel> stdout = b''
sqlmodel> stderr = b'Traceback (most recent call last):\n File "/build/source/scripts/generate_select.py", line 7, in <module>\n from jinja2 import Template\nModuleNotFoundError: No module named \'jinja2\'\n'
sqlmodel> retcode = 1
sqlmodel>
We apply this PR patch in nixpkgs in https://github.com/NixOS/nixpkgs/pull/317160