PyPCAPKit icon indicating copy to clipboard operation
PyPCAPKit copied to clipboard

PyPCAPKit does no longer install correctly

Open jhhcs opened this issue 1 year ago • 1 comments

Description

Installing PyPCAPKit under Python 3.7.0 fails.

System information

A clear and concise description of your system information.

  • OS Version: Windows 10
  • Python Version: 3.7.0
  • Python Implementation: CPython

Full Output

w:\temporary>C:\Python37\python.exe -m venv venv

w:\temporary>.\venv\Scripts\activate.bat

(venv) w:\temporary>python -V
Python 3.7.0

(venv) w:\temporary>python -m pip install -U pip
Requirement already satisfied: pip in .\venv\lib\site-packages (23.1.2)
Collecting pip
  Using cached pip-24.0-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 23.1.2
    Uninstalling pip-23.1.2:
      Successfully uninstalled pip-23.1.2
Successfully installed pip-24.0

(venv) w:\temporary>pip install pypcapkit
Collecting pypcapkit
  Using cached pypcapkit-1.3.1.post18.tar.gz (670 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [21 lines of output]
      Traceback (most recent call last):
        File "<string>", line 17, in <module>
      ModuleNotFoundError: No module named 'setuptools.command.bdist_wheel'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "w:\temporary\venv\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "w:\temporary\venv\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "w:\temporary\venv\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "C:\Users\jhh\AppData\Local\Temp\pip-build-env-43qyb1jk\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "C:\Users\jhh\AppData\Local\Temp\pip-build-env-43qyb1jk\overlay\Lib\site-packages\setuptools\build_meta.py", line 323, in _get_build_requires
          self.run_setup()
        File "C:\Users\jhh\AppData\Local\Temp\pip-build-env-43qyb1jk\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in run_setup
          exec(code, locals())
        File "<string>", line 23, in <module>
      ImportError: setuptools is required to install PyPCAPKit!
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Additional Details

It looks like this import fails under Python 3.7, although I do not know why. A simple fix would be to make those imports lazy and not offering bdist_wheel as an option when the Python version is 3.7 or below.

PS: Notably, the library dictdumper has the same problem and will require the same fix for an install of PyPCAPKit to succeed under Python 3.7.

jhhcs avatar Jul 03 '24 14:07 jhhcs

Just to check; is this project still maintained and did I file the bug report correctly? I am not looking to rush a fix, I just want to know whether there I can reasonably expect that there will ever be one :-).

jhhcs avatar Jul 17 '24 09:07 jhhcs