parent
ae0c3489bf
commit
d40e9a9f52
|
@ -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"
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue