Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundle sage-setup in sagemath-bliss #38736

Closed
wants to merge 4 commits into from

Conversation

tobiasdiez
Copy link
Contributor

After #37857 it is no longer possible to install and use bliss as part of the standard build of sagelib. One is supposed to install instead the sagemath-bliss distro package after installing sagelib. However, doing so fails with

pip install ./pkgs/sagemath-bliss --dry-run --no-build-isolation
  Processing ./pkgs/sagemath-bliss
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [15 lines of output]
      Traceback (most recent call last):
        File "/opt/conda/envs/sage-dev/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/opt/conda/envs/sage-dev/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/conda/envs/sage-dev/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel
          return hook(metadata_directory, config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/conda/envs/sage-dev/lib/python3.11/site-packages/setuptools/build_meta.py", line 368, in prepare_metadata_for_build_wheel
          self.run_setup()
        File "/opt/conda/envs/sage-dev/lib/python3.11/site-packages/setuptools/build_meta.py", line 313, in run_setup
          exec(code, locals())
        File "<string>", line 34, in <module>
      ModuleNotFoundError: No module named 'sage_setup'
      [end of output]

One somehow needs to install sage_setup, sage_environment, sage_conf and perhaps a bunch of other sage_xyz modules, although one just succesuflly build and installed sagelib.

We make sagemath-bliss easier to install by replacing these build time dependencies with simply with sagemath_standard and bundle sage_setup. This is similar to #37287.

I may add that one should probably also add sagemath-standard under project.dependencies, at least I fail so see how one would use the methods of the sagemath-bliss module without constructing a sage graph first. But that's something for a follow-up.

To test:

mamba install bliss # or install bliss in another way
./bootstrap # Just to update the pyproject.toml file

pip install --no-build-isolation ./src
pip install --no-build-isolation ./pkgs/sagemath-bliss 

./sage
from sage.graphs.bliss import automorphism_group
G = graphs.CompleteMultipartiteGraph([1, 1, 1, 2])
automorphism_group(G).cardinality()

I've added such tests to conda.

Follow-ups: do this similarly for the other modules.

📝 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

#38556

Copy link

github-actions bot commented Sep 29, 2024

Documentation preview for this PR (built with commit 66010d2; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@tobiasdiez
Copy link
Contributor Author

Surpassed by #38836.

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.

1 participant