moved download to sip tool

This commit is contained in:
isanae
2020-12-03 17:44:52 -05:00
parent 98682a1da3
commit faaeacedb1
3 changed files with 30 additions and 15 deletions
+3 -14
View File
@@ -121,20 +121,9 @@ void sip::download()
}
}
run_tool(process_runner(process()
.binary(python::python_exe())
.chcp(65001)
.stdout_encoding(encodings::utf8)
.stderr_encoding(encodings::utf8)
.arg("-X", "utf8")
.arg("-m", "pip")
.arg("download")
.arg("--no-binary=:all:")
.arg("--no-deps")
.arg("-d", paths::cache())
.arg("sip==" + version())
.env(this_env::get()
.set("PYTHONUTF8", "1"))));
run_tool(pip(pip::download)
.package("sip")
.version(version()));
}
void sip::generate()
+24
View File
@@ -265,6 +265,10 @@ void pip::do_run()
do_install();
break;
case download:
do_download();
break;
default:
cx().bail_out(context::generic, "pip unknown op {}", op_);
}
@@ -343,6 +347,26 @@ void pip::do_install()
execute_and_join();
}
void pip::do_download()
{
set_process(process()
.binary(python::python_exe())
.chcp(65001)
.stdout_encoding(encodings::utf8)
.stderr_encoding(encodings::utf8)
.arg("-X", "utf8")
.arg("-m", "pip")
.arg("download")
.arg("--no-binary=:all:")
.arg("--no-deps")
.arg("-d", paths::cache())
.arg(package_ + "==" + version_)
.env(this_env::get()
.set("PYTHONUTF8", "1")));
execute_and_join();
}
transifex::transifex(ops o) :
basic_process_runner("transifex"), op_(o),
+3 -1
View File
@@ -596,7 +596,8 @@ public:
enum ops
{
ensure = 1,
install
install,
download
};
pip(ops o);
@@ -616,6 +617,7 @@ private:
void do_ensure();
void do_install();
void do_download();
};