-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
install_package() is obsolete #16759
Comments
comment:1
It also looks like I'm not sure where to get a list of all of the current standard packages, but once we had that, we might be able to get the version numbers from |
comment:2
Replying to @jhpalmieri:
I would say that |
comment:3
...that being said, it makes no sense to work on this ticket if the underlying |
comment:4
Along similar lines, does But I agree with William that this is important. I'm working at a Sage Days prep right now with exactly the kind of people William was talking about in the thread that led to this - people who know quite a bit of math and might want to use some specialized optional package (say, polymake) but would need an awful lot of hand-holding to make it through some of this weird behavior. |
comment:5
Here's an option: turn off |
Stopgaps: #16760 |
comment:7
This might be related to the case of the tarball : you use This is documented in the Developer's guide, paragraph "Directory structure", that states :
I suppose that the original Pillow porter might have been a Mac user, and that nobody caught the problem. HTH, |
comment:8
From the |
comment:9
Or rewrite diff --git a/src/bin/sage-fix-pkg-checksums b/src/bin/sage-fix-pkg-checksums
index 65542b9..b42463d 100755
--- a/src/bin/sage-fix-pkg-checksums
+++ b/src/bin/sage-fix-pkg-checksums
@@ -11,7 +11,7 @@ fi
for upstream in "$@"
do
tarball=`basename "$upstream"`
- pkg_name=${tarball%%-*}
+ pkg_name=`echo ${tarball%%-*} | tr '[:upper:]' '[:lower:]'`
pkg_compression=${tarball#*.tar} # gz or bz2
if [ -d "$SAGE_ROOT/build/pkgs/$pkg_name" ]; then
sage_version=`cat "$SAGE_ROOT/build/pkgs/$pkg_name/package-version.txt" | sed 's/\.p[0-9][0-9]*$//'` Maybe print a warning whenever the case is changed, just to be safe? |
comment:10
Oops, there are more changes required: we need to keep track of
|
comment:11
Replying to @jhpalmieri: Update : Just saw your patch. It fixes the technical problem, but what other holes does it open ?
|
comment:12
Replying to @EmmanuelCharpentier:
Good question. Since we want to support OS X, we cannot allow different files whose names are the same except for case differences, so we cannot allow different directories |
comment:13
See #18344. |
comment:14
I'd keep all (Sage-internal) "package names" (i.e., folders) in We should IMHO simply be more flexible w.r.t. upstream tarballs (their names and also their top-level folders). The easiest way to achieve this is to record the upstream tarball's name as well; currently we only have In the long run, we wouldn't have to rename or modify upstream tarballs (which was the goal anyway), and could even provide the original URL(s) to obtain them, at least as an alternative, and also for documentation purposes. (There's more data we could move/replicate from |
comment:15
Replying to @nexttime:
Yes.
Yes.
The tarball name (without the version) is stored in See the proposal at #18344. I think that the tarball and the directory name should agree except possibly for case differences. I guess we could allow completely different names for the two, but that would make various parts of the system more complicated: |
comment:16
Replying to @jhpalmieri:
I disregarded M$ Windows files... ;-) |
comment:17
Related:
Setting SAGE_SERVER="http://sage.scipy.org/sage/" ./sage --optional
Using Sage Server http://sage.scipy.org/sage/packages
HTTP Error 404: Not Found
********************************************************************************
Error contacting http://sage.scipy.org/sage/packages/optional/list. Try using an alternative server.
For example, from the bash prompt try typing
export SAGE_SERVER=http://sage.scipy.org/sage/
then try again.
******************************************************************************** The above fails for a different reason, but try yourself with some other mirror... |
Dependencies: #15642 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:22
I vote for removing the
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:28
Channeling Nathann: regarding changes like This is no longer a stopgap, so in I'm not sure if the changes to Also, please make the following change (or something similar): diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py
index de4d206..9d727d9 100644
--- a/src/sage/misc/package.py
+++ b/src/sage/misc/package.py
@@ -19,7 +19,7 @@ components:
Use the :func:``optional_packages`` command to list all
optional packages available on the central Sage server.
-Actually installing the packages should be done via the Sage command
+Actually installing the packages should be done via the command
line, using the following commands:
- ``sage -i PACKAGE_NAME`` -- install the given package Also, the sentences at the top of that file describing Sage packages are outdated and should probably just be replaced with a pointer to the Developer's Guide. If you are willing to do that, too, that would be nice. |
comment:29
Replying to @jhpalmieri:
Good point. I'll replace this by |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:31
Replying to @jhpalmieri:
I don't think it's technically possible to have an actual link to the Developer's Guide, but I will change the wording. |
comment:32
Replying to @jhpalmieri:
It's really just a deprecation that I added. Pretty innocent. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:34
John, I think I made all the changes you proposed. |
comment:35
Okay, looks good. What do we do about the files
Maybe I can handle the last one: diff --git a/src/doc/en/thematic_tutorials/numerical_sage/mpi4py.rst b/src/doc/en/thematic_tutorials/numerical_sage/mpi4py.rst
index 93afc85..ef129b1 100644
--- a/src/doc/en/thematic_tutorials/numerical_sage/mpi4py.rst
+++ b/src/doc/en/thematic_tutorials/numerical_sage/mpi4py.rst
@@ -5,22 +5,11 @@ MPI which stands for message passing interface is a common library
for parallel programming. There is a package mpi4py that builds on
the top of mpi, and lets arbitrary python objects be passed between
different processes. These packages are not part of the default
-sage install. To install them do
-
-.. skip
-
-::
-
- sage: optional_packages()
-
-Find the package name openmpi-\* and mpi4py-\*and do
-
-.. skip
+sage install. To install them, from a shell prompt, run
::
- sage: install_package('openmpi-*')
- sage: install_package('mpi4py-*')
+ sage -i openmpi mpi4py
Note that openmpi takes a while to compile (15-20 minutes or so).
Openmpi can be run on a cluster, however this requires some set up But the other two files refer to packages which are now archived ( |
comment:36
Replying to @jhpalmieri:
I know.... it's difficult. Since I see no sensible way to fix those files, I just left them alone. The problem is that those files have a laundry list of old-style packages which are no longer supported. I see no sensible way of updating them, there is no point to replace |
comment:37
How about this: diff --git a/src/doc/en/thematic_tutorials/numerical_sage/installation_linux.rst b/src/doc/en/thematic_tutorials/numerical_sage/installation_linux.rst
index 16df05f..01ee37f 100644
--- a/src/doc/en/thematic_tutorials/numerical_sage/installation_linux.rst
+++ b/src/doc/en/thematic_tutorials/numerical_sage/installation_linux.rst
@@ -1,6 +1,10 @@
Installing Visualization Tools on Linux
=======================================
+.. warning::
+
+ The following instructions are outdated (2015-Sep).
+
This section assumes you are running linux. You may need
administrator rights to complete this section. First try
diff --git a/src/doc/en/thematic_tutorials/numerical_sage/installation_osx.rst b/src/doc/en/thematic_tutorials/numerical_sage/installation_osx.rst
index 05c27e8..2c6cec8 100644
--- a/src/doc/en/thematic_tutorials/numerical_sage/installation_osx.rst
+++ b/src/doc/en/thematic_tutorials/numerical_sage/installation_osx.rst
@@ -1,6 +1,11 @@
Installing Visualization Software on OS X
=========================================
+
+.. warning::
+
+ The following instructions are outdated (2015-Sep).
+
The first thing we need to do is rebuild Python to use OSX's
frameworks, so that it can create graphical windows. To do this
first from the terminal do
diff --git a/src/doc/en/thematic_tutorials/numerical_sage/mpi4py.rst b/src/doc/en/thematic_tutorials/numerical_sage/mpi4py.rst
index 93afc85..98d0edb 100644
--- a/src/doc/en/thematic_tutorials/numerical_sage/mpi4py.rst
+++ b/src/doc/en/thematic_tutorials/numerical_sage/mpi4py.rst
@@ -1,6 +1,11 @@
mpi4py
======
+
+.. warning::
+
+ The following instructions are outdated (2015-Sep).
+
MPI which stands for message passing interface is a common library
for parallel programming. There is a package mpi4py that builds on
the top of mpi, and lets arbitrary python objects be passed between We can also add a note to contact sage-support for help. What do you think? |
comment:38
Replying to @jhpalmieri:
In order to move forward with this ticket, I made it a separate ticket: #19198 |
Reviewer: John Palmieri |
Changed branch from u/jdemeyer/install_package___is_obsolete to |
Packages should be installed using
sage -i
from a shell, not with theinstall_package()
Sage command.For consistency in error messages, we introduce the exception
PackageNotFoundError
which should be used to signal that a package is not installed. This idea was taken from an existing but unused exceptionOptionalPackageNotFoundError
(which is removed).CC: @williamstein
Component: misc
Stopgaps: #16760
Author: Jeroen Demeyer
Branch/Commit:
da03be1
Reviewer: John Palmieri
Issue created by migration from https://trac.sagemath.org/ticket/16759
The text was updated successfully, but these errors were encountered: