conda-forge / sage-feedstock

A conda-smithy repository for sage.
BSD 3-Clause "New" or "Revised" License
7 stars 11 forks source link

Create sage for conda with sirocco #78

Closed enriqueartal closed 2 years ago

enriqueartal commented 2 years ago

Checklist

I am not sure if I did it correctly. I am trying to introduce an optional package (sirocco), since it is not of universal use I wonder if a different name should be chosen for the package.

conda-forge-linter commented 2 years ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

saraedum commented 2 years ago

@enriqueartal could you explain what you are trying to achieve?

We can't change the name of the sage package, so we won't be able to merge this.

The package you are proposing is no different from installing sage and sirocco from conda-forge. Why would you want a specific package that bundles the two?

enriqueartal commented 2 years ago

@enriqueartal could you explain what you are trying to achieve?

I want to have sage on binder with optional packages, in this example, sirocco. I made several tries editing environment.yml withour success. We can't change the name of the sage package, so we won't be able to merge this.

Actually, I changed the name since I did not want to interfere with the sage package, since most probably it was not the right way to proceed.

The package you are proposing is no different from installing sage and sirocco from conda-forge. Why would you want a specific package that bundles the two?

Because of my ignorance, I do not know how to get the optional package in conda-forge and binder. Thanks for your patience

saraedum commented 2 years ago

No worries. If you add sirocco to this https://github.com/sagemath/sage-binder-env/blob/master/environment.yml it should work. (Assuming sirocco is packaged on conda-forge?)

saraedum commented 2 years ago

sirocco does not seem to be packaged on conda-forge. Somebody would need to contribute a package to conda-forge for this before it can be used on binder.

It would be great if you could contribute that package. It's not all that hard, please see https://github.com/conda-forge/staged-recipes#getting-started

saraedum commented 2 years ago

I'm closing this pull request. Please feel free to continue the discussion if you have further questions though.

enriqueartal commented 2 years ago

I am following the instructions for the recipe and for the compilation of sirocco. For sirocco I should start with ./configure --prefix=<sagedir>/local --libdir=<sagedir>/local/lib; which is sagedir in conda-forge sage installation?

isuruf commented 2 years ago

Use ./configure --prefix=$PREFIX --libdir=$PREFIX/lib

enriqueartal commented 2 years ago

I did it and it passes all the checks. Which is the following step?

isuruf commented 2 years ago

Send a PR to https://github.com/conda-forge/staged-recipes/

enriqueartal commented 2 years ago

I did it, after some mistakes the pull request passed all the tests.

isuruf commented 2 years ago

Now that there's a sirocco conda package, we need to build sagelib with sirocco. Can you send a PR to https://github.com/conda-forge/sagelib-feedstock ?

enriqueartal commented 2 years ago

First, Fernando @isuruf, thanks for your help. The package sirocco is optional, I will do the PR but if it is rejected there is no problem, maybe the goal is to keep sagelib and sage not so big in conda. Anyway, using sage-feedstock and sirocco it is possible to have a working binder image for sirocco. It may be usefui to have another optional packages as gap_packages. If I have time I may be give a try.

saraedum commented 2 years ago

@enriqueartal sagelib needs to build some glue code, namely sirocco.pyx for sirocco to work fully I guess.

I agree that we should not aim to ship all optional dependencies with the sagelib package, however, we could build against sirocco but not actually add sirocco as a run dependency. So the code that uses sirocco would only work if sirocco is installed additionally.

Anyway, using sage-feedstock and sirocco it is possible to have a working binder image for sirocco.

I am surprised that that works. How is this possible if the sirocco.pyx had not been compiled?

enriqueartal commented 2 years ago

You are completely right. I tried with a toy example which actually did not use sirocco. I will do the PR.

slel commented 2 years ago

Send a PR to https://github.com/conda-forge/staged-recipes/

For reference the PR is:

and the feedstock is now at

enriqueartal commented 2 years ago

This PR has been accepted, I created a new one to include sirocco in sagelib-feedstock but for some unknown reason sirocco is not found.