scapy icon indicating copy to clipboard operation
scapy copied to clipboard

Moved the metadata into `setup.cfg`.

Open KOLANICH opened this issue 3 years ago • 5 comments

Added pyproject.toml

Checklist:

  • [x] If you are new to Scapy: I have checked CONTRIBUTING.md (esp. section submitting-pull-requests)
  • [x] I squashed commits belonging together
  • [x] I added unit tests or explained why they are not relevant - just package building
  • [ ] I executed the regression tests for Python2 and Python3 (using tox or, cd test && ./run_tests_py2, cd test && ./run_tests_py3) - not needed
  • [x] If the PR is still not finished, please create a Draft Pull Request

Moves the metadata into the declarative config according to PEP 621, which is more editable and readable with automatic tools and somewhen in future will allow to forbid setup.py as an unjustified potential security threat.

KOLANICH avatar Jun 27 '22 10:06 KOLANICH

Codecov Report

Merging #3664 (07ae0b5) into master (9473f77) will increase coverage by 0.00%. The diff coverage is n/a.

:exclamation: Current head 07ae0b5 differs from pull request most recent head 71e1633. Consider uploading reports for the commit 71e1633 to get more accurate results

@@           Coverage Diff           @@
##           master    #3664   +/-   ##
=======================================
  Coverage   84.57%   84.57%           
=======================================
  Files         296      296           
  Lines       62214    62267   +53     
=======================================
+ Hits        52616    52663   +47     
- Misses       9598     9604    +6     
Impacted Files Coverage Δ
scapy/__init__.py 74.54% <0.00%> (-1.82%) :arrow_down:
scapy/arch/windows/__init__.py 67.16% <0.00%> (-0.56%) :arrow_down:
scapy/contrib/isotp/isotp_soft_socket.py 82.53% <0.00%> (-0.39%) :arrow_down:
scapy/contrib/automotive/ecu.py 92.00% <0.00%> (-0.34%) :arrow_down:
scapy/packet.py 82.66% <0.00%> (+0.07%) :arrow_up:
scapy/pipetool.py 84.32% <0.00%> (+0.22%) :arrow_up:
scapy/volatile.py 86.05% <0.00%> (+0.78%) :arrow_up:

codecov[bot] avatar Jun 27 '22 10:06 codecov[bot]

Moves the metadata into the declarative config according to PEP 621,

Oops, forgot to add it. But given

(we still support Python 2.7...)

Should I land the second commit converting setup.cfg into pyproject.toml too? It will make the wheel unbuildable on python 2 (the wheel still should be installable and workable, since the code inside supports py2 and the metadata in wheel says it does), but python 2 ... has been officially dropped for several years and BTW there were no real reasons to use python 2 even in 2013. So, I think, if one uses python 2, it should be his personal issue that he cannot build a wheel and has to use workarounds like fetching prebuilt wheels from pypi, unzipping it, replacing the sources and zipping them back. As long as these kind of workarounds work, we can consider python 2 support not dropped.

KOLANICH avatar Jun 27 '22 12:06 KOLANICH

We are currently looking towards releasing Scapy 2.5.0 which should be the last version to support Python 2.7 (at least I'd like so). We'll wait for that before breaking building on 2.7

gpotter2 avatar Jun 27 '22 12:06 gpotter2

OK. In the current state this PR should support 2.7.

KOLANICH avatar Jun 27 '22 15:06 KOLANICH

LGTM

polybassa avatar Jul 11 '22 19:07 polybassa