diff --git a/miniupnpc/Makefile b/miniupnpc/Makefile index d1ad870..178fbf5 100644 --- a/miniupnpc/Makefile +++ b/miniupnpc/Makefile @@ -173,18 +173,18 @@ check: validateminixml validateminiwget validateupnpreplyparse \ everything: all $(EXECUTABLES_ADDTESTS) pythonmodule: $(LIBRARY) miniupnpcmodule.c setup.py - python setup.py build + MAKE=$(MAKE) python setup.py build touch $@ installpythonmodule: pythonmodule - python setup.py install + MAKE=$(MAKE) python setup.py install pythonmodule3: $(LIBRARY) miniupnpcmodule.c setup.py - python3 setup.py build + MAKE=$(MAKE) python3 setup.py build touch $@ installpythonmodule3: pythonmodule3 - python3 setup.py install + MAKE=$(MAKE) python3 setup.py install validateminixml: minixmlvalid @echo "minixml validation test" diff --git a/miniupnpc/setup.py b/miniupnpc/setup.py index f100a76..24a676d 100755 --- a/miniupnpc/setup.py +++ b/miniupnpc/setup.py @@ -1,20 +1,23 @@ #! /usr/bin/python # vim: tabstop=8 shiftwidth=8 expandtab # $Id: setup.py,v 1.9 2012/05/23 08:50:10 nanard Exp $ -# the MiniUPnP Project (c) 2007-2014 Thomas Bernard +# the MiniUPnP Project (c) 2007-2017 Thomas Bernard # http://miniupnp.tuxfamily.org/ or http://miniupnp.free.fr/ # # python script to build the miniupnpc module under unix +# +# Uses MAKE environment variable (defaulting to 'make') from setuptools import setup, Extension from setuptools.command import build_ext import subprocess +import os EXT = ['libminiupnpc.a'] class make_then_build_ext(build_ext.build_ext): def run(self): - subprocess.check_call(['make'] + EXT) + subprocess.check_call([os.environ.get('MAKE', 'make')] + EXT) build_ext.build_ext.run(self) setup(name="miniupnpc",