Même aveec un lien symbolique ...
Bonjour,
homebrew s'installe dans /usr/local sur les architectures Interl et sous /opt/homebrew sur les architexture arm64.
J'ai donc pensé que faire un lien entre /usr/include/exiv2 vers /opt/homebrew/include/exiv2 pouvait être une solution, ....
Malheureusement :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
$ pip3 install --break-system-packages --user py3exiv2
Collecting py3exiv2
Using cached py3exiv2-0.12.0.tar.gz (47 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: py3exiv2
Building wheel for py3exiv2 (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for py3exiv2 (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [35 lines of output]
/private/var/folders/8t/qqc5rjqd0_z8z95ys5pkbjy00000gp/T/pip-build-env-yytd58s9/overlay/lib/python3.13/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: GNU General Public License v3 (GPLv3)
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
self._finalize_license_expression()
running bdist_wheel
running build
running build_py
creating build/lib.macosx-15.0-arm64-cpython-313/pyexiv2
copying src/pyexiv2/preview.py -> build/lib.macosx-15.0-arm64-cpython-313/pyexiv2
copying src/pyexiv2/iptc.py -> build/lib.macosx-15.0-arm64-cpython-313/pyexiv2
copying src/pyexiv2/metadata.py -> build/lib.macosx-15.0-arm64-cpython-313/pyexiv2
copying src/pyexiv2/__init__.py -> build/lib.macosx-15.0-arm64-cpython-313/pyexiv2
copying src/pyexiv2/xmp.py -> build/lib.macosx-15.0-arm64-cpython-313/pyexiv2
copying src/pyexiv2/exif.py -> build/lib.macosx-15.0-arm64-cpython-313/pyexiv2
copying src/pyexiv2/utils.py -> build/lib.macosx-15.0-arm64-cpython-313/pyexiv2
running build_ext
building 'libexiv2python' extension
creating build/temp.macosx-15.0-arm64-cpython-313/src
clang++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -I/opt/homebrew/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/include/python3.13 -c src/exiv2wrapper.cpp -o build/temp.macosx-15.0-arm64-cpython-313/src/exiv2wrapper.o -g -std=c++11
In file included from src/exiv2wrapper.cpp:27:
In file included from src/exiv2wrapper.hpp:33:
/usr/local/include/exiv2/exiv2.hpp:8:10: fatal error: cannot open file '/usr/local/include/exiv2/exiv2/basicio.hpp': Too many levels of symbolic links
8 | #include "exiv2/basicio.hpp"
| ^
1 error generated.
error: command '/usr/bin/clang++' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for py3exiv2
Failed to build py3exiv2
ERROR: Failed to build installable wheels for some pyproject.toml based projects (py3exiv2) |
J'ai essayé de mettre le lien au niveau de include, mais c'est la même punition
Sur les dernières versions de MacOs, il n'est pas possible de créer des hardlink entre répertories.
Donc bien coincé .....
Pour moi, c'est résolu avec modification de setup.py
Bonjour,
Ne pouvant tricher avec des liens, j'ai récupéré l'archive de py3exiv2
Code:
1 2 3 4
|
cd /tmp
pip3 doownload py3exiv2
tar zxvf py3exiv2-0.12.0.tar.gz |
Puis me basant sur les infos dans le fichiers setup.py, j'ai visité le site
Code:
https://gist.github.com/ndevenish/6410cab393bd8dec1b016061ddb5573b
ce qui m'a permis de rajouter dans le fichier setup.py, les 2 lignes qui concernent include et library pour ajouter les répertoires respectifs de /opt/homebrew
Code:
1 2 3 4 5 6 7
| Extension('libexiv2python',
['src/exiv2wrapper.cpp', 'src/exiv2wrapper_python.cpp'],
include_dirs=['/opt/homebrew/include'],
library_dirs=['/opt/homebrew/lib'],
libraries=[boostlib, 'exiv2'],
extra_compile_args=['-g', '-std=c++11']
) |
Code:
1 2 3 4 5 6 7 8 9 10 11 12
| pip3 install --break-system-packages --user .
Processing /private/tmp/py3exiv2/py3exiv2-0.12.0
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: py3exiv2
Building wheel for py3exiv2 (pyproject.toml) ... done
Created wheel for py3exiv2: filename=py3exiv2-0.12.0-cp313-cp313-macosx_15_0_arm64.whl size=126120 sha256=4bde94ea85ddb22708f2545e32594d6722e247f152a94770c5d534e2f42823a9
Stored in directory: /Users/jrc/Library/Caches/pip/wheels/84/d7/d8/fb1a76a6df64bd1810a8deea7ce191b04414899a0e3e3add5a
Successfully built py3exiv2
Installing collected packages: py3exiv2
Successfully installed py3exiv2-0.12.0 |
Manifestement, les 2 lignes manquaient quand on est dans l'architecture arm64
Je ne maîtrise pas suffisamment pip pour savoir comment rendre la situation pérenne en se basant sur un test de l'architecture, comme il y en a un sur la plateforme.
Cordialement,