-
-
Notifications
You must be signed in to change notification settings - Fork 479
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
allowing external ECM to be called gmp-ecm or ecm #37011
Changes from all commits
7a9ce37
2c53f08
afeffaa
c84929a
2ea4345
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -220,6 +220,7 @@ def var(key: str, *fallbacks: Optional[str], force: bool = False) -> Optional[st | |||||
MAXIMA_FAS = var("MAXIMA_FAS") | ||||||
KENZO_FAS = var("KENZO_FAS") | ||||||
SAGE_NAUTY_BINS_PREFIX = var("SAGE_NAUTY_BINS_PREFIX", "") | ||||||
SAGE_ECMBIN = var("SAGE_ECMBIN") | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
... just like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need a variable for everything under the sun? There's a well established way to configure binary locations, it's called As for the two standard names for the binary, that's unfortunate, is there a valid reason why Fedora does that? Is it possible/desirable to have the executable feature try both? For non-standard setups one can always place a symlink in a custom directory and add it to PATH. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A symlink worked and one could asked fedora packagers to place this symlink, but apparently it is not the only distribution. Concerning the error in
getting There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
You mean: ask the fedora packager not to rename the executable (https://src.fedoraproject.org/rpms/gmp-ecm/blob/rawhide/f/gmp-ecm.spec#_99). We don't need to do anything special in void linux for
I never saw that, I also can't see what this has to do with python 3.12. Unless something there was compiled for python 3.11 and now run on python 3.12 (since layout of integers changed). But something like that I would expect to give many more issues... Is it something that happens every time, or at random? Did you manage to get a clean backtrace of the segfault? Are you sure the sage+gap used for tests is exactly the same you are using for trying this in the terminal? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. here is how the package got into Fedora in the first place. https://bugzilla.redhat.com/show_bug.cgi?id=473330#c2 there is a comment from the reviewer There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
With #37024 I can build sagemath-standard from pypi with no configure step involved and no sage_conf hack. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure we want exactly the same thing. If you ever think I'm concerned about sage-conf, sage-env, or anything under Setuptools cannot build sagelib, unless you happen to run your own distro. Setuptools can't detect C libraries or programs in general; see e.g. cvxopt for what happens when you try. Meson lets us fix that: it gives us a way to build only sagelib, but reliably, and without all of the sage-the-distro scaffolding.
Again, we don't disagree. I feel the same way about distros renaming executables and breaking consumers. It was my first comment on this ticket.
One more case where we want exactly the same thing. I just remade combinatorial_designs as a python package (https://github.com/orlitzky/mols-handbook-data) and am waiting for a repo to make a release (#37025). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
hmm, where does this happen? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
That's how the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I never understood the need for sage.features. It seems to papering over a deficiency in Sage package management... |
||||||
RUBIKS_BINS_PREFIX = var("RUBIKS_BINS_PREFIX", "") | ||||||
FOURTITWO_HILBERT = var("FOURTITWO_HILBERT") | ||||||
FOURTITWO_MARKOV = var("FOURTITWO_MARKOV") | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# -*- coding: utf-8 -*- | ||
r""" | ||
Feature for testing the presence of ``ecm`` or ``gmp-ecm`` | ||
""" | ||
# **************************************************************************** | ||
# Copyright (C) 2032 Dima Pasechnik <dima@pasechnik.info> | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 2 of the License, or | ||
# (at your option) any later version. | ||
# https://www.gnu.org/licenses/ | ||
# **************************************************************************** | ||
|
||
from . import Executable | ||
from sage.env import SAGE_ECMBIN | ||
|
||
|
||
class Ecm(Executable): | ||
r""" | ||
A :class:`~sage.features.Feature` describing the presence of :ref:`GMP-ECM <spkg_ecm>`. | ||
|
||
EXAMPLES:: | ||
|
||
sage: from sage.features.ecm import Ecm | ||
sage: Ecm().is_present() | ||
FeatureTestResult('ecm', True) | ||
""" | ||
def __init__(self): | ||
r""" | ||
TESTS:: | ||
|
||
sage: from sage.features.ecm import Ecm | ||
sage: isinstance(Ecm(), Ecm) | ||
True | ||
""" | ||
Executable.__init__(self, name="ecm", executable=SAGE_ECMBIN, | ||
spkg="ecm", type="standard") | ||
|
||
|
||
def all_features(): | ||
return [Ecm()] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.