Opened 2 years ago
Closed 17 months ago
#31275 closed enhancement (fixed)
QEPCAD: improve installation locations
Reported by: | mkoeppe | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-9.5 |
Component: | packages: experimental | Keywords: | |
Cc: | jhpalmieri, mjo | Merged in: | |
Authors: | Michael Orlitzky | Reviewers: | Dima Pasechnik |
Report Upstream: | N/A | Work issues: | |
Branch: | 036b431 (Commits, GitHub, GitLab) | Commit: | 036b431a63435f66ed4023c78fd14ad8b9498e5b |
Dependencies: | Stopgaps: |
Description
QEPCAD assumes unusual locations for several files, including
$SAGE_LOCAL/default.qepcadrc
(which would better live in$SAGE_ETC
(=$SAGE_LOCAL/etc
)$SAGE_LOCAL/bin/qepcad.help
(which would better live in$SAGE_LOCAL/share/qepcad
)
(We already use Fedora's patches (https://src.fedoraproject.org/rpms/qepcad-B/blob/master/f/qepcad-B.spec), which make some changes to qepcad's environment.)
It would be good to improve this.
Change History (14)
comment:1 Changed 2 years ago by
comment:2 Changed 20 months ago by
I think we can just remove default.qepcadrc
entirely and just set SINGULARPATH as an env var
comment:3 Changed 19 months ago by
Dependencies: | → #32254 |
---|
comment:4 Changed 18 months ago by
Cc: | mjo added |
---|
comment:5 Changed 18 months ago by
Milestone: | sage-wishlist → sage-9.5 |
---|
As noted in #29024, we should get rid of qepcad
's use of the environment variable SINGULARPATH
- as preparation for singular spkg-configure.
comment:6 Changed 18 months ago by
SINGULARPATH
is only mentioned in qepcad-B-env.patch
whose value I doubt. The default for $qe
is Fedora-specific, and $SINGULARPATH
should not be needed at all because the compiled Singular
executable knows it.
What's more, we seem to be setting SINGULAR
in QEPCAD's rc file...
cat > "$SAGE_LOCAL/default.qepcadrc" <<EOF # THIS FILE IS AUTOMATICALLY GENERATED by build/pkgs/qepcad/spkg-install.in -- DO NOT EDIT ##################################################### # QEPCAD rc file. # This file allows for some customization of QEPCAD. # Right now, the ability to give a path to Singular, # so that it gets used for some computer algebra # computations is the only feature. ##################################################### SINGULAR $SAGE_LOCAL/bin EOF
but the only place that's used is to execute "Singular" (in source/db/SINGULAR.c
):
string SingularCall = SingularBase + "/Singular"; ... execlp(SingularCall.c_str(), SingularCall.c_str(), "-q", "--no-warn", "--min-time=0.001", "--ticks-per-sec=1000", NULL);
Since execlp()
searches PATH
, the whole mess can simply be replaced by execlp("Singular",...)
. If we want to create a nice backwards-compatible patch, we could use SingularBase + "/Singular"
when SINGULAR
is defined, and "Singular"
otherwise. Then deleting SINGULAR
from our qepcad rc file would make it do the right thing, but the patch could be used by others without breaking configs that rely on SINGULAR
being set.
comment:7 Changed 18 months ago by
Authors: | → Michael Orlitzky |
---|---|
Branch: | → u/mjo/ticket/31275 |
Commit: | → 7c43cf6fce0821c161f7b66923bc0667881c41c6 |
Status: | new → needs_review |
This seems to work. I dropped the nonsensical qepcad-B-env.patch
, and added a new patch that chaged the SINGULAR
variable in default.qepcadrc
into a boolean. Now "yes" makes it launch Singular
from the $PATH
, and anything else disables it.
New commits:
8243319 | Trac #31275: drop qepcad-B-env.patch.
|
7c43cf6 | Trac #31275: use boolean SINGULAR variable.
|
comment:8 Changed 18 months ago by
Commit: | 7c43cf6fce0821c161f7b66923bc0667881c41c6 → 991ff3e32459877fb701cac4a029ecd2692d617b |
---|
comment:9 Changed 17 months ago by
Dependencies: | #32254 |
---|
comment:10 Changed 17 months ago by
test errors like
File "/mnt/opt/Sage/sage-dev/local/lib/python3.8/site-packages/sage/interfaces/qepcad.py", line 687, in _update_command_info with open(os.path.join(SAGE_LOCAL, 'bin', 'qepcad.help')) as help: FileNotFoundError: [Errno 2] No such file or directory: '/mnt/opt/Sage/sage-dev/local/bin/qepcad.help'
whereas the location used now is $SAGE_LOCAL/share/qepcad/qepcad.help
.
So one needs to change sage/interfaces/qepcad.py
to fix this.
comment:11 Changed 17 months ago by
Reviewers: | → Dima Pasechnik |
---|
few other tests need a fix. I'll provide a branch.
comment:12 Changed 17 months ago by
Branch: | u/mjo/ticket/31275 → u/dimpase/ticket/31275 |
---|---|
Commit: | 991ff3e32459877fb701cac4a029ecd2692d617b → 036b431a63435f66ed4023c78fd14ad8b9498e5b |
Status: | needs_review → positive_review |
New commits:
036b431 | fix locations of qepcad.help and qepcadrc
|
comment:13 Changed 17 months ago by
Thanks for the fix! I guess I forgot to re-test after I realized that I hadn't actually solved the problem in $description and moved the help/rc files.
comment:14 Changed 17 months ago by
Branch: | u/dimpase/ticket/31275 → 036b431a63435f66ed4023c78fd14ad8b9498e5b |
---|---|
Resolution: | → fixed |
Status: | positive_review → closed |
Also, very low on the priority list since this is an experimental package, but the
spkg-install.in
script could be rewritten to use thesdh
tools.