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

[FR] Update platformdirs to 4.2.2 #4461

Closed
1 task done
youknowone opened this issue Jul 8, 2024 · 4 comments · Fixed by #4560
Closed
1 task done

[FR] Update platformdirs to 4.2.2 #4461

youknowone opened this issue Jul 8, 2024 · 4 comments · Fixed by #4560
Labels
enhancement Needs Triage Issues that need to be evaluated for severity and status.

Comments

@youknowone
Copy link

youknowone commented Jul 8, 2024

What's the problem this feature will solve?

Current version of setuptools requires ctypes to run on windows.

Describe the solution you'd like

The hard dependency of ctypes came from platformdirs.
Since platformdirs released a new version including the required change, upgrading platformdirs to 4.2.2 will fix the issue.

Alternative Solutions

No response

Additional context

Hi, I am a developer of RustPython, which does not support ctypes yet. This fix will allow RustPython to access most of packages packaged with setuptools on PyPI.

Code of Conduct

  • I agree to follow the PSF Code of Conduct
@youknowone youknowone added enhancement Needs Triage Issues that need to be evaluated for severity and status. labels Jul 8, 2024
@Avasam
Copy link
Contributor

Avasam commented Jul 30, 2024

@youknowone as of 71.0.0

setuptools will prefer installed dependencies if present

I think this offers a path by installing / pre-installing platformdirs>=4.2.2 before setuptools>=71 (although I agree it would be nicer if your users didn't have to).

@youknowone
Copy link
Author

Thank you so much! I didn't think of that since it was vendored.

@Avasam
Copy link
Contributor

Avasam commented Aug 11, 2024

Looks like 4f6d973#diff-6f6b1498bf597f61de49548bf7618ef15201dd95f0cf9fffa36e357dc802353bR15-R16 also updated the vendored version of platformdirs to 4.2.2

So if it's not already installed, it should work fine, and if it's pre-installed, the current requirement of platformdirs >= 2.6.2 should match 4.2.2 when upgrading.

So if pip install setuptools[core] --upgrade doesn't work, running pip install platformdirs>=4.2.2 first ought to work.

@jaraco Do you think it's worth bumping the declared platformdirs dependency for this ? To help platforms lacking ctypes support install setuptools seamlessly ?

@jaraco
Copy link
Member

jaraco commented Aug 12, 2024

Do you think it's worth bumping the declared platformdirs dependency for this ? To help platforms lacking ctypes support install setuptools seamlessly ?

I'd be fine with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 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.

3 participants