|
|
|
|
|
by wrmsr
1952 days ago
|
|
If you're building anything past a hello world c ext you're already off the path of shit like poetry, in which case AIUI we're basically on our own as we've always been lol, for better and worse. Again I don't think setup.py is going away. Given that distsetuputiltools is a jenga tower of decades old monkeypatches documentation is understandably sparse, but they're at least passively open about how gross it is to work within. Subclassing or otherwise manually overriding the behavior of distutils classes like build_* is just how stuff is done at this level and I don't expect that to change, beyond just updating your stuff to subclass or hook direct setuptools equivs of existing distutils classes. distutils is already vendored by setuptools anyway, so you're already not really hitting 'distutils' as much as 'setuptools._distutils' aliased to distutils upon importing setuptools (and specifically importing it first ( https://github.com/pypa/setuptools/blob/c121d289da5d19cf6df2... )), so all this really does is collapse a level of hack. As long as py2 remains supported I expect whatever changes happen here to be py2 compat, but I do expect new setuptools to break compat with old setup.py's. But setup.py being what it is it wouldn't be out of character to make your setup.py manually support both old pre-distutils-removal setuptools and new post-distutils-removal setuptools, but that's just how setup.py maintenance goes lol. ed: ok well not so much py2 being 'supported' as 'no showstopping incompatibilities for anyone still straddling that ever widening gap' :) |
|
To reuse a phrase from the native-Spanish-speaking Americans of the Southwest, whose family moved there in the 1700s or earlier, "I didn't cross the border, the border crossed me."
In the late 1990s, when I started with Python, writing Python C extensions was definitely not off the beaten path. I remember reading the design discussion, and I think I contributed some input too. I probably knew the original developers from going to Python conferences.
I know that at 20+ years old it's also long in the tooth. There's certainly features I would like that just aren't going to happen with it, like being able to emit a Makefile that I can use during development for incremental rebuilds, instead of taking 10 seconds to compile.
And distutils isn't going away for another couple of years, so I can plan time to migrate.
But I don't have an inkling of what that migration path might be, and can find no mention that the current set of developers are even aware of this issue. (Not that I've looked for more than a few hours.)
BTW, is "setup.cfg" dead and forgotten now?