bobfang1992 / pytomlpp

A python wrapper for tomlplusplus
https://bobfang1992.github.io/pytomlpp/pytomlpp.html
MIT License
86 stars 11 forks source link

pip install failure #71

Closed marzer closed 1 year ago

marzer commented 1 year ago

Hola,

As of today I've been getting this error in CI when installing pytomlpp:

 Running setup.py install for pytomlpp: finished with status 'error'
  error: subprocess-exited-with-error

  × Running setup.py install for pytomlpp did not run successfully.
  │ exit code: 1
  ╰─> [21 lines of output]
      /usr/lib/python3/dist-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
        warnings.warn(msg, warning_class)
      /usr/lib/python3/dist-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      running install
      /usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-311
      creating build/lib.linux-x86_64-cpython-311/pytomlpp
      copying src/pytomlpp/_io.py -> build/lib.linux-x86_64-cpython-311/pytomlpp
      copying src/pytomlpp/__init__.py -> build/lib.linux-x86_64-cpython-311/pytomlpp
      copying src/pytomlpp/_impl.pyi -> build/lib.linux-x86_64-cpython-311/pytomlpp
      running build_ext
      building 'pytomlpp._impl' extension
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/src
      x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/tmp/pip-install-qoz9xm5r/pytomlpp_7b85ad4c577248569e38fa3c3c4046a9/include -I/tmp/pip-install-qoz9xm5r/pytomlpp_7b85ad4c577248569e38fa3c3c4046a9/third_party -I/tmp/pip-install-qoz9xm5r/pytomlpp_7b85ad4c577248569e38fa3c3c4046a9/.eggs/pybind11-2.10.3-py3.11.egg/pybind11/include -I/usr/include/python3.11 -c src/encoding_decoding.cpp -o build/temp.linux-x86_64-cpython-311/src/encoding_decoding.o -std=c++17
      error: command 'x86_64-linux-gnu-gcc' failed: No such file or directory
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pytomlpp

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

~Looks like it's a classic "warning treated as error" situation, though I don't know enough about pip and setuptools to know for sure. Any ideas?~

Oh, scratch that. It doesn't know what x86_64-linux-gnu-gcc is O_o. Guess that means it is likely an issue with the github actions CI images?

bobfang1992 commented 1 year ago

Hey sorry I completely missed this message, let me take a look.

Carreau commented 1 year ago

Would you consider publishing wheels on PyPI using maybe ci-build-wheel ? This would likely avoid any need to build on end-user machines, and make installation potentially much faster.

Nevermind i'm too tired to read.

bobfang1992 commented 1 year ago

@Carreau I thought that is what we are doing right now.

bobfang1992 commented 1 year ago

Would you consider publishing wheels on PyPI using maybe ci-build-wheel ? This would likely avoid any need to build on end-user machines, and make installation potentially much faster.

https://github.com/bobfang1992/pytomlpp/blob/master/.github/workflows/dists.yml#L52 I think for @marzer is a special use case as he has to build from scratch (he is the owner of the upstream toml++). I have not got time to look this into this but that's my impression.

Carreau commented 1 year ago

Sorry my bad, I'm not sure why I get an error message that there are no wheel avail in my project. Let me check. They are indeed present on PyPI...

Carreau commented 1 year ago

Nevermind I'm too tired to read CI logs properly.

Carreau commented 1 year ago

Nevermind I'm too tired to read CI logs properly.

Ah ! I was actually not crazy.. I't missing wheels for Python 3.11 :-)

bobfang1992 commented 1 year ago

Nevermind I'm too tired to read CI logs properly.

Ah ! I was actually not crazy.. I't missing wheels for Python 3.11 :-)

Hi I've just made a new release 1.0.12 can you give it a try? It should now support 3.11

bobfang1992 commented 1 year ago

Hola,

As of today I've been getting this error in CI when installing pytomlpp:

 Running setup.py install for pytomlpp: finished with status 'error'
  error: subprocess-exited-with-error

  × Running setup.py install for pytomlpp did not run successfully.
  │ exit code: 1
  ╰─> [21 lines of output]
      /usr/lib/python3/dist-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
        warnings.warn(msg, warning_class)
      /usr/lib/python3/dist-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      running install
      /usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-311
      creating build/lib.linux-x86_64-cpython-311/pytomlpp
      copying src/pytomlpp/_io.py -> build/lib.linux-x86_64-cpython-311/pytomlpp
      copying src/pytomlpp/__init__.py -> build/lib.linux-x86_64-cpython-311/pytomlpp
      copying src/pytomlpp/_impl.pyi -> build/lib.linux-x86_64-cpython-311/pytomlpp
      running build_ext
      building 'pytomlpp._impl' extension
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/src
      x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/tmp/pip-install-qoz9xm5r/pytomlpp_7b85ad4c577248569e38fa3c3c4046a9/include -I/tmp/pip-install-qoz9xm5r/pytomlpp_7b85ad4c577248569e38fa3c3c4046a9/third_party -I/tmp/pip-install-qoz9xm5r/pytomlpp_7b85ad4c577248569e38fa3c3c4046a9/.eggs/pybind11-2.10.3-py3.11.egg/pybind11/include -I/usr/include/python3.11 -c src/encoding_decoding.cpp -o build/temp.linux-x86_64-cpython-311/src/encoding_decoding.o -std=c++17
      error: command 'x86_64-linux-gnu-gcc' failed: No such file or directory
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pytomlpp

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

~Looks like it's a classic "warning treated as error" situation, though I don't know enough about pip and setuptools to know for sure. Any ideas?~

Oh, scratch that. It doesn't know what x86_64-linux-gnu-gcc is O_o. Guess that means it is likely an issue with the github actions CI images?

Hi @marzer I don't think I fully understand this issue, so this is in toml++'s CI and you are building pytomlpp from scratch? I wonder what's the setup? Thanks!

Carreau commented 1 year ago

Hi I've just made a new release 1.0.12 can you give it a try? It should now support 3.11

:+1: ❤️

marzer commented 1 year ago

Yeah it was in TOML++'s ci for the doxygen stuff, but I wasn't explicitly doing anything special to build pytomlpp. All I was doing was pip install pytomlpp. Entirely possible it was caused by a GitHub Actions image config change, and may be fixed now.

I've implemented a workaround in the mean-time so I think I'll just close this one. If it happens again I'll try to get some more info for you :)