Best Python code snippet using autotest_python
patch-setup.py
Source:patch-setup.py
...25- def _build_oniguruma(self):26- self._safe_rmtree(onig_install_path)27- self._safe_rmtree(onig_source_path)28-29- self._extract_tarball(onig_tarball_path, dependencies_dir_path)30- self._build_lib(31- lib_dir=onig_source_path,32- commands=[33- ["./configure", "CFLAGS=-fPIC", "--disable-shared", "--prefix", onig_install_path],34- ["make"],35- ["make", "install"],36- ]37- )38-39- def _build_libjq(self):40- self._safe_rmtree(jq_install_path)41- self._safe_rmtree(jq_source_path)42-43- self._extract_tarball(jq_tarball_path, dependencies_dir_path)44- self._build_lib(45- lib_dir=jq_source_path,46- commands=[47- ["autoreconf", "-i"],48- ["./configure", "CFLAGS=-fPIC", "--disable-maintainer-mode",49- "--enable-all-static", "--disable-shared",50- "--with-oniguruma=" + onig_install_path, "--prefix", jq_install_path],51- ["make", "install-libLTLIBRARIES", "install-includeHEADERS"],52- ]53- )54-55- def _build_lib(self, lib_dir, commands):56- macosx_deployment_target = sysconfig.get_config_var("MACOSX_DEPLOYMENT_TARGET")57- if macosx_deployment_target:58- os.environ['MACOSX_DEPLOYMENT_TARGET'] = macosx_deployment_target59-60- for command in commands:61- subprocess.check_call(command, cwd=lib_dir)62-63- def _extract_tarball(self, tarball_path, workdir_path):64- tarfile.open(tarball_path, "r:gz").extractall(workdir_path)65-66- def _safe_rmtree(self, d):67- try:68- shutil.rmtree(d)69- except OSError:70- pass71-72 libraries = ["jq", "onig"]73-if platform.architecture()[1] == 'WindowsPE':74- libraries.append("shlwapi")75 76 pyjq = Extension(77 "_pyjq",...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!