mirror of
https://github.com/ModOrganizer2/mob.git
synced 2026-07-27 14:07:05 -07:00
moved download to sip tool
This commit is contained in:
+3
-14
@@ -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()
|
||||
|
||||
@@ -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
@@ -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();
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user