Package Details: python-openexr 1.3.9-2

Git Clone URL: https://aur.archlinux.org/python-openexr.git (read-only, click to copy)
Package Base: python-openexr
Description: Python bindings for ILM's OpenEXR image file format
Upstream URL: https://github.com/sanguinariojoe/pip-openexr
Licenses: custom
Submitter: TUC
Maintainer: FederAndInk
Last Packager: FederAndInk
Votes: 0
Popularity: 0.000000
First Submitted: 2021-01-19 07:40 (UTC)
Last Updated: 2023-09-04 20:08 (UTC)

Latest Comments

trougnouf commented on 2023-09-04 20:10 (UTC)

It works, thank you!

FederAndInk commented on 2023-09-04 20:09 (UTC)

@trougnouf thanks for reporting, try now

trougnouf commented on 2023-09-04 18:33 (UTC)

The package is broken for me with recent updates

>>> import OpenEXR
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: libIex-3_1.so.30: cannot open shared object file: No such file or directory

TUC commented on 2021-12-06 19:15 (UTC)

I switched to python bindings of OpenImageIO.

@FederAndInk feel free to adopt the package.

FederAndInk commented on 2021-12-06 17:42 (UTC) (edited on 2021-12-06 17:43 (UTC) by FederAndInk)

hi, here are some modifications, to fix the build, taken from https://github.com/jamesbowman/openexrpython/issues/43


commit b5d6aa16f09db58968a65ff3c32f518dcb6a5877
Author: DRM-Free <leinert.anael@gmail.com>
Date:   Mon Dec 6 18:34:49 2021 +0100

    fix build

diff --git a/PKGBUILD b/PKGBUILD
index 3171dd1..fabee50 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,8 +7,18 @@ url='https://github.com/jamesbowman/openexrpython'
 arch=('any')
 license=('unknown')
 depends=('openexr')
-source=(https://files.pythonhosted.org/packages/7c/c4/76bf884f59d3137847edf8b93aaf40f6257d8315d0064e8b1a606ad80b1b/${_name}-${pkgver}.tar.gz)
-sha512sums=('b4b85f3f8860639c4f65a3fe59c721e08573ffe9b2af5cc7e398d9ff249bac604b43fa5bda6f05f8cd248ed7346df1a2972ac7c5a3df12fe0a73b859c618e33d')
+source=(https://files.pythonhosted.org/packages/7c/c4/76bf884f59d3137847edf8b93aaf40f6257d8315d0064e8b1a606ad80b1b/${_name}-${pkgver}.tar.gz
+  fix1.patch
+  fix2.patch)
+sha512sums=('b4b85f3f8860639c4f65a3fe59c721e08573ffe9b2af5cc7e398d9ff249bac604b43fa5bda6f05f8cd248ed7346df1a2972ac7c5a3df12fe0a73b859c618e33d'
+  '207129f64bdc6216efde14a6a9f939ac2886ef7351789ab6f02846cefd5e36355ad7333a207a8be45ad718a7a885657ce86c9b05182899fd7384d4bdce199560'
+  '872a7e003144237c0f4068d3fb8b53bbc763483b433b9a16fab0d117171afa02136952fdc7c6c94d4467febc9a8766c252ef9f36ceff38f5d97d4ae7af21fd65')
+
+prepare() {
+  cd ${_name}-${pkgver}
+  patch -p1 <"$srcdir/fix1.patch"
+  patch -p1 <"$srcdir/fix2.patch"
+}

 build() {
   cd ${_name}-${pkgver}
diff --git a/fix1.patch b/fix1.patch
new file mode 100644
index 0000000..dabfe7b
--- /dev/null
+++ b/fix1.patch
@@ -0,0 +1,96 @@
+diff --git a/OpenEXR.cpp b/OpenEXR.cpp
+index 99ff258..d73372c 100644
+--- a/OpenEXR.cpp
++++ b/OpenEXR.cpp
+@@ -62,6 +62,7 @@ typedef int Py_ssize_t;
+ #include <ImfTimeCodeAttribute.h>
+ #include <ImfVecAttribute.h>
+ #include <ImfVersion.h>
++#include <ImfFrameBuffer.h>
+ 
+ #include <OpenEXRConfig.h>
+ 
+@@ -87,8 +88,8 @@ typedef int Py_ssize_t;
+ #include <algorithm>
+ #include <iostream>
+ #include <iomanip>
+-#include <iostream>
+ #include <vector>
++#include <fstream>
+ 
+ using namespace std;
+ using namespace Imf;
+@@ -121,8 +122,8 @@ class C_IStream: public IStream
+     C_IStream (PyObject *fo):
+         IStream(""), _fo(fo) {}
+     virtual bool    read (char c[], int n);
+-    virtual Int64   tellg ();
+-    virtual void    seekg (Int64 pos);
++    virtual uint64_t   tellg ();
++    virtual void    seekg (uint64_t pos);
+     virtual void    clear ();
+     virtual const char*     fileName() const;
+   private:
+@@ -148,7 +149,7 @@ const char* C_IStream::fileName() const
+ }
+ 
+ 
+-Int64
++uint64_t
+ C_IStream::tellg ()
+ {
+     PyObject *rv = PyObject_CallMethod(_fo, (char*)"tell", NULL);
+@@ -157,14 +158,14 @@ C_IStream::tellg ()
+       long long t = PyLong_AsLong(lrv);
+       Py_DECREF(lrv);
+       Py_DECREF(rv);
+-      return (Int64)t;
++      return (uint64_t)t;
+     } else {
+       throw Iex::InputExc("tell failed");
+     }
+ }
+ 
+ void
+-C_IStream::seekg (Int64 pos)
++C_IStream::seekg (uint64_t pos)
+ {
+     PyObject *data = PyObject_CallMethod(_fo, (char*)"seek", (char*)"(L)", pos);
+     if (data != NULL) {
+@@ -186,8 +187,8 @@ class C_OStream: public OStream
+   public:
+     C_OStream (PyObject *fo): OStream(""), _fo(fo) {}
+     virtual void    write (const char *c, int n);
+-    virtual Int64   tellp ();
+-    virtual void    seekp (Int64 pos);
++    virtual uint64_t   tellp ();
++    virtual void    seekp (uint64_t pos);
+     virtual void    clear ();
+     virtual const char*     fileName() const;
+   private:
+@@ -212,7 +213,7 @@ const char* C_OStream::fileName() const
+ }
+ 
+ 
+-Int64
++uint64_t
+ C_OStream::tellp ()
+ {
+     PyObject *rv = PyObject_CallMethod(_fo, (char*)"tell", NULL);
+@@ -221,14 +222,14 @@ C_OStream::tellp ()
+       long long t = PyLong_AsLong(lrv);
+       Py_DECREF(lrv);
+       Py_DECREF(rv);
+-      return (Int64)t;
++      return (uint64_t)t;
+     } else {
+       throw Iex::InputExc("tell failed");
+     }
+ }
+ 
+ void
+-C_OStream::seekp (Int64 pos)
++C_OStream::seekp (uint64_t pos)
+ {
+     PyObject *data = PyObject_CallMethod(_fo, (char*)"seek", (char*)"(L)", pos);
+     if (data != NULL) {
diff --git a/fix2.patch b/fix2.patch
new file mode 100644
index 0000000..28821bc
--- /dev/null
+++ b/fix2.patch
@@ -0,0 +1,14 @@
+--- A/setup.py 2018-08-31 23:08:18.000000000 +0200
++++ B/setup.py 2021-12-06 18:26:03.796018019 +0100
+@@ -17,9 +17,9 @@
+   ext_modules=[ 
+     Extension('OpenEXR',
+               ['OpenEXR.cpp'],
+-              include_dirs=['/usr/include/OpenEXR', '/usr/local/include/OpenEXR', '/opt/local/include/OpenEXR'],
++              include_dirs=['/usr/include/OpenEXR', '/usr/local/include/OpenEXR', '/opt/local/include/OpenEXR', '/usr/include/Imath'],
+               library_dirs=['/usr/local/lib', '/opt/local/lib'],
+-              libraries=['Iex', 'Half', 'Imath', 'IlmImf', 'z'],
++              libraries=['Iex', 'Imath', 'OpenEXR', 'z'],
+               extra_compile_args=['-g', '-DVERSION="%s"' % version])
+   ],
+   py_modules=['Imath'],