[tool.cibuildwheel]
manylinux-x86_64-image = "manylinux2014"
skip = "cp27-* cp36-* cp37-* cp38-* pp27-* pp36-* pp37-* pp38-*"

[[tool.cibuildwheel.overrides]]
select = "*manylinux_2_24*"
before-all = """apt-get --assume-yes install wget unzip;
                wget https://sourceforge.net/projects/net-snmp/files/net-snmp/5.9.4/net-snmp-5.9.4.zip/download;
                unzip download;
                cd net-snmp-5.9.4;
                ./configure --with-defaults --disable-mibs --disable-manual --without-perl-modules --disable-embedded-perl;
                make;
                make install;"""

[[tool.cibuildwheel.overrides]]
select = "*musllinux*"
before-all = "apk add net-snmp-dev;"

[tool.cibuildwheel.linux]
before-all = """yum -y install wget;
                wget https://sourceforge.net/projects/net-snmp/files/net-snmp/5.9.4/net-snmp-5.9.4.zip/download ;
                unzip download;
                cd net-snmp-5.9.4;
                ./configure --with-defaults --disable-mibs --disable-manual --without-perl-modules --disable-embedded-perl;
                make ;
                make install ;"""

[tool.cibuildwheel.macos]
before-all = """mkdir -p $HOME/opt/mports;
          cd $HOME/opt/mports;
          wget https://github.com/macports/macports-base/releases/download/v2.10.1/MacPorts-2.10.1.tar.gz;
          tar -xzvf MacPorts-2.10.1.tar.gz;
          cd $HOME/opt/mports/MacPorts-2.10.1;
          ./configure --prefix=$HOME/opt/local --with-install-user=`id -un` --with-install-group=`id -gn`;
          make;
          make install;
          make distclean;
          export PATH=$HOME/opt/local/bin:$HOME/opt/local/sbin:$PATH;
          port selfupdate;
          port clean net-snmp openssl;
          port install net-snmp openssl;"""
repair-wheel-command = "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"

[build-system]
build-backend = "setuptools.build_meta"
requires = [
    "setuptools == 72.1.0",
    "wheel == 0.43.0",
]