From d993f01708487b82e8550fdd1ae3289256b7df8d Mon Sep 17 00:00:00 2001 From: Aleksander Jan Bajkowski Date: Thu, 27 Feb 2025 14:00:55 +0100 Subject: [PATCH] Fix build with setup.py on BSD Building scapy with setup.py has been broken for some time. At least it does not work on FreeBSD. This commit fixes it. Fixes: 669506bd42e4 ("Migrate to pyproject.toml (secdev#3869)") Signed-off-by: Aleksander Jan Bajkowski --- setup.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b1c21b579bb..001ec57bb4d 100755 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ raise OSError("Scapy no longer supports Python 2 ! Please use Scapy 2.5.0") try: - from setuptools import setup + from setuptools import setup, find_packages from setuptools.command.sdist import sdist from setuptools.command.build_py import build_py except: @@ -82,7 +82,16 @@ def build_package_data(self): _build_version(self.build_lib) setup( + name='scapy', + version=__import__('scapy').VERSION, + packages=find_packages(exclude=["test"]), cmdclass={'sdist': SDist, 'build_py': BuildPy}, + # Build starting scripts automatically + entry_points={ + 'console_scripts': [ + 'scapy = scapy.main:interact' + ] + }, data_files=[('share/man/man1', ["doc/scapy.1"])], long_description=get_long_description(), long_description_content_type='text/markdown',