xyproto / cxx

:electric_plug: Configuration-free utility for building, testing and packaging executables written in C++. Can auto-detect compilation flags based on includes, via the package system and pkg-config.
BSD 3-Clause "New" or "Revised" License
121 stars 5 forks source link

Python problem #5

Closed ghost closed 6 months ago

ghost commented 6 months ago

Hello Alexander, I got a Python warning and some Error on MacOS Sonoma (on all Projects). Here an Example:

➜  gtk4ui git:(main) cxx build                                                     
/usr/local/share/cxx/build.py:257: SyntaxWarning: invalid escape sequence '\.'
  cmd = '/usr/bin/pacman -Ql -- ' + package + ' | /usr/bin/grep "\.pc$" | /usr/bin/cut -d" " -f2-'
/usr/local/share/cxx/build.py:361: SyntaxWarning: invalid escape sequence '\.'
  cmd = "/usr/sbin/pkg list " + package + " | /usr/bin/grep '\.pc$'"
/usr/local/share/cxx/build.py:526: SyntaxWarning: invalid escape sequence '\.'
  cmd = 'LC_ALL=C /usr/bin/dpkg-query -L ' + package + ' | /bin/grep "\.pc$"'
/usr/local/share/cxx/build.py:616: SyntaxWarning: invalid escape sequence '\.'
  cmd = 'LC_ALL=C brew ls --verbose ' + package + " | grep '\.pc$'"
IndexError: list index out of range:
  File "/usr/local/share/cxx/build.py", line 2385:
    cxx_main()
  File "/usr/local/share/cxx/build.py", line 2210:
    add_flags(env, src_file, system_include_dirs, win64, compiler_includes)
  File "/usr/local/share/cxx/build.py", line 1540:
    includes, defines, libs, libpaths, linkflags, other_cxxflags = get_buildflags(
  File "/usr/local/share/cxx/build.py", line 1033:
    framework_dict[path_components[5]] = os.path.normpath(framework_dir)

Perhaps something with the new Python version?

xyproto commented 6 months ago

Thanks for testing cxx and reporting the issue! I'll look at it.

xyproto commented 6 months ago

I believe I fixed this issue. It works now on my mac. Please test, and please let me know if there are further issues. Thanks.