Skip to content

Conversation

@tobiasdiez
Copy link
Contributor

@tobiasdiez tobiasdiez commented Nov 25, 2024

Move the code from src/sage_setup to pkgs/sage_setup. This is preparation for deleting sage_setup completely after the remaining usages have been replaced by meson. Only the code generation code is left under src (because it's also needed by meson), but moved under the autogen folder.

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

@tobiasdiez tobiasdiez marked this pull request as draft December 1, 2024 11:06
@tobiasdiez
Copy link
Contributor Author

tobiasdiez commented Mar 7, 2025

@dimpase The CI fails for this while installing sagelib. The strange thing, however, is that it first succeeds to build sagelib, but for some reason tries to build it again. Can you confirm locally that there is an issue here?

(Also needs to investigate how to still vendor sage-setup, i.e. to not revert #37287).

@dimpase
Copy link
Member

dimpase commented Mar 11, 2025

OK, I'll try to rebase it over the current beta, and test locally

@dimpase
Copy link
Member

dimpase commented Mar 11, 2025

locally for me, "make build" ends up pretty quickly, with ModuleNotFoundError: No module named 'sage_setup.command.sage_build_ext_minimal'

ake --no-print-directory sagelib-SAGE_VENV-no-deps
[sagelib-10.6.beta9] Setting up build directory /Volumes/dima/sage/local/var/lib/sage/venv-python3.13/var/tmp/sage/build/sagelib-10.6.beta9
[sagelib-10.6.beta9] Host system: Darwin studio.local 24.3.0 Darwin Kernel Version 24.3.0: Thu Jan  2 20:24:16 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6000 arm64
[sagelib-10.6.beta9] C compiler: gcc, Apple clang version 16.0.0 (clang-1600.0.26.6), Target: arm64-apple-darwin24.3.0, Thread model: posix, InstalledDir: /Library/Developer/CommandLineTools/usr/bin
[sagelib-10.6.beta9] No stamp file for package 'sagelib' in /Volumes/dima/sage/local/var/lib/sage/venv-python3.13/var/lib/sage/installed
[sagelib-10.6.beta9] No spkg-legacy-uninstall script; nothing to do
[sagelib-10.6.beta9] [spkg-install] Installing sagelib-10.6.beta9 (editable mode)
[sagelib-10.6.beta9] [spkg-install] Using pip 24.2 from /Volumes/dima/sage/local/var/lib/sage/venv-python3.13/lib/python3.13/site-packages/pip (python 3.13)
[sagelib-10.6.beta9] [spkg-install] Obtaining file:///Volumes/dima/sage/src
[sagelib-10.6.beta9] [spkg-install]   Checking if build backend supports build_editable: started
[sagelib-10.6.beta9] [spkg-install]   Running command Checking if build backend supports build_editable
[sagelib-10.6.beta9] [spkg-install]   Checking if build backend supports build_editable: finished with status 'done'
[sagelib-10.6.beta9] [spkg-install]   Preparing metadata (pyproject.toml): started
[sagelib-10.6.beta9] [spkg-install]   Running command Preparing metadata (pyproject.toml)
[sagelib-10.6.beta9] [spkg-install]   Traceback (most recent call last):
[sagelib-10.6.beta9] [spkg-install]     File "/Volumes/dima/sage/local/var/lib/sage/venv-python3.13/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
[sagelib-10.6.beta9] [spkg-install]       main()
[sagelib-10.6.beta9] [spkg-install]       ~~~~^^
[sagelib-10.6.beta9] [spkg-install]     File "/Volumes/dima/sage/local/var/lib/sage/venv-python3.13/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
[sagelib-10.6.beta9] [spkg-install]       json_out['return_val'] = hook(**hook_input['kwargs'])
[sagelib-10.6.beta9] [spkg-install]                                ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
[sagelib-10.6.beta9] [spkg-install]     File "/Volumes/dima/sage/local/var/lib/sage/venv-python3.13/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel
[sagelib-10.6.beta9] [spkg-install]       return hook(metadata_directory, config_settings)
[sagelib-10.6.beta9] [spkg-install]     File "/opt/homebrew/lib/python3.13/site-packages/setuptools/build_meta.py", line 377, in prepare_metadata_for_build_wheel
[sagelib-10.6.beta9] [spkg-install]       self.run_setup()
[sagelib-10.6.beta9] [spkg-install]       ~~~~~~~~~~~~~~^^
[sagelib-10.6.beta9] [spkg-install]     File "/opt/homebrew/lib/python3.13/site-packages/setuptools/build_meta.py", line 320, in run_setup
[sagelib-10.6.beta9] [spkg-install]       exec(code, locals())
[sagelib-10.6.beta9] [spkg-install]       ~~~~^^^^^^^^^^^^^^^^
[sagelib-10.6.beta9] [spkg-install]     File "<string>", line 22, in <module>
[sagelib-10.6.beta9] [spkg-install]   ModuleNotFoundError: No module named 'sage_setup.command.sage_build_ext_minimal'
[sagelib-10.6.beta9] [spkg-install]   error: subprocess-exited-with-error
[sagelib-10.6.beta9] [spkg-install]   
[sagelib-10.6.beta9] [spkg-install]   � Preparing metadata (pyproject.toml) did not run successfully.
[sagelib-10.6.beta9] [spkg-install]   � exit code: 1
[sagelib-10.6.beta9] [spkg-install]   ��> See above for output.
[sagelib-10.6.beta9] [spkg-install]   
[sagelib-10.6.beta9] [spkg-install]   note: This error originates from a subprocess, and is likely not a problem with pip.
[sagelib-10.6.beta9] [spkg-install]   full command: /Volumes/dima/sage/local/var/lib/sage/venv-python3.13/bin/python3 /Volumes/dima/sage/local/var/lib/sage/venv-python3.13/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py prepare_metadata_for_build_wheel /var/folders/81/vt06lnj17rj0cpc9gdshy4q00000gr/T/tmpbnr56by_
[sagelib-10.6.beta9] [spkg-install]   cwd: /Volumes/dima/sage/src
[sagelib-10.6.beta9] [spkg-install]   Preparing metadata (pyproject.toml): finished with status 'error'
[sagelib-10.6.beta9] [spkg-install] error: metadata-generation-failed
[sagelib-10.6.beta9] [spkg-install] 
[sagelib-10.6.beta9] [spkg-install] � Encountered error while generating package metadata.
[sagelib-10.6.beta9] [spkg-install] ��> See above for output.
[sagelib-10.6.beta9] [spkg-install] 
[sagelib-10.6.beta9] [spkg-install] note: This is an issue with the package mentioned above, not pip.
[sagelib-10.6.beta9] [spkg-install] hint: See above for details.
[sagelib-10.6.beta9] [spkg-install] ********************************************************************************
[sagelib-10.6.beta9] [spkg-install] Error installing sagelib-10.6.beta9

@tobiasdiez
Copy link
Contributor Author

It's probably easier to just delete sage-setup as soon as it's no longer used by sage-the-distro.

@tobiasdiez tobiasdiez closed this May 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants