Skip to content

Support standard methods of specifying header / library locations #88

Open
@mjpieters

Description

@mjpieters

Currently the setup.py strategy is to look for pcap.h in a fixed set of locations. Please support either LDFLAGS / CFLAGS (or CPPFLAGS) to specify additional locations, and / or use pkg-config to locate the prefix.

For example, running pkg-config --libs-only-L --cflags libpcap on conforming systems gives you the correct -I and -L flags (to then be parsed further) or use pkg-config --variable=includedir libpcap and pkg-config --variable=libdir libpcap to get the include and library paths as two separate strings on stdout.

For LDFLAGS and CFLAGS no further parsing would be required, as setuptools.Extension() supports those natively, provided you don't override those. Perhaps only do the current manual search if a pkg-config search fails and no LDFLAGS / CFLAGS / CPPFLAGS environment variables are set?

This then allows for isolated builds that use a specific, bundled version of libpcap.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions