#error:

1 messages · Page 1 of 1 (latest)

wraith cape
#

did that message get sent properly?

unreal plume
#

nope

#

But yeah, pip will check if setuptools and wheel are installed locally before deciding to provision an isolated environment for legacy setup.py builds

#

I just confirmed this locally.

wraith cape
#
Collecting yattag==1.15.2 (from -r tasks/requirements_release_tasks.txt (line 2))
  Downloading yattag-1.15.2.tar.gz (28 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  ¦ exit code: 1
  ?-> [1 lines of output]
      ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
[notice] A new release of pip is available: 24.2 -> 25.0.1
[notice] To update, run: pip install --upgrade pip
error: metadata-generation-failed
#

since setuptools isn't installed shouldn't it be creating an isolated environment and installing it?

unreal plume
#

do you have wheel installed?

#

^ just a guess

wraith cape
#

for which package?

unreal plume
#

literally the wheel package

#

pip show wheel

wraith cape
#

perhaps not, would that matter?

#

(this is not running locally so couldn't test what you ask very quickly)

quiet wagon
#

What version of Python is this?

unreal plume
#
    # If we haven't worked out whether to use PEP 517 yet,
    # and the user hasn't explicitly stated a preference,
    # we do so if the project has a pyproject.toml file
    # or if we cannot import setuptools or wheels.

    # We fallback to PEP 517 when without setuptools or without the wheel package,
    # so setuptools can be installed as a default build backend.
    # For more info see:
    # https://discuss.python.org/t/pip-without-setuptools-could-the-experience-be-improved/11810/9
    # https://github.com/pypa/pip/issues/8559
    elif use_pep517 is None:
        use_pep517 = (
            has_pyproject
            or not importlib.util.find_spec("setuptools")
            or not importlib.util.find_spec("wheel")
        )

    # At this point, we know whether we're going to use PEP 517.
    assert use_pep517 is not None

this is the relevant code

wraith cape
#

3.12.6

#

should I run python -m ensurepip before that step?

#

or wait a minute, that wouldn't even give you setuptools/wheel starting on 3.12

quiet wagon
#

Yeah, in 3.12 I think they are no longer available by default

#

I can't reproduce this failure, but on 3.12 without wheel or setuptools it takes the new route:

pip install --dry-run yattag==1.15.2 --no-cache
Collecting yattag==1.15.2
  Downloading yattag-1.15.2.tar.gz (28 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Would install yattag-1.15.2

Any with wheel and setuptools installed it takes the old route:

pip install --dry-run yattag==1.15.2 --no-cache
Collecting yattag==1.15.2
  Downloading yattag-1.15.2.tar.gz (28 kB)
  Preparing metadata (setup.py) ... done
Would install yattag-1.15.2
wraith cape
#

hmm I wonder, are you able to reproduce with 3.12.6 specifically?

unreal plume
#

I'm getting this output which looks wrong?

#

wheel and setuptools are both installed, but somehow it's still crashing?

wraith cape
#

so I guess I need to upgrade Python... going to be an awesome Friday lol

unreal plume
quiet wagon
#

Well, I can't reproduce at all, even with Python 3.12.6 and pip 24.2, I'm going to bed, good luck

unreal plume
#

I have done some shenanigans in this environment in fairness. I'm going to try a new environment.

wraith cape
#

let's discuss back in the main thread so they don't get any more notifications during slumber 🙂