add sed command for replace setuptools to distutils.core.

This commit is contained in:
Liu Chao 2016-07-30 10:52:11 +08:00
parent fcae0e45bc
commit bbf6896423
5 changed files with 13 additions and 0 deletions

View file

@ -16,6 +16,8 @@ class ClickRecipe(PythonRecipe):
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
cmd = sh.Command("sed")
shprint(cmd, "-i", "", "s/setuptools/distutils.core/g", "./setup.py", _env=build_env)
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = ClickRecipe()

View file

@ -16,6 +16,8 @@ class FlaskRecipe(PythonRecipe):
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
cmd = sh.Command("sed")
shprint(cmd, "-i", "", "s/setuptools/distutils.core/g", "./setup.py", _env=build_env)
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = FlaskRecipe()

View file

@ -16,6 +16,8 @@ class ItsDangerousRecipe(PythonRecipe):
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
cmd = sh.Command("sed")
shprint(cmd, "-i", "", "s/setuptools/distutils.core/g", "./setup.py", _env=build_env)
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = ItsDangerousRecipe()

View file

@ -16,6 +16,8 @@ class Jinja2Recipe(PythonRecipe):
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
cmd = sh.Command("sed")
shprint(cmd, "-i", "", "s/setuptools/distutils.core/g", "./setup.py", _env=build_env)
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = Jinja2Recipe()

View file

@ -16,6 +16,11 @@ class MarkupSafeRecipe(PythonRecipe):
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
cmd = sh.Command("sed")
shprint(cmd, "-i", "", "s/,.*Feature//g", "./setup.py", _env=build_env)
shprint(cmd, "-i", "", "s/setuptools/distutils.core/g", "./setup.py", _env=build_env)
shprint(cmd, "-i", "", "/^speedups = Feature/,/^)$/s/.*//g", "./setup.py", _env=build_env)
shprint(cmd, "-i", "", "s/features\['speedups'\].*=.*speedups/pass/g", "./setup.py", _env=build_env)
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)