hostpython3: enforce zlib compilation

This commit is contained in:
Mathieu Virbel 2018-11-01 20:40:01 +01:00
parent 3c77617141
commit 7ed286efa8
2 changed files with 16 additions and 15 deletions
recipes/hostpython3

View file

@ -0,0 +1 @@
zlib zlibmodule.c -I$(prefix)/include -lz

View file

@ -22,11 +22,11 @@ class Hostpython3Recipe(Recipe):
def prebuild_arch(self, arch): def prebuild_arch(self, arch):
if self.has_marker("patched"): if self.has_marker("patched"):
return return
# self.copy_file("_scproxy.py", "Lib/_scproxy.py") self.copy_file("ModulesSetup", "Modules/Setup.local")
# self.apply_patch("ssize-t-max.patch") # self.apply_patch("ssize-t-max.patch")
# self.apply_patch("dynload.patch") # self.apply_patch("dynload.patch")
# self.apply_patch("static-_sqlite3.patch") # self.apply_patch("static-_sqlite3.patch")
shutil.copy("Modules/Setup.dist", "Modules/Setup") # shutil.copy("Modules/Setup.dist", "Modules/Setup")
# if "openssl.build_all" in self.ctx.state: # if "openssl.build_all" in self.ctx.state:
# self.append_file("ModulesSetup.openssl", "Modules/Setup.local") # self.append_file("ModulesSetup.openssl", "Modules/Setup.local")
self.set_marker("patched") self.set_marker("patched")
@ -99,21 +99,21 @@ class Hostpython3Recipe(Recipe):
# join(build_dir, "Python")) # join(build_dir, "Python"))
shprint(sh.make, self.ctx.concurrent_make, shprint(sh.make, self.ctx.concurrent_make,
"-C", build_dir, "-C", build_dir,
"bininstall", "inclinstall", "install",
_env=build_env) _env=build_env)
pylib_dir = join(self.ctx.dist_dir, "hostpython3", "lib", "python3.7") # pylib_dir = join(self.ctx.dist_dir, "hostpython3", "lib", "python3.7")
if exists(pylib_dir): # if exists(pylib_dir):
shutil.rmtree(pylib_dir) # shutil.rmtree(pylib_dir)
shutil.copytree( # shutil.copytree(
join(build_dir, "Lib"), # join(build_dir, "Lib"),
pylib_dir) # pylib_dir)
ensure_dir(join(pylib_dir, "config")) # ensure_dir(join(pylib_dir, "config"))
shutil.copy(
join(build_dir, "Makefile"),
join(pylib_dir, "config", "Makefile"))
# shutil.copy( # shutil.copy(
# join(build_dir, "Parser", "pgen"), # join(build_dir, "Makefile"),
# join(self.ctx.dist_dir, "hostpython3", "bin", "pgen")) # join(pylib_dir, "config", "Makefile"))
shutil.copy(
join(self.ctx.dist_dir, "hostpython3", "bin", "python3"),
join(self.ctx.dist_dir, "hostpython3", "bin", "python"))
recipe = Hostpython3Recipe() recipe = Hostpython3Recipe()