k4yt3x / wg-meshconf

WireGuard full mesh configuration generator.
GNU General Public License v3.0
938 stars 105 forks source link

Replaced setup.py with setup.cfg. #18

Closed KOLANICH closed 3 years ago

KOLANICH commented 3 years ago

Added pyproject.toml. Fetching version from git tags since now.

k4yt3x commented 3 years ago

What are the benefits of this change? I feel like the setup.py works fine.

KOLANICH commented 3 years ago

setup.cfg is a declarative and data. setup.py is code in a Turing-complete language that cannot be reliably parsed without code execution and edited automatically. It is also easier to read for humans.

k4yt3x commented 3 years ago

Hmmm that sounds like a valid point. Let me just look some documentations up before getting back to this.

FelixSchwarz commented 3 years ago

I'd like to support moving parameters into setup.cfg instead of setup.py. However removing setup.py entirely means (IIRC) that you need a quite recent version of setuptools. For example RHEL 8 ships setuptools version 39.2. I'm not 100% sure but I think if you leave a bare-bones setup.py with just the setup() that means also older setuptools version can use the parameters from setup.py.

KOLANICH commented 3 years ago

I'm not 100% sure but I think if you leave a bare-bones setup.py with just the setup() that means also older setuptools version can use the parameters from setup.py.

You are correct. But I see no reason to do that, instead I just install the latest versions of the tools (yes, with sudo :). I wonder which of the solutions the maintainer of this repo prefers.

FelixSchwarz commented 3 years ago

But I see no reason to do that, instead I just install the latest versions of the tools (yes, with sudo :).

Requiring very recent versions makes it much harder to package stuff for distros. Installing packages with sudo inside the system's Python directory manually is very likely to cause a lot of breakage. I'm also one of the certbot maintainers for Fedora and Fedora EPEL (RHEL, CentOS, ...) and about 50% of the bug reports I'm seeing are from users who installed incompatible stuff inside their system Python directory.

Anyway: A distro maintainer can probably also patch the setup.cfg/setup.py if necessary so this might not be a deal breaker but it will make packaging much harder. However I have a pretty strong opinion on sudo pip … :-)

KOLANICH commented 3 years ago

OK, restored setup.py.

k4yt3x commented 3 years ago

What are the final conclusions then, should we switch?