sdgathman / pymilter

Python bindings for libmilter api
GNU General Public License v2.0
41 stars 21 forks source link

Unable to install #53

Open uberhacker opened 1 year ago

uberhacker commented 1 year ago
$ pip3 install pymilter
Collecting pymilter
  Using cached pymilter-1.0.5.tar.gz (1.0 MB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: pymilter
  Building wheel for pymilter (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/usr/local/tmp/pip-install-a_x3x3fl/pymilter_fbc361fe804f4e638e421f466a547c54/setup.py'"'"'; __file__='"'"'/usr/local/tmp/pip-install-a_x3x3fl/pymilter_fbc361fe804f4e638e421f466a547c54/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /usr/local/tmp/pip-wheel-m3n_jb9f
       cwd: /usr/local/tmp/pip-install-a_x3x3fl/pymilter_fbc361fe804f4e638e421f466a547c54/
  Complete output (32 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-cpython-310
  copying mime.py -> build/lib.linux-x86_64-cpython-310
  creating build/lib.linux-x86_64-cpython-310/Milter
  copying Milter/testctx.py -> build/lib.linux-x86_64-cpython-310/Milter
  copying Milter/config.py -> build/lib.linux-x86_64-cpython-310/Milter
  copying Milter/unsign.py -> build/lib.linux-x86_64-cpython-310/Milter
  copying Milter/plock.py -> build/lib.linux-x86_64-cpython-310/Milter
  copying Milter/dns.py -> build/lib.linux-x86_64-cpython-310/Milter
  copying Milter/greysql.py -> build/lib.linux-x86_64-cpython-310/Milter
  copying Milter/sgmllib.py -> build/lib.linux-x86_64-cpython-310/Milter
  copying Milter/pyip6.py -> build/lib.linux-x86_64-cpython-310/Milter
  copying Milter/policy.py -> build/lib.linux-x86_64-cpython-310/Milter
  copying Milter/test.py -> build/lib.linux-x86_64-cpython-310/Milter
  copying Milter/dsn.py -> build/lib.linux-x86_64-cpython-310/Milter
  copying Milter/dynip.py -> build/lib.linux-x86_64-cpython-310/Milter
  copying Milter/utils.py -> build/lib.linux-x86_64-cpython-310/Milter
  copying Milter/__init__.py -> build/lib.linux-x86_64-cpython-310/Milter
  copying Milter/greylist.py -> build/lib.linux-x86_64-cpython-310/Milter
  copying Milter/cache.py -> build/lib.linux-x86_64-cpython-310/Milter
  running build_ext
  building 'milter' extension
  creating build/temp.linux-x86_64-cpython-310
  x86_64-cros-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -O2 -pipe -ffat-lto-objects -fPIC -fuse-ld=mold -flto -I/usr/local/include/ncursesw -march=x86-64 -march=x86-64 -fPIC -DMAX_ML_REPLY=32 -I/usr/local/include/python3.10 -c miltermodule.c -o build/temp.linux-x86_64-cpython-310/miltermodule.o -Werror=implicit-function-declaration
  miltermodule.c:50:10: fatal error: libmilter/mfapi.h: No such file or directory
     50 | #include <libmilter/mfapi.h>    // libmilter API
        |          ^~~~~~~~~~~~~~~~~~~
  compilation terminated.
  error: command '/usr/local/bin/x86_64-cros-linux-gnu-gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for pymilter

What dependency is missing and shouldn't pip3 resolve anything missing?

kitterma commented 1 year ago

On October 29, 2022 2:53:32 AM UTC, Ed Reel @.***> wrote:

$ pip3 install pymilter
...
 miltermodule.c:50:10: fatal error: libmilter/mfapi.h: No such file or directory
    50 | #include <libmilter/mfapi.h>    // libmilter API
       |          ^~~~~~~~~~~~~~~~~~~
 compilation terminated.
 error: command '/usr/local/bin/x86_64-cros-linux-gnu-gcc' failed with exit code 1
 ----------------------------------------
 ERROR: Failed building wheel for pymilter

What dependency is missing and shouldn't pip3 resolve anything missing?

You're missing the development headers for libmilter (libmilter-dev on Debian and derivatives such as Ubuntu). Pip can't install it because it's a C library header, not Python.

Scott K