Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#62037 - [openimageio] 1.8.17-2 - python broken

Attached to Project: Community Packages
Opened by Samuel Nicholas (enetheru) - Sunday, 17 March 2019, 03:53 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Wednesday, 27 March 2019, 22:23 GMT
Task Type Feature Request
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: As stated in the PKGBUILD python3 bindings are not built / do not work.

As i need it for myself i looked into the PKGBUILD and found that the package is outdated, but also that the build steps are somewhat strange.
The openimageio source has a top level makefile which facilitates the cmake process and is very informative in terms of what options are valid for a build.

There is no facility to concurrently build python 2 and python3 bindings, other maintainers have stated that they build twice, I only needed python 3.

I have attached my PKGBUILD in hopes it will help, I use the latest version of openimageio.
I would be delighted to be mentored in updating the PKGBUILD so that it is as robust as possible if anyone has the time.

This is my first time submitting a bug/feature request, so if i messed anything up let me know.
   PKGBUILD (1.4 KiB)
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Wednesday, 27 March 2019, 22:23 GMT
Reason for closing:  Fixed
Comment by Sven-Hendrik Haase (Svenstaro) - Monday, 18 March 2019, 14:58 GMT
You're right. Python 2 doesn't work at the same time as Python 3. I pushed a fixed package with only Python 3. Can you check? We'll stay with 1.8 for the time being as updating right now would break basically all dependents.
Comment by Sven-Hendrik Haase (Svenstaro) - Monday, 18 March 2019, 14:59 GMT
I'd like to keep the issue open until the update to 2.0 at any rate, though.
Comment by Samuel Nicholas (enetheru) - Tuesday, 19 March 2019, 02:55 GMT
Sorry it didn't work, easy to tell after building the package as the folder structure shows it built against python 2 still
oiio-1.8.17/pkg/openimageio/usr/lib/python2.7

the problem is your cmake defines are misinformed, from the build itself:

Manually-specified variables were not used by the project:

PYLIB3_INSTALL_DIR
USE_PYTHON3

try instead using what is used in their own makefile:
-DPYTHON_VERSION:STRING=3.7.2 \

earliest reference to this is from 2011: https://github.com/OpenImageIO/oiio/issues/197

I don't know where you got the initial cmake defines from but they aren't in alignment with what openimageio has.

Cheers
Samuel.
Comment by Samuel Nicholas (enetheru) - Tuesday, 19 March 2019, 03:12 GMT
I will stick to my own build of 2.0.6 because i have it working.
Looking into it further as i attempted to build 1.8 with python3 and it wont detect it, so there is a problem with the cmake find scripts its using.
Comment by Samuel Nicholas (enetheru) - Tuesday, 19 March 2019, 08:03 GMT
it might be possible to get both with some manual copying like this:

cmake .. \
-DUSE_PYTHON=ON \
-DPYTHON_VERSION:STRING=2.7 \
-DUSE_OPENSSL=ON \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DOIIO_BUILD_TESTS=OFF \
-DOIIO_BUILD_TOOLS=ON
make

cp src/python/OpenImageIO.so src/python/OpenImageIO-2.7.so

if [ -f CMakeCache.txt ]; then rm CMakeCache.txt; fi
cmake .. \
-DUSE_PYTHON=ON \
-DPYTHON_VERSION:STRING=3.7 \
-DUSE_OPENSSL=ON \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DOIIO_BUILD_TESTS=OFF \
-DOIIO_BUILD_TOOLS=ON
make

and something equivalent for the installation portion which manually copies the OpenImageIO-2.7.so into the python 2.7 site packages.
Comment by Sven-Hendrik Haase (Svenstaro) - Tuesday, 19 March 2019, 15:10 GMT
You're right my last flags weren't working. However, it seems to default to Python on and it also defaulted to Python 3 apparently as everything just worked and the package did, in fact, produce a proper Python 3 lib:

tar tf openimageio-1.8.17-3-x86_64.pkg.tar.xz | grep python
usr/lib/python3.7/
usr/lib/python3.7/site-packages/
usr/lib/python3.7/site-packages/OpenImageIO.so

So I'm pushing a new rel of the package with fixed CMake flags but identical binary content.

Loading...