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

Custom setuptools version #872

Closed
2 of 5 tasks
davidofwatkins opened this issue May 21, 2024 · 13 comments
Closed
2 of 5 tasks

Custom setuptools version #872

davidofwatkins opened this issue May 21, 2024 · 13 comments
Assignees
Labels
bug Something isn't working

Comments

@davidofwatkins
Copy link

davidofwatkins commented May 21, 2024

Description:
I'm working with a dependency which is incompatible with the v70 release of setuptools for reasons described in pypa/setuptools#3201 (comment). As such, I need to downgrade the version of setuptools used by actions/python, which I can't seem to do.

Action version:
5.1.0

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:

  • Python 3.11.5
  • pip 24.0

Repro steps:

My actions config is pretty simple:

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11.5
  uses: actions/setup-python@v5
  with:
    python-version: 3.11.5
- name: Install Dependencies
  run: |
    python -m pip install setuptools==69.5.1
    python -m pip install django-allauth==0.44.0

Expected behavior:

The install of django-allauth==0.44.0 is successful.

Actual behavior:

I receive the following error message:

Collecting django-allauth==0.44.0
  Downloading django-allauth-0.44.0.tar.gz (572 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 572.5/572.5 kB 15.0 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      Traceback (most recent call last):
        File "/opt/hostedtoolcache/Python/3.11.5/x64/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/opt/hostedtoolcache/Python/3.11.5/x64/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/hostedtoolcache/Python/3.11.5/x64/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-tby66xhk/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-tby66xhk/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-tby66xhk/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 487, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-tby66xhk/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 9, in <module>
      ImportError: cannot import name 'convert_path' from 'setuptools' (/tmp/pip-build-env-tby66xhk/overlay/lib/python3.11/site-packages/setuptools/__init__.py)
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

If I run pip show setuptools, it shows that I have the correct (old) version of it installed:

Name: setuptools
Version: 69.5.1
Summary: Easily download, build, install, upgrade, and uninstall Python packages
Home-page: https://github.com/pypa/setuptools
Author: Python Packaging Authority
Author-email: distutils-sig@python.org
License:
Location: /opt/hostedtoolcache/Python/3.11.5/x64/lib/python3.11/site-packages
Requires:
Required-by:

And if I try to import convert_path removed in v70 of setuptools, it works as expected:

$ python -c 'from setuptools import convert_path; print("success")'
success

But this doesn't seem to work when pip is installing dependencies 🫤

Any advice or suggestions would be very appreciated! 🙏

@davidofwatkins davidofwatkins added bug Something isn't working needs triage labels May 21, 2024
@sdas41395
Copy link

bump

1 similar comment
@WilmaK1
Copy link

WilmaK1 commented May 22, 2024

bump

@aparnajyothi-y
Copy link
Contributor

Hello @davidofwatkins, Thank you for creating this issue and we will look into it :)

@izdnur
Copy link

izdnur commented May 22, 2024

bump

@sdas41395
Copy link

updating to allauth 0.50.0 solved the issue for us

gzurowski added a commit to ResearchHub/researchhub-backend that referenced this issue May 23, 2024
Updating the version of django-allauth due to an error with
Python's setup-tools.

Also see: actions/setup-python#872
@Sharpek
Copy link

Sharpek commented May 24, 2024

updating to allauth 0.50.0 solved the issue for us

I managed to fix this issue without updating allauth. I install wheel and this fix problem with building (pip install allauth from wheel version).

@jerinpetergeorge
Copy link

updating to allauth 0.50.0 solved the issue for us

I managed to fix this issue without updating allauth. I install wheel and this fix problem with building (pip install allauth from wheel version).

How did you install the wheel? Can you give us more insight? @Sharpek

@Sharpek
Copy link

Sharpek commented May 26, 2024

updating to allauth 0.50.0 solved the issue for us

I managed to fix this issue without updating allauth. I install wheel and this fix problem with building (pip install allauth from wheel version).

How did you install the wheel? Can you give us more insight? @Sharpek

Sure. I just type pip install wheel and after that pip install django-allauth==0.45.0 works. As I wrote before, it works because was installed django_allauth-0.45.0-py3-none-any.whl wheel version.

@jerinpetergeorge
Copy link

That did the trick @Sharpek Thanks

@priya-kinthali priya-kinthali self-assigned this Jun 12, 2024
@priya-kinthali
Copy link
Contributor

Hello @davidofwatkins 👋,
It seems the issue may be due to an incompatibility between setuptools v70 and certain dependencies. As recommended by @Sharpek, a feasible solution is to install the 'wheel' package before proceeding with the installation of 'django-allauth'. This seems like a suitable workaround given the current issue with setuptools. To implement it, you would run:

pip install wheel
pip install django-allauth==0.45.0

Could you kindly confirm if this workaround has solved the problem you were encountering? If you're still experiencing difficulties, please do not hesitate to let us know. We're here to help!

@davidofwatkins
Copy link
Author

@priya-kinthali Thanks. I ended up upgrading django-allauth to work around this issue, but it sounds like installing wheel would have worked. It's a good trick to know for next time! Thanks @Sharpek!

@priya-kinthali
Copy link
Contributor

Hello @davidofwatkins 👋
Thanks for your confirmation😊
I'm glad that fixed your problem. I am going to close this issue, since it has been resolved, but feel free to reach us out and open a new one in case of any future problems or questions regarding our action.
Thank you!

@wishwa-50
Copy link

updating to allauth 0.50.0 solved the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants