Skip to content
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

test_select_gen: passthru environment variables #969

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pbsds
Copy link

@pbsds pbsds commented Jun 4, 2024

black and jinja2 may only be available via VIRTUAL_ENV or PYTHONPATH

pbsds and others added 2 commits June 4, 2024 12:19
@pbsds
Copy link
Author

pbsds commented Jun 4, 2024

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 NixOS/nixpkgs#317160

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants