setup.py에서 setup()
메서드를 호출하기 전에 wget이 있는지 확인하고, wget이 존재하지 않으면 wget이 소프트웨어에 종속되어 있다는 메시지와 함께 종료 할 수 있습니다. 당신은 당신이 wget을 없이 노력하고 무엇이든 달성하고 urlretrieve 방법 URLLIB을 통해 그것을 얻을, 그것은 크로스 플랫폼 솔루션이 될 것입니다 수있는 경우
if __name__ == '__main__':
# Check for wget
if sys.platform == 'linux2' and not ((os.path.exists('/usr/bin/wget') or os.path.exists('/usr/local/bin/wget')):
sys.exit("You need wget binary for this software to work")
# setup code
setup(name='yoursoftware',
version='42',
data_files = [ # All your setup details
(script_install_location, ['somescript.py']),
)
다른 포스터는 설명한다.