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

[BUG] setup.cfg + pyproject.toml + setup.py (with PBR) breaking. #3500

Closed
synchronizing opened this issue Aug 11, 2022 · 10 comments · Fixed by #3503
Closed

[BUG] setup.cfg + pyproject.toml + setup.py (with PBR) breaking. #3500

synchronizing opened this issue Aug 11, 2022 · 10 comments · Fixed by #3503
Labels
bug Needs Triage Issues that need to be evaluated for severity and status.

Comments

@synchronizing
Copy link

setuptools version

setuptools==64.0.0

Python version

Python 3.8.5

OS

macOS

Additional environment information

No response

Description

Reported originally in #3498. Unsure what is going on, but after the latest setuptools the following is thrown when using editable installs:

      distutils.errors.DistutilsSetupError: Error: setup script specifies an absolute path:
      
          /var/folders/r7/ggtlz3qs465bzrr2zjtf1h380000gp/T/tmpbr2b9x3w.build-temp/test.egg-info/SOURCES.txt
      
      setup() arguments must *always* be /-separated paths relative to the
      setup.py directory, *never* absolute paths.
      
      error: Support for editable installs via PEP 660 was recently introduced
      in `setuptools`. If you are seeing this error, please report to:
      
      https://github.com/pypa/setuptools/issues
      
      Meanwhile you can try the legacy behavior by setting an
      environment variable and trying to install again:
      
      SETUPTOOLS_ENABLE_FEATURES="legacy-editable"
      [end of output]

Expected behavior

No error should be thrown, and the package should be installed.

How to Reproduce

Here is a reproducible repo: https://github.com/synchronizing/setuptools-error

Running pip install -e . inside the folder will cause the error seen above. A few points:

  • SETUPTOOLS_ENABLE_FEATURES flag fixes the issue.
  • Installing it without being editable (pip install .) fixes the issue.
  • Removing pyproject.toml fixes the issue.
  • Removing pbr fixes the issue.
  • Removing the other folder fixes the issue.

Output

See above.

@abravalheri
Copy link
Contributor

Thank you very much for reporting this and for the reproducer.

I will investigate the issue and try to get back to you as soon as I can.

@synchronizing
Copy link
Author

synchronizing commented Aug 11, 2022

An interesting find. On the repo linked above, I added the following Dockerfile:

FROM python:3.8

RUN pip install --upgrade setuptools

WORKDIR /opt/
COPY . test
WORKDIR /opt/test
RUN pip install -e .

CMD ["/bin/bash"]

The above errors out with the same issue noted. Here are different version results:

Works:

  • 3.8.0
  • 3.8.1
  • 3.8.5
  • 3.8.10
  • 3.8.11
  • 3.8.12
  • 3.9.0
  • 3.9.1
  • 3.9.4
  • 3.9.5
  • 3.9.9
  • 3.9.10

Does not work:

  • 3.8 (= 3.8.13)
  • 3.9 (= 3.9.13)
  • 3.9.12
  • 3.9.11

Edit: See more below. This test doesn't seem solid enough.

@synchronizing
Copy link
Author

I added Dockerfile and docker-compose.yml to the repo linked. Doing docker-compose up should result in the issue noted.

@abravalheri
Copy link
Contributor

I also can reproduce the error in my machine with Python 3.8.10

@synchronizing
Copy link
Author

3.8.10 seems to be working with the Dockerfile above, weirdly enough.

@synchronizing
Copy link
Author

synchronizing commented Aug 11, 2022

It's dependent on the release, and which Python base image is getting pulled based on the tag. Using Github Actions with the matrix functionality fails on all versions: https://github.com/synchronizing/setuptools-error/actions/runs/2841720491

Super weird, but at least its more reassuring this is happening in every version.

@abravalheri
Copy link
Contributor

Thank you very much for helping to investigate that. I really appreciate all the effort.

@synchronizing
Copy link
Author

Of course. Version 3.6.x works due to it being tied to setuptools 59.6.0.
See: https://github.com/synchronizing/setuptools-error/actions/runs/2841783973

@abravalheri
Copy link
Contributor

Felipe, please let me know if v64.0.1 works for you, otherwise we can re-open this issue.

@synchronizing
Copy link
Author

Yup, fixed! Thank you. https://github.com/synchronizing/setuptools-error/actions/runs/2843387978

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Needs Triage Issues that need to be evaluated for severity and status.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants