Remove outdated pil and pkgresources recipes (#524)
* Remove outdated pil and pkgresources recipes * Removed mention on pip from docs * Added to broken recipes to pass build Co-authored-by: richard <richard@dotmodus>
This commit is contained in:
parent
57e6181912
commit
bbab8b887a
6 changed files with 1 additions and 3101 deletions
|
@ -1,4 +1,4 @@
|
|||
BROKEN_RECIPES = set([])
|
||||
BROKEN_RECIPES = set(['pil', 'pkgresources'])
|
||||
|
||||
# recipes that were already built will be skipped
|
||||
CORE_RECIPES = set(["kivy", "hostpython3", "python3"])
|
||||
|
|
|
@ -80,7 +80,6 @@ You can list the available recipes and their versions with:
|
|||
numpy 1.16.4
|
||||
openssl 1.0.2k
|
||||
photolibrary master
|
||||
pil 2.8.2
|
||||
pillow 6.1.0
|
||||
plyer master
|
||||
pycrypto 2.6.1
|
||||
|
|
|
@ -1,65 +0,0 @@
|
|||
from kivy_ios.toolchain import Recipe, shprint
|
||||
from os.path import join
|
||||
import sh
|
||||
import os
|
||||
import fnmatch
|
||||
|
||||
|
||||
class PillowRecipe(Recipe):
|
||||
version = "2.8.2"
|
||||
url = "https://pypi.python.org/packages/source/P/Pillow/Pillow-{version}.tar.gz"
|
||||
# url = "https://github.com/python-pillow/Pillow/archive/{version}.tar.gz"
|
||||
library = "libpil.a"
|
||||
depends = ["hostpython", "host_setuptools", "pkgresources", "freetype", "libjpeg", "python", "ios"]
|
||||
pbx_libraries = ["libz", "libbz2"]
|
||||
include_per_arch = True
|
||||
|
||||
def get_pil_env(self, arch):
|
||||
build_env = arch.get_env()
|
||||
build_env["IOSROOT"] = self.ctx.root_dir
|
||||
build_env["IOSSDKROOT"] = arch.sysroot
|
||||
build_env["LDSHARED"] = join(self.ctx.root_dir, "tools", "liblink")
|
||||
build_env["ARM_LD"] = build_env["LD"]
|
||||
build_env["ARCH"] = arch.arch
|
||||
build_env["C_INCLUDE_PATH"] = join(arch.sysroot, "usr", "include")
|
||||
build_env["LIBRARY_PATH"] = join(arch.sysroot, "usr", "lib")
|
||||
build_env["CFLAGS"] = " ".join([
|
||||
"-I{}".format(join(self.ctx.dist_dir, "include", arch.arch, "freetype")) +
|
||||
" -I{}".format(join(self.ctx.dist_dir, "include", arch.arch, "libjpeg")) +
|
||||
" -arch {}".format(arch.arch)
|
||||
])
|
||||
return build_env
|
||||
|
||||
def build_arch(self, arch):
|
||||
self.apply_patch('pil_setup.patch')
|
||||
build_env = self.get_pil_env(arch)
|
||||
# build_dir = self.get_build_dir(arch.arch)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
# build_env["PYTHONHOME"] = hostpython
|
||||
# first try to generate .h
|
||||
shprint(hostpython, "setup.py", "build_ext", "-g",
|
||||
_env=build_env)
|
||||
self.biglink()
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
build_dir = self.get_build_dir(arch.arch)
|
||||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = self.get_pil_env(arch)
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python")
|
||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.7', 'site-packages')
|
||||
shprint(hostpython, "-m", "easy_install",
|
||||
"--prefix", dest_dir, "-Z", "./",
|
||||
_env=build_env)
|
||||
|
||||
def biglink(self):
|
||||
dirs = []
|
||||
for root, dirnames, filenames in os.walk(self.build_dir):
|
||||
if fnmatch.filter(filenames, "*.so.libs"):
|
||||
dirs.append(root)
|
||||
cmd = sh.Command(join(self.ctx.root_dir, "tools", "biglink"))
|
||||
shprint(cmd, join(self.build_dir, "libpil.a"), *dirs)
|
||||
|
||||
|
||||
recipe = PillowRecipe()
|
|
@ -1,60 +0,0 @@
|
|||
--- Pillow-2.7.0/setup.py 2014-12-31 20:42:56.000000000 +0530
|
||||
+++ Pillow-2.7.0/setup.py 2015-02-26 19:38:59.000000000 +0530
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
# monkey patch import hook. Even though flake8 says it's not used, it is.
|
||||
# comment this out to disable multi threaded builds.
|
||||
-import mp_compile
|
||||
|
||||
_IMAGING = (
|
||||
"decode", "encode", "map", "display", "outline", "path")
|
||||
@@ -83,7 +82,7 @@
|
||||
return open(file, 'rb').read()
|
||||
|
||||
try:
|
||||
- import _tkinter
|
||||
+ _tkinter = None
|
||||
except (ImportError, OSError):
|
||||
# pypy emits an oserror
|
||||
_tkinter = None
|
||||
@@ -186,7 +185,7 @@
|
||||
for d in os.environ[k].split(os.path.pathsep):
|
||||
_add_directory(library_dirs, d)
|
||||
|
||||
- prefix = sysconfig.get_config_var("prefix")
|
||||
+ prefix = False
|
||||
if prefix:
|
||||
_add_directory(library_dirs, os.path.join(prefix, "lib"))
|
||||
_add_directory(include_dirs, os.path.join(prefix, "include"))
|
||||
@@ -199,7 +198,9 @@
|
||||
_add_directory(library_dirs, os.path.join(
|
||||
"/usr/lib", "python%s" % sys.version[:3], "config"))
|
||||
|
||||
- elif sys.platform == "darwin":
|
||||
+ elif True:
|
||||
+ pass
|
||||
+ if False:
|
||||
# attempt to make sure we pick freetype2 over other versions
|
||||
_add_directory(include_dirs, "/sw/include/freetype2")
|
||||
_add_directory(include_dirs, "/sw/lib/freetype2/include")
|
||||
@@ -346,11 +347,7 @@
|
||||
_add_directory(include_dirs, tcl_dir)
|
||||
|
||||
# standard locations
|
||||
- _add_directory(library_dirs, "/usr/local/lib")
|
||||
- _add_directory(include_dirs, "/usr/local/include")
|
||||
|
||||
- _add_directory(library_dirs, "/usr/lib")
|
||||
- _add_directory(include_dirs, "/usr/include")
|
||||
|
||||
# on Windows, look for the OpenJPEG libraries in the location that
|
||||
# the official installer puts them
|
||||
@@ -575,7 +572,7 @@
|
||||
exts.append(Extension(
|
||||
"PIL._webp", ["_webp.c"], libraries=libs, define_macros=defs))
|
||||
|
||||
- if sys.platform == "darwin":
|
||||
+ if False:
|
||||
# locate Tcl/Tk frameworks
|
||||
frameworks = []
|
||||
framework_roots = [
|
|
@ -1,16 +0,0 @@
|
|||
from kivy_ios.toolchain import Recipe
|
||||
from os.path import join
|
||||
import sh
|
||||
|
||||
|
||||
class pkg_resources(Recipe):
|
||||
depends = ["hostpython", "python"]
|
||||
archs = ["x86_64"]
|
||||
url = ""
|
||||
|
||||
def prebuild_arch(self, arch):
|
||||
sh.cp("pkg_resources.py",
|
||||
join(self.ctx.site_packages_dir, "pkg_resources.py"))
|
||||
|
||||
|
||||
recipe = pkg_resources()
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue