Closed lazka closed 4 months ago
Is there any reason you can't use python ./setup.py --with-XXXX --without-XXX
instead?
This is what we use on every platform: https://github.com/Xpra-org/xpra/tree/master/docs/Build
Including the native MS Windows builds which use MSYS2 as base, so this should work.
I'm not too keen on supporting yet-another build system just yet, the Debian distros still don't work properly with setuptools: 5e4310545164718f68bc06835c7ea0964dd90117
But if all that is needed is to add this patch:
sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)))
Sure, I can add that in.
Is it enough?
Is there any reason you can't use
python ./setup.py --with-XXXX --without-XXX
instead?
Mainly because it is deprecated since 2021 (https://setuptools.pypa.io/en/stable/history.html#id601) and thus distros are slowly moving to the new way. I don't mind setup.py personally, and I doubt it will cease to work in the near future, but having setup.py work the same as "pip install" or "python -m build" is worthwhile imho.
But if all that is needed is to add this patch:
sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)))
Sure, I can add that in. Is it enough?
Sure, I use the same workaround in one of my packages: https://github.com/quodlibet/mutagen/blob/f95d3ae19e25e3f0a91061566551843d799317c5/setup.py#L242
Applied! (and will backport to v6.x)
Mainly because it is deprecated since 2021
I may have missed something, but setuptools
already made it harder to install non-python components in OS specific locations, and the last time I checked, the "new way" of buiding just can't do that any more - at all.
Which means that the all of the files from fs/ would need to be managed separately with the "new way". So forgive me if I am not enthusiastic about yet another packaging tool that feels like a downgrade. / End-of-rant
thanks!
yeah, I feel the pain. I was planing to move my complex setup.py using things to meson eventually (and have two build modes, one for system installs, one for wheels), but it's a lot of work.
Describe the bug
See https://github.com/msys2/MINGW-packages/pull/21223
It seems xpra switched to
setuptools.build_meta
as a build backend in 1f47f7872eb2c3e1f91f96638251cacb10989f13, and previously used the defaultsetuptools.build_meta:__legacy__
build backend (the one used if there is no pyproject.toml file). The main difference is that the new one doesn't add the current directory to sys.path.Possible fixes:
setuptools.build_meta:__legacy__
in pyproject.tomlsys.path.insert(0, os.path.dirname(os.path.realpath(__file__)))
in setup.py before the importTo Reproduce
python -m build --no-isolation
System Information (please complete the following information):
Windows/MSYS2