On Sun, Apr 20, 2025 at 4:26 PM Marc Culler <marc.cul...@gmail.com> wrote:

> I got the impression from comments in this thread that it would be
> possible to build python with the prefix directory of my choice and use
> that python as the "system python" for a build of Sage.  So I built a
> relocatable python 3.13 and installed it in a prefix directory.  Since the
> python installation is relocatable I can rename the prefix directory to
> whatever I want.
>
> However, I am not able to find any way to convince Sage's configure script
> to use my python.  No matter what I try, it declares that there is no
> suitable system python.
>

What is the error you get ?
There are a number of checks done. First, there is a check that the version
is between 3.11 and 3.13.
Then, that
bzip2, liblzma, libffi, zlib are available as "system" packages
(the idea of this check is to avoid several copies of these dylibs to lie
around - it's assumed that they are
used to build your Python)
Then, there is a check that the modules sqlite3, ctypes, math, hashlib,
socket, zlib, ssl, ensurepip can be imported.

And there is a test that sysconfig module isn't in a way misconfigured
 (but you can override it if you pass your Python as in the error message:
this is a misconfigured Python whose sysconfig compiler/linker flags
contain -I or -L options, which may cause wrong versions of libraries to
leak into the build of Python packages - see
https://github.com/sagemath/sage/issues/31132; to use it anyway, use
./configure --with-python=$ac_path_PYTHON3]
)

HTH
Dima





>
> Is this actually possible?  If so, what are the configure arguments needed
> to make sage use a python installed in /x/y/z?
> (I.e. I want sage to build with python executable /x/y/z/bin/python3 and
> python library located in /x/y/z/lib/python3.13).
>
> - Marc
>
> On Saturday, April 19, 2025 at 11:33:37 PM UTC-5 dim...@gmail.com wrote:
>
>> On Fri, Apr 18, 2025 at 6:32 PM William Stein <wst...@gmail.com> wrote:
>>
>>> On Fri, Apr 18, 2025 at 4:12 PM Nils Bruin <nbr...@sfu.ca> wrote:
>>> >
>>> > On Friday, 18 April 2025 at 10:07:12 UTC-7 dim...@gmail.com wrote:
>>> >
>>> > Nobody is going to "break" anything. You'll just need a proper Python
>>> to install Sage, like one of many pre-reqs already needed.
>>> > It's just fear-mongering. Building Sage will be less broken this way,
>>> not more broken.
>>> >
>>> > It looks to me that a consensus to move forward on this is in reach:
>>> >
>>> > * Dima's preference is to (eventually) end up in a state where python
>>> is a prerequisite for sage and his main argument for that is: other
>>> projects have as purpose to provide python and they likely do a better job
>>> than we'd do.
>>> >
>>> > * Marc and Sébastien have voiced some concerns about how smooth the
>>> transition to "python purely a prerequisite" would be. Given that we HAVE
>>> been offering the option to build python since the start, one would expect
>>> that some people's workflows are relying on that behaviour, so there are
>>> going to be wrinkles for those people. We in fact know that one example of
>>> that is the building process of the MacOS app.
>>> >
>>> > It seems to me that the concerns of the two parties above aren't even
>>> conflicting: one is aiming for something they find technologically superior
>>> and ultimately more stable and reliable (and easier to maintain) whereas
>>> the other party is concerned that the transition will be too painful for
>>> them, or that they're forced to transition to something that may need
>>> fixing due to unforeseen shortcomings that come to light once they go
>>> through this forced transition. I haven't seen them object to the principle
>>> of the final goal.
>>> >
>>> > So a middle ground would be to offer a security blanket during the
>>> transition: change the default behaviour of the python package for now to
>>> NOT build, but as a transition measure offer a configuration flag that
>>> restores the ability to build python from source. The clear goal of that
>>> must be that within the near future, no-one is actually activating that
>>> configuration flag, after which it can be removed with minimal impact. Once
>>> the python package has become just a stub to test if there is a python
>>> available that works properly, it will be easy to remove the package and
>>> instead make the test for python a normal prerequisite check.
>>> >
>>>
>>> If the proposal to require an external Python is accepted, there could
>>> still be our standard1-year deprecation period, during what you say
>>> above is done.
>>>
>>
>> I'm fine with delaying this change until the 10.8 release cycle, but an
>> even longer delay is too much, IMHO.
>> I propose to release 10.7 with the option proposed by Nils, and with
>> python3 spkg removed in 10.8.
>>
>> Dima
>>
>>
>>>
>>> > The perceived conflict here doesn't look like it's technological at
>>> all. It seems much more an issue with trust. I realize it may be sobering
>>> to find that people basically say: "I don't trust your assessment", but
>>> just shouting "Just trust me" at an increased volume is very unlikely to
>>> persuade them. Instead, if there's a way forward that allows you to say
>>> "Fine, you don't have to trust me unconditionally; let's just do it in
>>> smaller steps and then you can check for yourself it's OK", you'll likely
>>> to do much better on gaining trust in the future. Plus, you'll arrive at
>>> the destination you were aiming for eventually anyway.
>>> >
>>> >
>>> > --
>>> > You received this message because you are subscribed to the Google
>>> Groups "sage-devel" group.
>>> > To unsubscribe from this group and stop receiving emails from it, send
>>> an email to sage-devel+...@googlegroups.com.
>>> > To view this discussion visit
>>> https://groups.google.com/d/msgid/sage-devel/a444cbd4-ff0b-4397-97ce-ad6da16f2679n%40googlegroups.com
>>> .
>>>
>>>
>>>
>>> --
>>> William (http://wstein.org)
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "sage-devel" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to sage-devel+...@googlegroups.com.
>>>
>> To view this discussion visit
>>> https://groups.google.com/d/msgid/sage-devel/CACLE5GB1CtC16J__rqQXxDk%2B5DKwtuyH-VXj3fwKb8q%3D468vZA%40mail.gmail.com
>>> .
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To view this discussion visit
> https://groups.google.com/d/msgid/sage-devel/02e9812e-84c8-4bca-b1ee-d05f6f421f6fn%40googlegroups.com
> <https://groups.google.com/d/msgid/sage-devel/02e9812e-84c8-4bca-b1ee-d05f6f421f6fn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/sage-devel/CAAWYfq2XkT2YsDrvthrcrbgwG-3LqdXapjUJrpK37_4aeT%3DYhA%40mail.gmail.com.

Reply via email to