镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

make test fails: No such file or directory: 'test-requirements.txt' #1090

Closed

Description

@ryan-williams

From current HEAD (24f75e7):

make test
Output
docker build --quiet -t gitpython:xenial -f Dockerfile .
sha256:835f1743b4d232b86f68858e6155bea1809d284e8ef7cac8cb52b127bc135130
# NOTE!!!
# NOTE!!! If you are not running from master or have local changes then tests will fail
# NOTE!!!
docker run --rm -v /Users/ryan/c/GitPython:/src -w /src -t gitpython:xenial tox
GLOB sdist-make: /src/setup.py
py34 inst-nodeps: /src/.tox/.tmp/package/1/GitPython-3.1.11.zip
ERROR: invocation failed (exit code 1), logfile: /src/.tox/py34/log/py34-4.log
========================================================================== log start ===========================================================================
DEPRECATION: Python 3.4 support has been deprecated. pip 19.1 will be the last one supporting it. Please upgrade your Python as Python 3.4 won't be maintained after March 2019 (cf PEP 429).
Processing ./.tox/.tmp/package/1/GitPython-3.1.11.zip
    ERROR: Complete output from command python setup.py egg_info:
    ERROR: Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-aseawxsa/setup.py", line 23, in <module>
        with open('test-requirements.txt') as reqs_file:
    FileNotFoundError: [Errno 2] No such file or directory: 'test-requirements.txt'
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-req-build-aseawxsa/

=========================================================================== log end ============================================================================
py35 inst-nodeps: /src/.tox/.tmp/package/1/GitPython-3.1.11.zip
ERROR: invocation failed (exit code 1), logfile: /src/.tox/py35/log/py35-5.log
========================================================================== log start ===========================================================================
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
Processing ./.tox/.tmp/package/1/GitPython-3.1.11.zip
    ERROR: Command errored out with exit status 1:
     command: /src/.tox/py35/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-fysfvxlc/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-fysfvxlc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-1tjj1tec
         cwd: /tmp/pip-req-build-fysfvxlc/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-fysfvxlc/setup.py", line 23, in <module>
        with open('test-requirements.txt') as reqs_file:
    FileNotFoundError: [Errno 2] No such file or directory: 'test-requirements.txt'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

=========================================================================== log end ============================================================================
py36 inst-nodeps: /src/.tox/.tmp/package/1/GitPython-3.1.11.zip
ERROR: invocation failed (exit code 1), logfile: /src/.tox/py36/log/py36-5.log
========================================================================== log start ===========================================================================
Processing ./.tox/.tmp/package/1/GitPython-3.1.11.zip
    ERROR: Command errored out with exit status 1:
     command: /src/.tox/py36/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-x2dsh1bw/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-x2dsh1bw/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-euhv28gy
         cwd: /tmp/pip-req-build-x2dsh1bw/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-x2dsh1bw/setup.py", line 23, in <module>
        with open('test-requirements.txt') as reqs_file:
    FileNotFoundError: [Errno 2] No such file or directory: 'test-requirements.txt'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

=========================================================================== log end ============================================================================
py37 inst-nodeps: /src/.tox/.tmp/package/1/GitPython-3.1.11.zip
ERROR: invocation failed (exit code 1), logfile: /src/.tox/py37/log/py37-5.log
========================================================================== log start ===========================================================================
Processing ./.tox/.tmp/package/1/GitPython-3.1.11.zip
    ERROR: Command errored out with exit status 1:
     command: /src/.tox/py37/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-ip1q3knn/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-ip1q3knn/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-v6snvpqw
         cwd: /tmp/pip-req-build-ip1q3knn/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-ip1q3knn/setup.py", line 23, in <module>
        with open('test-requirements.txt') as reqs_file:
    FileNotFoundError: [Errno 2] No such file or directory: 'test-requirements.txt'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

=========================================================================== log end ============================================================================
py38 create: /src/.tox/py38
ERROR: InterpreterNotFound: python3.8
flake8 inst-nodeps: /src/.tox/.tmp/package/1/GitPython-3.1.11.zip
ERROR: invocation failed (exit code 1), logfile: /src/.tox/flake8/log/flake8-5.log
========================================================================== log start ===========================================================================
Processing ./.tox/.tmp/package/1/GitPython-3.1.11.zip
    ERROR: Command errored out with exit status 1:
     command: /src/.tox/flake8/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-pozqr_7o/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-pozqr_7o/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-i2yvd5ub
         cwd: /tmp/pip-req-build-pozqr_7o/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-pozqr_7o/setup.py", line 23, in <module>
        with open('test-requirements.txt') as reqs_file:
    FileNotFoundError: [Errno 2] No such file or directory: 'test-requirements.txt'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

=========================================================================== log end ============================================================================
___________________________________________________________________________ summary ____________________________________________________________________________
ERROR:   py34: InvocationError for command /src/.tox/py34/bin/python -m pip install --no-deps -U .tox/.tmp/package/1/GitPython-3.1.11.zip (exited with code 1)
ERROR:   py35: InvocationError for command /src/.tox/py35/bin/python -m pip install --no-deps -U .tox/.tmp/package/1/GitPython-3.1.11.zip (exited with code 1)
ERROR:   py36: InvocationError for command /src/.tox/py36/bin/python -m pip install --no-deps -U .tox/.tmp/package/1/GitPython-3.1.11.zip (exited with code 1)
ERROR:   py37: InvocationError for command /src/.tox/py37/bin/python -m pip install --no-deps -U .tox/.tmp/package/1/GitPython-3.1.11.zip (exited with code 1)
ERROR:  py38: InterpreterNotFound: python3.8
ERROR:   flake8: InvocationError for command /src/.tox/flake8/bin/python -m pip install --no-deps -U .tox/.tmp/package/1/GitPython-3.1.11.zip (exited with code 1)
make: *** [test] Error 1

It seems like the docker build / docker run are executing as I'd expect, and test-requirements.txt exists; not sure where the disconnect is that renders tox unable to see it.

Activity

  1. Byron commented on Nov 27, 2020

    @Byron
    Member

    Even though I didn't try to reproduce it as I expect docker to be inherently reproducible, it looks like the way tox tries to run setup.py is the problem as it runs from /tmp/pip-req-build-aseawxsa/setup.py and apparently as a different working dir. Thus trying to open test-requirements.txt fails as the CWD is not /src.

    Since make test is not run on CI or anywhere really, it might have regressed. This is likely as the dockerfile doesn't seem to pin versions, maybe it's even a change/regression in tox itself.

    Judging from the tox.ini file, I would expect this to not be an issue though.

    deps = -r{toxinidir}/requirements.txt
           -r{toxinidir}/test-requirements.txt
  2. wisnij commented on Dec 30, 2020

    @wisnij

    I also get this error when running tox directly from the command line as mentioned in README.md:

    $ git clone git@github.com:gitpython-developers/GitPython.git
    Cloning into 'GitPython'...
    remote: Enumerating objects: 16640, done.
    remote: Total 16640 (delta 0), reused 0 (delta 0), pack-reused 16640
    Receiving objects: 100% (16640/16640), 8.27 MiB | 11.21 MiB/s, done.
    Resolving deltas: 100% (10541/10541), done.
    
    $ cd GitPython/
    
    $ git submodule update --init --recursive
    Submodule 'gitdb' (https://github.com/gitpython-developers/gitdb.git) registered for path 'git/ext/gitdb'
    Cloning into '/Users/james.wisniewski/code/GitPython/git/ext/gitdb'...
    Submodule path 'git/ext/gitdb': checked out '163f2649e5a5f7b8ba03fc1714bf4693b1a015d0'
    Submodule 'smmap' (https://github.com/Byron/smmap.git) registered for path 'git/ext/gitdb/gitdb/ext/smmap'
    Cloning into '/Users/james.wisniewski/code/GitPython/git/ext/gitdb/gitdb/ext/smmap'...
    Submodule path 'git/ext/gitdb/gitdb/ext/smmap': checked out '5e5f940dff80beaa3eedf9342ef502f5e630d5ed'
    
    $ ./init-tests-after-clone.sh
    This operation will destroy locally modified files. Continue ? [N/y]: y
    Already on 'master'
    Your branch is up to date with 'origin/master'.
    HEAD is now at 24f75e7b Added ability to define git environment in submodule add/update methods
    HEAD is now at bfbd5ece change decode type and add replace flag
    HEAD is now at 9541d6bf bump patch level
    HEAD is now at 1e4211b2 docs: fix simple typo, repostory -> repository
    
    $ tox
    GLOB sdist-make: /Users/james.wisniewski/code/GitPython/setup.py
    py34 create: /Users/james.wisniewski/code/GitPython/.tox/py34
    ERROR: InterpreterNotFound: python3.4
    py35 create: /Users/james.wisniewski/code/GitPython/.tox/py35
    ERROR: InterpreterNotFound: python3.5
    py36 create: /Users/james.wisniewski/code/GitPython/.tox/py36
    py36 installdeps: -r/Users/james.wisniewski/code/GitPython/requirements.txt, -r/Users/james.wisniewski/code/GitPython/test-requirements.txt
    py36 inst: /Users/james.wisniewski/code/GitPython/.tox/.tmp/package/1/GitPython-3.1.11.zip
    ERROR: invocation failed (exit code 1), logfile: /Users/james.wisniewski/code/GitPython/.tox/py36/log/py36-2.log
    ======================================================================================================================================================== log start ========================================================================================================================================================
    Processing ./.tox/.tmp/package/1/GitPython-3.1.11.zip
        ERROR: Command errored out with exit status 1:
         command: /Users/james.wisniewski/code/GitPython/.tox/py36/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/k4/29s0h0h15tn29lb_m977fgtw0000gp/T/pip-req-build-1c_a2ids/setup.py'"'"'; __file__='"'"'/private/var/folders/k4/29s0h0h15tn29lb_m977fgtw0000gp/T/pip-req-build-1c_a2ids/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/k4/29s0h0h15tn29lb_m977fgtw0000gp/T/pip-req-build-1c_a2ids/pip-egg-info
             cwd: /private/var/folders/k4/29s0h0h15tn29lb_m977fgtw0000gp/T/pip-req-build-1c_a2ids/
        Complete output (5 lines):
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/private/var/folders/k4/29s0h0h15tn29lb_m977fgtw0000gp/T/pip-req-build-1c_a2ids/setup.py", line 23, in <module>
            with open('test-requirements.txt') as reqs_file:
        FileNotFoundError: [Errno 2] No such file or directory: 'test-requirements.txt'
        ----------------------------------------
    ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    WARNING: You are using pip version 19.3.1; however, version 20.3.3 is available.
    You should consider upgrading via the 'pip install --upgrade pip' command.
    
    ========================================================================================================================================================= log end =========================================================================================================================================================
    py37 create: /Users/james.wisniewski/code/GitPython/.tox/py37
    ERROR: InterpreterNotFound: python3.7
    py38 create: /Users/james.wisniewski/code/GitPython/.tox/py38
    ERROR: InterpreterNotFound: python3.8
    flake8 create: /Users/james.wisniewski/code/GitPython/.tox/flake8
    flake8 installdeps: -r/Users/james.wisniewski/code/GitPython/requirements.txt, -r/Users/james.wisniewski/code/GitPython/test-requirements.txt
    flake8 inst: /Users/james.wisniewski/code/GitPython/.tox/.tmp/package/1/GitPython-3.1.11.zip
    ERROR: invocation failed (exit code 1), logfile: /Users/james.wisniewski/code/GitPython/.tox/flake8/log/flake8-2.log
    ======================================================================================================================================================== log start ========================================================================================================================================================
    Processing ./.tox/.tmp/package/1/GitPython-3.1.11.zip
        ERROR: Command errored out with exit status 1:
         command: /Users/james.wisniewski/code/GitPython/.tox/flake8/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/k4/29s0h0h15tn29lb_m977fgtw0000gp/T/pip-req-build-ekcdp2k8/setup.py'"'"'; __file__='"'"'/private/var/folders/k4/29s0h0h15tn29lb_m977fgtw0000gp/T/pip-req-build-ekcdp2k8/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/k4/29s0h0h15tn29lb_m977fgtw0000gp/T/pip-req-build-ekcdp2k8/pip-egg-info
             cwd: /private/var/folders/k4/29s0h0h15tn29lb_m977fgtw0000gp/T/pip-req-build-ekcdp2k8/
        Complete output (5 lines):
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/private/var/folders/k4/29s0h0h15tn29lb_m977fgtw0000gp/T/pip-req-build-ekcdp2k8/setup.py", line 23, in <module>
            with open('test-requirements.txt') as reqs_file:
        FileNotFoundError: [Errno 2] No such file or directory: 'test-requirements.txt'
        ----------------------------------------
    ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    WARNING: You are using pip version 19.3.1; however, version 20.3.3 is available.
    You should consider upgrading via the 'pip install --upgrade pip' command.
    
    ========================================================================================================================================================= log end =========================================================================================================================================================
    _________________________________________________________________________________________________________________________________________________________ summary _________________________________________________________________________________________________________________________________________________________
    ERROR:  py34: InterpreterNotFound: python3.4
    ERROR:  py35: InterpreterNotFound: python3.5
    ERROR:   py36: InvocationError for command /Users/james.wisniewski/code/GitPython/.tox/py36/bin/python -m pip install --exists-action w .tox/.tmp/package/1/GitPython-3.1.11.zip (exited with code 1)
    ERROR:  py37: InterpreterNotFound: python3.7
    ERROR:  py38: InterpreterNotFound: python3.8
    ERROR:   flake8: InvocationError for command /Users/james.wisniewski/code/GitPython/.tox/flake8/bin/python -m pip install --exists-action w .tox/.tmp/package/1/GitPython-3.1.11.zip (exited with code 1)
    
  3. Yobmod commented on Feb 28, 2021

    @Yobmod
    Contributor

    I get the same error on windows (no Docker) with tox.

    No such file or directory: 'test-requirements.txt'

    Had to run the tests for different environments separately with unittest.

  4. Byron commented on Mar 2, 2021

    @Byron
    Member

    I think make test is not run anywhere on CI anymore and a good example for an issue with by now dead code. It might be best to remove the docker targets (or fix them if there is value).

  5. Byron commented on Jul 16, 2021

    @Byron
    Member

    I am closing this issue as make test along with all docker related files and targets has been removed. It wasn't run/tested anymore on CI and shouldn't mislead people into rightfully assuming that it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions