Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / rainbowstream / image.patch
blob215152ae4fb1a272d4de89457be33c5e761fa695
1 diff --git a/rainbowstream/c_image.py b/rainbowstream/c_image.py
2 index f050150..a0fb77d 100644
3 --- a/rainbowstream/c_image.py
4 +++ b/rainbowstream/c_image.py
5 @@ -12,11 +12,7 @@ def call_c():
6 """
7 Call the C program for converting RGB to Ansi colors
8 """
9 - library = expanduser('~/.image.so')
10 - sauce = join(dirname(__file__), 'image.c')
11 - if not exists(library) or getmtime(sauce) > getmtime(library):
12 - build = "cc -fPIC -shared -o %s %s" % (library, sauce)
13 - os.system(build + " >/dev/null 2>&1")
14 + library = '@CLIB@'
15 image_c = ctypes.cdll.LoadLibrary(library)
16 image_c.init()
17 return image_c.rgb_to_ansi