question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Port packaging from deprecated legacy builder to current PEP 517 standards

See original GitHub issue

I was already planning to do this following #262 being merged, as I’ve done for many other packages. However, with setuptools 58.3.0, which we are now getting a formal DeprecationWarning when installing the package (which correctly fails the CIs, due to -W error), and it will soon stop working entirely.

The issue is due to using the old legacy setup.py backend that has been discouraged for a number of years, to the modern pyproject.toml-based setuptools backend that conforms to the PEP 517 standard. Its straightforward to migrate and should no negative/backward compatibly effect on users (other than improving the robustness of building and installing the package), as PEP 517-conformant builds actually allows installing even on machines that don’t have an otherwise compatible installation of setuptools with suitably recent pip, and I’ll still include a backward-compatibly setuptools shim for older ones, so it’ll still work as before for older non-PEP 517 pip/wheel/setuptools. And of course, this is all now fully tested end to end on all platforms and versions in our CIs, following #262 being merged.

So, I’ll migrate the config from the dynamic setup.py to the determistic setup.cfg and simplify it in the process (e.g. no need for bespoke code to get the version, readme, etc, as that is all handled by setuptools at build time), add a setup.py shim for backward compatibility, and add a pyproject.toml with the basic PEP 517 config, all following the standard PyPA recommendations as now being followed by the rest of the ecosystem. I’ll also update the CIs and the docs where applicable.

_Originally posted by @CAM-Gerlach in https://github.com/spyder-ide/qtpy/issues/268#issuecomment-955067333_

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ccordoba12commented, Nov 1, 2021

I’m ok with this too.

0reactions
CAM-Gerlachcommented, Nov 1, 2021

NB, we’ll need to do this in Spyder itself at some point soon for the same reasons, as well as other porting (e.g. removing the uses of the long-deprecated and soon to be removed distutils, so it won’t raise a DeprecationWarning in Python 3.10 and doesn’t break on 3.12, when it will be removed). so this will be good to get familiar with now. I can certainly help with that too, but good to take a much smaller first step doing it with QtPy (and other less complex/critical packages) first.

Read more comments on GitHub >

github_iconTop Results From Across the Web

255722 – [meta] Mk/Uses/python.mk: PEP-517 (pyproject.toml ...
"Minimalistic" will not work here, because a major part of PEP-517 is completely deprecating the setup.py or otherwise distutils path in package management...
Read more >
setuptools/CHANGES.rst at main - GitHub
#3380: Passing some types of parameters via --global-option to setuptools PEP 517/PEP 660 backend is now considered deprecated. The user can pass the...
Read more >
Can;t install lxml package on windwos 11 - Stack Overflow
A possible replacement is to enable the '--use-pep517' option. ... SetuptoolsDeprecationWarning: setup.py install is deprecated.
Read more >
[PATCHES] [core-updates] PEP 517 python-build-system
pyproject.toml is present. One downside is that this tool is not self-contained and has a few. dependencies. Thus first I bootstrap setuptools using...
Read more >
MacPorts Guide
If you wish to create Installer packages with port pkg , you will also need to ... the standard MacPorts binary paths because...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found