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

Version 0.8 broken on Github Actions #75

Closed
ailin-nemui opened this issue May 4, 2021 · 10 comments
Closed

Version 0.8 broken on Github Actions #75

ailin-nemui opened this issue May 4, 2021 · 10 comments

Comments

@ailin-nemui
Copy link

fails on github actions:

Run tox
  tox
  shell: /usr/bin/bash -e {0}
.package create: /home/runner/work/user/user/.tox/.package
.package installdeps: setuptools, wheel
ERROR: invocation failed (exit code 1), logfile: /home/runner/work/user/user/.tox/.package/log/.package-4.log
================================== log start ===================================
Traceback (most recent call last):
  File "/usr/share/miniconda/lib/python3.8/site-packages/tox/helper/build_isolated.py", line 32, in <module>
    backend_paths = sys.argv[4].split(os.path.pathsep) if sys.argv[4] else []
IndexError: list index out of range
ERROR conda.cli.main_run:execute(33): Subprocess for 'conda run ['/home/runner/work/user/user/.tox/.package/bin/python', '/usr/share/miniconda/lib/python3.8/site-packages/tox/helper/build_isolated.py', '.tox/dist', 'setuptools.build_meta', '', '']' command failed.  (See above for error)

=================================== log end ====================================
ERROR: FAIL could not package project - v = InvocationError("/home/runner/work/user/user/.tox/.package/bin/python /usr/share/miniconda/lib/python3.8/site-packages/tox/helper/build_isolated.py .tox/dist setuptools.build_meta '' ''", 1)
Error: Process completed with exit code 2.

conda 4.9.2 seems to be installed in github actions

@ailin-nemui
Copy link
Author

for reference the steps from the action.yml

    - uses: actions/checkout@v2
    - name: add conda to path
      run: |
        echo "$CONDA/bin" >> $GITHUB_PATH
    - name: Install tox
      run: |
        conda install -c conda-forge --no-update-deps tox-conda=0.7.1 $(conda -V|tr ' ' '=')
    - name: Test with tox
      run: |
        tox

you can replace 0.7.1 with 0.8.0 to see the problem

@AntoineD
Copy link
Collaborator

AntoineD commented May 4, 2021

Could you provide the log when running tox with -v please?

@ailin-nemui
Copy link
Author

Run tox -v
  tox -v
  shell: /usr/bin/bash -e {0}
using tox.ini: /home/runner/work/user/user/tox.ini (pid 2089)
using tox-3.23.0 from /usr/share/miniconda/lib/python3.8/site-packages/tox/__init__.py (pid 2089)
.package cannot reuse: no previous config /home/runner/work/user/user/.tox/.package/.tox-config1
.package create: /home/runner/work/user/user/.tox/.package
[2097] /home/runner/work/user/user$ /usr/share/miniconda/bin/conda -h >.tox/.package/log/.package-0.log
[2098] /home/runner/work/user/user/.tox$ /usr/share/miniconda/bin/conda env create -p .package --file /home/runner/work/user/user/environment.yml >.package/log/.package-1.log
.package installdeps: setuptools, wheel
[3845] /home/runner/work/user/user$ /home/runner/work/user/user/.tox/.package/bin/python -m pip install setuptools wheel >.tox/.package/log/.package-2.log
write config to /home/runner/work/user/user/.tox/.package/.tox-config1 as 'd00015014a061a6883bf7bb90b93ee2b1bee447d19fb3d6a37571a289c44b3bd /home/runner/work/user/user/.tox/.package/bin/python\n3.23.0 0 0 0\n00000000000000000000000000000000 setuptools\n00000000000000000000000000000000 wheel'
[3862] /home/runner/work/user/user$ /home/runner/work/user/user/.tox/.package/bin/python /usr/share/miniconda/lib/python3.8/site-packages/tox/helper/build_requires.py setuptools.build_meta '' '' >.tox/.package/log/.package-3.log
[3875] /home/runner/work/user/user$ /home/runner/work/user/user/.tox/.package/bin/python /usr/share/miniconda/lib/python3.8/site-packages/tox/helper/build_isolated.py .tox/dist setuptools.build_meta '' '' >.tox/.package/log/.package-4.log
ERROR: invocation failed (exit code 1), logfile: /home/runner/work/user/user/.tox/.package/log/.package-4.log
================================== log start ===================================
Traceback (most recent call last):
  File "/usr/share/miniconda/lib/python3.8/site-packages/tox/helper/build_isolated.py", line 32, in <module>
    backend_paths = sys.argv[4].split(os.path.pathsep) if sys.argv[4] else []
IndexError: list index out of range
ERROR conda.cli.main_run:execute(33): Subprocess for 'conda run ['/home/runner/work/user/user/.tox/.package/bin/python', '/usr/share/miniconda/lib/python3.8/site-packages/tox/helper/build_isolated.py', '.tox/dist', 'setuptools.build_meta', '', '']' command failed.  (See above for error)

=================================== log end ====================================
ERROR: FAIL could not package project - v = InvocationError("/home/runner/work/user/user/.tox/.package/bin/python /usr/share/miniconda/lib/python3.8/site-packages/tox/helper/build_isolated.py .tox/dist setuptools.build_meta '' ''", 1)
Error: Process completed with exit code 2.

@AntoineD
Copy link
Collaborator

AntoineD commented May 4, 2021

Can you share you tox.ini?

@ailin-nemui
Copy link
Author

a part of my tox.ini

[tox]
isolated_build = True
requires = tox-conda
envlist =
    # py37
    py38

[testenv]
conda_env = environment.yml
conda_install_args=
    --override-channels
extras = test
description = test
commands =
    pytest --continue-on-collection-errors {posargs}

@AntoineD
Copy link
Collaborator

AntoineD commented May 4, 2021

It looks like this is related to isolated_build = True.
I will investigate but in the meantime could you try without?

@ailin-nemui
Copy link
Author

Run tox -v
  tox -v
  shell: /usr/bin/bash -e {0}
using tox.ini: /home/runner/work/user/user/tox.ini (pid 2012)
using tox-3.23.0 from /usr/share/miniconda/lib/python3.8/site-packages/tox/__init__.py (pid 2012)
ERROR: pyproject.toml file found.
To use a PEP 517 build-backend you are required to configure tox to use an isolated_build:
https://tox.readthedocs.io/en/latest/example/package.html

Error: Process completed with exit code 1.

@AntoineD
Copy link
Collaborator

AntoineD commented May 5, 2021

That should be fixed when this PR is merged.

@AntoineD
Copy link
Collaborator

AntoineD commented May 5, 2021

@ailin-nemui
A new version of tox with the fix has been released, you may update to the last version of tox.

@ailin-nemui
Copy link
Author

thanks, I can confirm it works with tox 3.23.1

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

No branches or pull requests

2 participants