Closed standby24x7 closed 2 years ago
I understand what I need to do.
If I build netfilterqueue from the source with python 3.9,
I need to remove netfilterqueue.c at first and then
Then new netfilterqueue.c is created and it was build succesfully.
Example
python: can't open file '/home/iida/Repo/python-netfilterqueue/./print_and_accept.py': [Errno 2] No such file or directory [root@masabert python-netfilterqueue]# python ./setup.py install running install running build running build_ext skipping 'netfilterqueue.c' Cython extension (up-to-date) running install_lib running install_egg_info Removing /usr/local/lib64/python3.9/site-packages/NetfilterQueue-0.8.1-py3.9.egg-info Writing /usr/local/lib64/python3.9/site-packages/NetfilterQueue-0.8.1-py3.9.egg-info #
Cython 0.29.23
I did not design netfilterque, but I did some research on Stackoverflow which suggests netfilterqueue can work with py3.6. I have not thoroughly tested it out, but when I ran my code with py3.6 my terminal stopped throwing errors which suggests it works. https://stackoverflow.com/search?q=netfilterqueue+python+3.6&s=42da880d-657a-44ed-b435-792c28d463c0
The installation instructions are.
This is fixed on master and will be released to PyPI shortly. Note the Git repository address is now https://github.com/oremanj/python-netfilterqueue
.
OS: Fedora 33 python3-3.9.4-1.fc33.x86_64 libnetfilter_queue-devel-1.0.2-16.fc33.x86_64 libnetfilter_queue-1.0.2-16.fc33.x86_64
libnfnetlink-devel-1.0.1-18.fc33.x86_64
python-netfilterqueue version commit ec2ae290667b2d3f09d5ec1278d899db2f08c52f (HEAD -> master, origin/master, origin/HEAD)
Problem Description I failed to compile python-netfilterqueue on Fedora 33.
How reproducible Always
Step to reproduce (1) From source
python setup.py install
(2) From pip
pip install python-netfilterqueue --user
~~~~^~~~ netfilterqueue.c: In function ‘__pyx_pf_14netfilterqueue_6Packet_4get_hw’: netfilterqueue.c:2533:17: warning: implicit declaration of function ‘PyString_FromStringAndSize’; did you mean ‘PyBytes_FromStringAndSize’? [-Wimplicit-function-declaration] 2533~~~~~Expected result The source is compiled and installed succesfully.
Additional information The code can be compiled on Fedora 31, which uses python3-3.7.9
Starting from python-3.9, tp_print was removed.
https://docs.python.org/3/whatsnew/3.9.html Removed The tp_print slot of PyTypeObject has been removed. It was used for printing objects to files in Python 2.7 and before. Since Python 3.0, it has been ignored and unused. (Contributed by Jeroen Demeyer in bpo-36974.)