From d74de7f575a9ec49f96138c3c5251f28946c0c0e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 24 Nov 2018 13:44:02 +0100 Subject: Squashed 'waflib/' changes from 6e726eb..5ea8f99 5ea8f99 Improve test output spacing 0e23b29 Raise exception when test suite fails to ensure non-zero exit status d6de073 Show run time of unit tests 5b65554 Add short configure option for ultra-strict flags 4687ba6 Use gtest-like test output 258903d Fix failure count in test group summaries da07e73 Fix verbose tests with Python 3 git-subtree-dir: waflib git-subtree-split: 5ea8f99f6e1246079c1fe6bb590c38a53aadd40d --- waflib/extras/package.py | 76 ------------------------------------------------ 1 file changed, 76 deletions(-) delete mode 100644 waflib/extras/package.py (limited to 'waflib/extras/package.py') diff --git a/waflib/extras/package.py b/waflib/extras/package.py deleted file mode 100644 index c06498e..0000000 --- a/waflib/extras/package.py +++ /dev/null @@ -1,76 +0,0 @@ -#! /usr/bin/env python -# encoding: utf-8 -# Thomas Nagy, 2011 - -""" -Obtain packages, unpack them in a location, and add associated uselib variables -(CFLAGS_pkgname, LIBPATH_pkgname, etc). - -The default is use a Dependencies.txt file in the source directory. - -This is a work in progress. - -Usage: - -def options(opt): - opt.load('package') - -def configure(conf): - conf.load_packages() -""" - -from waflib import Logs -from waflib.Configure import conf - -try: - from urllib import request -except ImportError: - from urllib import urlopen -else: - urlopen = request.urlopen - - -CACHEVAR = 'WAFCACHE_PACKAGE' - -@conf -def get_package_cache_dir(self): - cache = None - if CACHEVAR in conf.environ: - cache = conf.environ[CACHEVAR] - cache = self.root.make_node(cache) - elif self.env[CACHEVAR]: - cache = self.env[CACHEVAR] - cache = self.root.make_node(cache) - else: - cache = self.srcnode.make_node('.wafcache_package') - cache.mkdir() - return cache - -@conf -def download_archive(self, src, dst): - for x in self.env.PACKAGE_REPO: - url = '/'.join((x, src)) - try: - web = urlopen(url) - try: - if web.getcode() != 200: - continue - except AttributeError: - pass - except Exception: - # on python3 urlopen throws an exception - # python 2.3 does not have getcode and throws an exception to fail - continue - else: - tmp = self.root.make_node(dst) - tmp.write(web.read()) - Logs.warn('Downloaded %s from %s', tmp.abspath(), url) - break - else: - self.fatal('Could not get the package %s' % src) - -@conf -def load_packages(self): - self.get_package_cache_dir() - # read the dependencies, get the archives, .. - -- cgit v1.2.1