def registered_packages_meta(): """Returns a dictionary with the contents of `meta.yaml` for each registed package """ packages = registered_packages return {name: common.parse_package(PKG_DIR / name / 'meta.yaml') for name in packages}
def test_import(name, selenium_standalone): # check that we can parse the meta.yaml meta = common.parse_package(PKG_DIR / name / 'meta.yaml') if name in UNSUPPORTED_PACKAGES[selenium_standalone.browser]: pytest.xfail('{} fails to load and is not supported on {}.'.format( name, selenium_standalone.browser)) for import_name in meta.get('test', {}).get('imports', []): selenium_standalone.load_package(name) selenium_standalone.run('import %s' % import_name)
def build_package(path, args): pkg = common.parse_package(path) packagedir = pkg['package']['name'] + '-' + pkg['package']['version'] dirpath = path.parent orig_path = Path.cwd() os.chdir(dirpath) try: buildpath = dirpath / 'build' if not buildpath.is_dir(): os.makedirs(buildpath) srcpath = download_and_extract(buildpath, packagedir, pkg, args) patch(path, srcpath, pkg, args) compile(path, srcpath, pkg, args) package_files(buildpath, srcpath, pkg, args) finally: os.chdir(orig_path)
def build_package(path, args): pkg = common.parse_package(path) packagedir = pkg['package']['name'] + '-' + pkg['package']['version'] dirpath = os.path.dirname(path) orig_path = os.getcwd() os.chdir(dirpath) try: buildpath = os.path.join(dirpath, 'build') if not os.path.exists(buildpath): os.makedirs(buildpath) srcpath = download_and_extract(buildpath, packagedir, pkg, args) patch(path, srcpath, pkg, args) compile(path, srcpath, pkg, args) package_files(buildpath, srcpath, pkg, args) finally: os.chdir(orig_path)