construct==2.9.52 means max Python is v3.11
Best I can tell, because construct is pinned to v2.9.52 (https://github.com/CaliDog/Axeman/commit/1abed7cf539e485795171ea48087aa3914dd4f92), it means this code is only compatible up to Python v3.11.
construct 2.9.52 is trying to import imp which is removed in Python 3.12
Here is trying to install with Python 3.12.3:
$ pip3 install -r requirements.txt
Collecting asyncio (from -r requirements.txt (line 1))
Downloading asyncio-3.4.3-py3-none-any.whl.metadata (1.7 kB)
Collecting uvloop (from -r requirements.txt (line 2))
Downloading uvloop-0.19.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.9 kB)
Collecting aiohttp (from -r requirements.txt (line 3))
Downloading aiohttp-3.9.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (7.5 kB)
Collecting aioprocessing (from -r requirements.txt (line 4))
Downloading aioprocessing-2.0.1-py3-none-any.whl.metadata (7.6 kB)
Collecting PyOpenSSL (from -r requirements.txt (line 5))
Downloading pyOpenSSL-24.1.0-py3-none-any.whl.metadata (12 kB)
Collecting construct==2.9.52 (from -r requirements.txt (line 6))
Downloading construct-2.9.52.tar.gz (57 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.2/57.2 kB 1.8 MB/s eta 0:00:00
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
╰─> [24 lines of output]
Traceback (most recent call last):
File "/home/user/_private_source/Axeman/venv_Axeman/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/home/user/_private_source/Axeman/venv_Axeman/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/_private_source/Axeman/venv_Axeman/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-jrqk9n4c/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 327, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-jrqk9n4c/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 297, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-jrqk9n4c/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 497, in run_setup
super().run_setup(setup_script=setup_script)
File "/tmp/pip-build-env-jrqk9n4c/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 313, in run_setup
exec(code, locals())
File "<string>", line 3, in <module>
File "/tmp/pip-install-yq_9cibk/construct_2bd0a23feeb74e0abfe9b1870e2ad41d/construct/__init__.py", line 22, in <module>
from construct.core import *
File "/tmp/pip-install-yq_9cibk/construct_2bd0a23feeb74e0abfe9b1870e2ad41d/construct/core.py", line 3, in <module>
import struct, io, binascii, itertools, collections, pickle, sys, os, tempfile, hashlib, importlib, imp
ModuleNotFoundError: No module named 'imp'
[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.
The error occurs because the construct==2.9.52 library depends on the outdated imp module, which was removed in Python 3.12.
I have raised https://github.com/CaliDog/Axeman/pull/25 to fix this issue. @Fitblip @smiba please review this MR
I have forked the project and have accommodated the changes in my repo: https://github.com/MohammedAdain/Axeman. Please feel free to use my version of axeman.
pip3 install git+https://github.com/MohammedAdain/Axeman@master