Drop distutils - cleanup scapy executables #1869
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I know that this PR sounds scary: droping
distutilsis something that we first had chosen not to do. However, since Python 3.7: https://docs.python.org/3/library/distutils.html it's "deprecated" in the way thatDropping distutils for setuptools allow us to perfom a big ammount of cleanup & stabilize our installation process. Note that currently,
scapy.batis broken on Windows. I've glanced at theIPythonrepo, where they have some compatibility patches to handle both distutils and setuptools (which would fixscapy.bat), but its lots of stuff to maintain.This PR drops distutils, and:
.batfiles to follow the same architecture than on *nix: each_py*.batfile calls the main.batfile after setting%PYTHON%PYTHONDONTWRITEBYTECODEcall - we don't really need it and it make scapy's startup slower, when not installed./run_scapyorrun_scapy.batbasicandcompletescapy subversions, which contain the executables. I'll add them to the doc soonscapy.exeis now automatically generated (an equivalent is on linux), making it faster to load on Windows (as it avoids starting a cmd first)VERSIONfile to store the git version, and those could be generated with setuptools anyways