s2geometry icon indicating copy to clipboard operation
s2geometry copied to clipboard

Error when building Python version

Open MicahSee opened this issue 4 months ago • 2 comments

Hello!

I'm on MacOS trying to build s2geometry and running into an issue when running python -m build in the s2geometry folder. I install the dependencies and run the command and always run into this error.

CMake Error: The source directory "/private/var/folders/mc/rgtc9hz147x3l6jlhsmb44xn08n96g/T/build-via-sdist-kc0zg51p/s2geometry-0.0.0" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
Traceback (most recent call last):
  File "/Users/msee/projects/s2geo-test/s2geometry-master/venv/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
    main()
  File "/Users/msee/projects/s2geo-test/s2geometry-master/venv/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in main
    json_out["return_val"] = hook(**hook_input["kwargs"])
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/msee/projects/s2geo-test/s2geometry-master/venv/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 280, in build_wheel
    return _build_backend().build_wheel(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/private/var/folders/mc/rgtc9hz147x3l6jlhsmb44xn08n96g/T/build-env-sqiqsaed/lib/python3.12/site-packages/setuptools/build_meta.py", line 432, in build_wheel
    return _build(['bdist_wheel'])
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/private/var/folders/mc/rgtc9hz147x3l6jlhsmb44xn08n96g/T/build-env-sqiqsaed/lib/python3.12/site-packages/setuptools/build_meta.py", line 423, in _build
    return self._build_with_temp_dir(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/private/var/folders/mc/rgtc9hz147x3l6jlhsmb44xn08n96g/T/build-env-sqiqsaed/lib/python3.12/site-packages/setuptools/build_meta.py", line 404, in _build_with_temp_dir
    self.run_setup()
  File "/private/var/folders/mc/rgtc9hz147x3l6jlhsmb44xn08n96g/T/build-env-sqiqsaed/lib/python3.12/site-packages/setuptools/build_meta.py", line 317, in run_setup
    exec(code, locals())
  File "<string>", line 8, in <module>
  File "/private/var/folders/mc/rgtc9hz147x3l6jlhsmb44xn08n96g/T/build-env-sqiqsaed/lib/python3.12/site-packages/setuptools/__init__.py", line 115, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/private/var/folders/mc/rgtc9hz147x3l6jlhsmb44xn08n96g/T/build-env-sqiqsaed/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 186, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/private/var/folders/mc/rgtc9hz147x3l6jlhsmb44xn08n96g/T/build-env-sqiqsaed/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 202, in run_commands
    dist.run_commands()
  File "/private/var/folders/mc/rgtc9hz147x3l6jlhsmb44xn08n96g/T/build-env-sqiqsaed/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 1002, in run_commands
    self.run_command(cmd)
  File "/private/var/folders/mc/rgtc9hz147x3l6jlhsmb44xn08n96g/T/build-env-sqiqsaed/lib/python3.12/site-packages/setuptools/dist.py", line 1102, in run_command
    super().run_command(command)
  File "/private/var/folders/mc/rgtc9hz147x3l6jlhsmb44xn08n96g/T/build-env-sqiqsaed/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command
    cmd_obj.run()
  File "/private/var/folders/mc/rgtc9hz147x3l6jlhsmb44xn08n96g/T/build-env-sqiqsaed/lib/python3.12/site-packages/setuptools/command/bdist_wheel.py", line 370, in run
    self.run_command("build")
  File "/private/var/folders/mc/rgtc9hz147x3l6jlhsmb44xn08n96g/T/build-env-sqiqsaed/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 357, in run_command
    self.distribution.run_command(command)
  File "/private/var/folders/mc/rgtc9hz147x3l6jlhsmb44xn08n96g/T/build-env-sqiqsaed/lib/python3.12/site-packages/setuptools/dist.py", line 1102, in run_command
    super().run_command(command)
  File "/private/var/folders/mc/rgtc9hz147x3l6jlhsmb44xn08n96g/T/build-env-sqiqsaed/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command
    cmd_obj.run()
  File "/private/var/folders/mc/rgtc9hz147x3l6jlhsmb44xn08n96g/T/build-env-sqiqsaed/lib/python3.12/site-packages/setuptools/_distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/private/var/folders/mc/rgtc9hz147x3l6jlhsmb44xn08n96g/T/build-env-sqiqsaed/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 357, in run_command
    self.distribution.run_command(command)
  File "/private/var/folders/mc/rgtc9hz147x3l6jlhsmb44xn08n96g/T/build-env-sqiqsaed/lib/python3.12/site-packages/setuptools/dist.py", line 1102, in run_command
    super().run_command(command)
  File "/private/var/folders/mc/rgtc9hz147x3l6jlhsmb44xn08n96g/T/build-env-sqiqsaed/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command
    cmd_obj.run()
  File "/private/var/folders/mc/rgtc9hz147x3l6jlhsmb44xn08n96g/T/build-env-sqiqsaed/lib/python3.12/site-packages/cmake_build_extension/build_extension.py", line 114, in run
    self.build_extension(ext)
  File "/private/var/folders/mc/rgtc9hz147x3l6jlhsmb44xn08n96g/T/build-env-sqiqsaed/lib/python3.12/site-packages/cmake_build_extension/build_extension.py", line 241, in build_extension
    subprocess.check_call(configure_command)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '-S', '/private/var/folders/mc/rgtc9hz147x3l6jlhsmb44xn08n96g/T/build-via-sdist-kc0zg51p/s2geometry-0.0.0', '-B', '/private/var/folders/mc/rgtc9hz147x3l6jlhsmb44xn08n96g/T/build-via-sdist-kc0zg51p/s2geometry-0.0.0/build/temp.macosx-10.9-universal2-cpython-312_SwigBindings', '-G', 'Ninja', '-DCMAKE_MAKE_PROGRAM=/private/var/folders/mc/rgtc9hz147x3l6jlhsmb44xn08n96g/T/build-env-sqiqsaed/bin/ninja', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_INSTALL_PREFIX:PATH=/private/var/folders/mc/rgtc9hz147x3l6jlhsmb44xn08n96g/T/build-via-sdist-kc0zg51p/s2geometry-0.0.0/build/lib.macosx-10.9-universal2-cpython-312/s2geometry', '-DPython3_ROOT_DIR=/private/var/folders/mc/rgtc9hz147x3l6jlhsmb44xn08n96g/T/build-env-sqiqsaed', '-DCALL_FROM_SETUP_PY:BOOL=ON', '-DBUILD_SHARED_LIBS:BOOL=OFF', '-DCMAKE_POSITION_INDEPENDENT_CODE=ON', '-DWITH_PYTHON=ON']' returned non-zero exit status 1.

MicahSee avatar Jun 03 '25 15:06 MicahSee