Installation issue on macos-latest (GitHub Actions)
I'm facing an issue similar to https://github.com/mcmtroffaes/pycddlib/issues/49 in the CI of lpsolvers. This issue is specific to macos-latest images:
Building wheel for pycddlib (setup.py): finished with status 'error'
File "/Users/runner/work/lpsolvers/lpsolvers/.tox/py37-macos/lib/python3.7/site-packages/setuptools/installer.py", line 41, in _fetch_build_eggs
Running setup.py clean for pycddlib
replace_conflicting=True,
Failed to build pycddlib
File "/Users/runner/work/lpsolvers/lpsolvers/.tox/py37-macos/lib/python3.7/site-packages/pkg_resources/__init__.py", line 830, in resolve
py37-macos: exit 1 (13.61 seconds) /Users/runner/work/lpsolvers/lpsolvers> python -I -m pip install 'cvxpy>=1.1.12' 'Cython>=3.0.0' 'pycddlib>=2.1.7' pid=1159
req, best, replace_conflicting, env, installer, required_by, to_activate
py37-macos: FAIL code 1 (14.39 seconds)
File "/Users/runner/work/lpsolvers/lpsolvers/.tox/py37-macos/lib/python3.7/site-packages/pkg_resources/__init__.py", line 866, in _resolve_dist
evaluation failed :( (14.52 seconds)
req, ws, installer, replace_conflicting=replace_conflicting
File "/Users/runner/work/lpsolvers/lpsolvers/.tox/py37-macos/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1135, in best_match
return self.obtain(req, installer)
File "/Users/runner/work/lpsolvers/lpsolvers/.tox/py37-macos/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1147, in obtain
return installer(requirement)
File "/Users/runner/work/lpsolvers/lpsolvers/.tox/py37-macos/lib/python3.7/site-packages/setuptools/installer.py", line 101, in _fetch_build_egg_no_warn
wheel.install_as_egg(dist_location)
File "/Users/runner/work/lpsolvers/lpsolvers/.tox/py37-macos/lib/python3.7/site-packages/setuptools/wheel.py", line 117, in install_as_egg
self._install_as_egg(destination_eggdir, zf)
File "/Users/runner/work/lpsolvers/lpsolvers/.tox/py37-macos/lib/python3.7/site-packages/setuptools/wheel.py", line 125, in _install_as_egg
self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
File "/Users/runner/work/lpsolvers/lpsolvers/.tox/py37-macos/lib/python3.7/site-packages/setuptools/wheel.py", line 171, in _convert_metadata
os.rename(dist_info, egg_info)
OSError: [Errno 66] Directory not empty: '/private/var/folders/3s/vfzpb5r51gs6y328rmlgzm7c0000gn/T/pip-install-9vl40nhf/pycddlib_837943d2f7f0470c99c8deb22784cedf/.eggs/Cython-3.0.4-py3.7-macosx-11.7-x86_64.egg/Cython-3.0.4.dist-info' -> '/private/var/folders/3s/vfzpb5r51gs6y328rmlgzm7c0000gn/T/pip-install-9vl40nhf/pycddlib_837943d2f7f0470c99c8deb22784cedf/.eggs/Cython-3.0.4-py3.7-macosx-11.7-x86_64.egg/EGG-INFO'
Installing Cython by itself (without pycddlib) on macos-latest works. It seems this error only occurs during pip install pycddlib.
(Also the issue is not specific to Python 3.7; it also happens e.g. on Python 3.9.)
Thanks for the log. Yes, it looks like the same thing that was triggering #49 - sadly I never figured out what the problem was. Since the tests pass on macos on this repository, I'm at loss...
I suppose this is no longer an issue; please do let me know if it is still a problem.
Note that on later versions of macos (or, at least those on github actions...) the homebrew include and lib folders must be passed explicitly when running pip (see #70).
env "CFLAGS=-I$(brew --prefix)/include -L$(brew --prefix)/lib" python -m pip install ...