Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work In Progress: Du Toit's Pillow Port to HPy #1

Open
wants to merge 29 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
f6bdc0c
Convert Imaging_Type to a heap type - from cklein
DuToitSpies Jun 23, 2022
2340cfa
Use HPy to define Imaging Type - from cklein
DuToitSpies Jun 26, 2022
b56fe62
Converted first two methods to HPy - from cklein
DuToitSpies Jul 3, 2022
e559757
Changed Gaussian Blur to HPy
DuToitSpies Jul 11, 2022
aaf232c
Fixed issue with Gaussian Blur
DuToitSpies Jul 14, 2022
ae8b1ce
Converted some more Image methods and factories to HPy
DuToitSpies Jul 20, 2022
0169155
Fixed factory naming and ported function with tuple argument
DuToitSpies Jul 29, 2022
eb2a51b
Converted two special effect factories to HPy
DuToitSpies Aug 1, 2022
03ec410
Converted effect_noise, resize, and reduce from Image to HPy
DuToitSpies Aug 2, 2022
9bab610
Converted filter and entropy from Image to HPy
DuToitSpies Aug 2, 2022
236a40a
Converted paste, quantize, putpixel, getbbox, and split from Image to…
DuToitSpies Aug 3, 2022
259f541
Ported getextrema from Image to HPy
DuToitSpies Aug 3, 2022
919b9fc
Set imagingmorph up for conversion to HPy
DuToitSpies Aug 7, 2022
f3a4d74
Converted ImageMorph to HPy
DuToitSpies Aug 8, 2022
5ed1e0e
Added back accidentally removed comment
DuToitSpies Aug 8, 2022
453e0ab
Fixed ABI changes made for testing
DuToitSpies Aug 10, 2022
f37ea79
Ported methods for getting a pixel and undid tuple changes for Graal …
DuToitSpies Aug 10, 2022
fd3d565
Removed Python.h from ImagingMorph
DuToitSpies Aug 12, 2022
6216cd7
Added new C API-free struct and made several methods C API-independent
DuToitSpies Aug 16, 2022
0f9ab62
Set up ImageDraw for porting
DuToitSpies Aug 16, 2022
49e06ed
Removed h_ImagingObject, using legacy ImagingObject instead
DuToitSpies Aug 17, 2022
c775367
Fixed faulty HPy_BuildValue
DuToitSpies Aug 17, 2022
3c56699
Ported getter and destructor slots to HPy (ignore previous commit)
DuToitSpies Aug 22, 2022
985322d
Removed ImageDraw changes - gave slot errors on Graal
DuToitSpies Aug 22, 2022
71bbfd4
Made some functions work on PyPy and GraalPython
DuToitSpies Aug 29, 2022
d9091e9
Made some more functions PyPy and GraalPython-compliant
DuToitSpies Aug 29, 2022
02e0146
Made more functions work with Graal
DuToitSpies Sep 7, 2022
f8e08f7
Ported final function to Hpy
DuToitSpies Sep 8, 2022
e2dd2ba
Test Push
DuToitSpies Mar 2, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def get_version():
)


HPY_ABI = 'hybrid' #if sys.implementation.name == 'cpython' else 'universal'
_IMAGING = ("decode", "encode", "map", "display", "outline", "path")

_LIB_IMAGING = (
Expand Down Expand Up @@ -982,24 +983,28 @@ def debug_build():
for src_file in _LIB_IMAGING:
files.append(os.path.join("src/libImaging", src_file + ".c"))
ext_modules = [
Extension("PIL._imaging", files),
#Extension("PIL._imaging", files),
Extension("PIL._imagingft", ["src/_imagingft.c"]),
Extension("PIL._imagingcms", ["src/_imagingcms.c"]),
Extension("PIL._webp", ["src/_webp.c"]),
Extension("PIL._imagingtk", ["src/_imagingtk.c", "src/Tk/tkImaging.c"]),
Extension("PIL._imagingmath", ["src/_imagingmath.c"]),
Extension("PIL._imagingmorph", ["src/_imagingmorph.c"]),
#Extension("PIL._imagingmorph", ["src/_imagingmorph.c"]),
]

try:
setup(
version=PILLOW_VERSION,
cmdclass={"build_ext": pil_build_ext},
hpy_ext_modules=[Extension("PIL._imaging", files),
Extension("PIL._imagingmorph", ["src/_imagingmorph.c"]),],
ext_modules=ext_modules,
include_package_data=True,
#include_package_data=True,
packages=["PIL"],
package_dir={"": "src"},
zip_safe=not (debug_build() or PLATFORM_MINGW),
setup_requires=['hpy'],
hpy_abi="cpython",
)
except RequiredDependencyException as err:
msg = f"""
Expand Down
Loading