Changeset 79
- Timestamp:
- 07/04/06 15:54:59 (2 years ago)
- Files:
-
- branches/mk/cheesecake/cheesecake_index.py (modified) (7 diffs)
- branches/mk/tests/data/static.tar.gz (added)
- branches/mk/tests/functional/test_static.py (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/mk/cheesecake/cheesecake_index.py
r78 r79 819 819 820 820 def __init__(self, name="", url="", path="", sandbox=None, config=None, 821 logfile=None, verbose=False, quiet=False ):821 logfile=None, verbose=False, quiet=False, static_only=False): 822 822 """Initialize critical variables, download and unpack package, 823 823 walk package tree. … … 837 837 self.verbose = verbose 838 838 self.quiet = quiet 839 self.static_only = static_only 839 840 840 841 self.package_types = { … … 874 875 875 876 # Install package. 876 self.install_pkg() 877 if self.static_only: 878 self.index["INSTALLABILITY"].remove_subindex('install') 879 else: 880 self.install_pkg() 877 881 878 882 # When checking an egg exclude irrelevant indices. … … 1273 1277 """ 1274 1278 parser = OptionParser() 1275 parser.add_option("-n", "--name", dest="name",1276 default="", help="package name (will be retrieved via setuptools utilities, if present)")1277 parser.add_option("-u", "--url", dest="url",1278 default="", help="package URL")1279 parser.add_option("-p", "--path", dest="path",1280 default="", help="path of tar.gz/zip package on local file system")1281 parser.add_option("-s", "--sandbox", dest="sandbox",1282 default=None,1283 help="directory where package will be unpacked "\1284 "(default is to use random directory inside %s)" % tempfile.gettempdir())1285 1279 parser.add_option("-c", "--config", dest="config", 1286 1280 default=None, … … 1289 1283 default=None, 1290 1284 help="file to log all cheesecake messages") 1285 parser.add_option("-n", "--name", dest="name", 1286 default="", help="package name (will be retrieved via setuptools utilities, if present)") 1287 parser.add_option("-p", "--path", dest="path", 1288 default="", help="path of tar.gz/zip package on local file system") 1289 parser.add_option("-q", "--quiet", action="store_true", dest="quiet", 1290 default=False, help="only print Cheesecake index value (default=False)") 1291 parser.add_option("-s", "--sandbox", dest="sandbox", 1292 default=None, 1293 help="directory where package will be unpacked "\ 1294 "(default is to use random directory inside %s)" % tempfile.gettempdir()) 1295 parser.add_option("-t", "--static", action="store_true", dest="static", 1296 default=False, help="don't run any code from the package being tested (default=False)") 1297 parser.add_option("-u", "--url", dest="url", 1298 default="", help="package URL") 1291 1299 parser.add_option("-v", "--verbose", action="store_true", dest="verbose", 1292 1300 default=False, help="verbose output (default=False)") 1293 parser.add_option("-q", "--quiet", action="store_true", dest="quiet",1294 default=False, help="only print Cheesecake index value (default=False)")1295 1301 1296 1302 (options, args) = parser.parse_args() … … 1309 1315 verbose = options.verbose 1310 1316 quiet = options.quiet 1317 static_only = options.static 1311 1318 1312 1319 if not name and not url and not path: … … 1317 1324 c = Cheesecake(name=name, url=url, path=path, sandbox=sandbox, 1318 1325 config=config, logfile=logfile, verbose=verbose, 1319 quiet=quiet )1326 quiet=quiet, static_only=static_only) 1320 1327 c.compute_cheesecake_index() 1321 1328 c.cleanup()
