Search code examples
pythonpippip-tools

I keep getting subprocess.CalledProcessError while trying to run pip-compile for pip-tools


This is my code at github

I am trying to test layered requirements for setup.py using pip-tools, and I keep getting issues with this error related to subprocess.CalledProcessError.

I am not sure what I've done wrong. Below is the asciicast:

asciicast

How do I fix this?


Solution

  • Generally, this kind of error is emitted (as far as I saw it several times) when your setup.cfg or setup.py are broken.

    In your case, your extras are not defined properly. You should change your setup.cfg like the following:

    [options]
    python_requires = >=3.8
    setup_requires = setuptools_scm
    packages = find:
    zip_safe = false
    install_requires =
        # direct dependencies
        # pep517 ~= 0.12
        pip-tools ~= 6.5
        pip ~= 21.3
        # indirect dependencies
        # setuptools ~= 60.8  # typically needed when pip-tools invokes setup.py
        # wheel ~= 0.37 # pip plugin needed by pip-tools
    
    [options.extras_require]
        local = pytest