On Mon, Aug 4, 2014 at 8:35 AM, Volker Braun <vbraun.n...@gmail.com> wrote:
> (5) have any dependency handling for optional packages.

Would switching to that package manager that you recently rewrote help here?

>
> Really, this thread boils down to: the Sage library depends on some optional
> packages. Any kind of hacks around that (like running "sage -b" by hand in
> scripts) will just lead to race conditions.

I'm going to give up on changing sage for this particular issue, and
just put "sage -b" in my own script for installing optional packages
to SMC.

Probably somebody should disable the install_package command in Sage,
and remove explicit reference to it in sage source code, if there is
no plan to fix it. There are many places in the sage source code that
tell people to use that command:

~/tmp$ sage -grep "install_package"
sage/sat/solvers/cryptominisat/__init__.py:    raise
ImportError("Failed to import
'sage.sat.solvers.cryptominisat.CryptoMiniSat'. Run
\"install_package('cryptominisat')\" to install it.")
sage/misc/package.py:Use the ``install_package`` command to install a new
sage/misc/package.py:                install_package(pkg, force=force)
sage/misc/package.py:def install_package(package=None, force=False):
sage/misc/package.py:        sage: install_package()
sage/misc/package.py:        sage: install_package('chomp')  # not tested
sage/misc/package.py:        print("install_package may not work
correctly under Microsoft Windows")
sage/misc/package.py:        print("use the force option to install_package().")
sage/misc/package.py:                raise ValueError("Package is
already installed. Try
install_package('{}',force=True)".format(package))
sage/misc/package.py:    return any(p.startswith(package) for p in
install_package())
sage/misc/package.py:    Use ``install_package(package_name)`` to install or
sage/misc/package.py:    .. seealso:: :func:`install_package`, :func:`upgrade`
sage/misc/package.py:    Use ``install_package(package_name)`` to install or
sage/misc/package.py:    .. seealso:: :func:`install_package`, :func:`upgrade`
sage/misc/package.py:    Use ``install_package(package_name)`` to install or
sage/misc/package.py:    .. seealso:: :func:`install_package`, :func:`upgrade`
sage/misc/package.py:    .. seealso:: :func:`install_package`,
:func:`optional_packages`
sage/misc/package.py:    mesg  = 'To install the package %s type
install_package("%s")\n'%(package_name, package_name)
sage/misc/all.py:from package import install_package,
is_package_installed, standard_packages, optional_packages,
experimental_packages, upgrade
sage/interfaces/r.py:    def install_packages(self, package_name):
sage/interfaces/r.py:            sage: r.install_packages('aaMI')
 # not tested
sage/rings/polynomial/multi_polynomial_ideal.py:            raise
ImportError("""GINV is missing, to install use
"install_package('ginv')".""")
sage/rings/polynomial/multi_polynomial_sequence.py:
raise ValueError('algorithm=exhaustive_search requires the optional
library FES. Run "install_package(\'fes\')" to install it
.')
sage/groups/perm_gps/permgroup_named.py:
``install_package(`database_gap')``.
sage/geometry/triangulation/point_configuration.py:    sage:
install_package('TOPCOM')     # not tested
sage/geometry/polyhedron/palp_database.py:    install it with the
command ``install_package('polytopes_db_4d')``.
sage/graphs/graph_plot_js.py:    ``install_package('d3js')`` or by
running ``sage -i d3js`` from the command
sage/graphs/graph_plot_js.py:        ``install_package('d3js')`` or by
running ``sage -i d3js`` from the
sage/server/trac/trac.py:        print "Try something like
install_package('trac-0.11.5'),"
~/tmp$ sage -grep "install_package"|wc -l
29



 -- William

>
>
>
> On Monday, August 4, 2014 2:58:02 PM UTC+1, wstein wrote:
>>
>>   (1) Run "sage -b" as part of installing any package that requires it
>> for the install to finish.  Your argument not to run "sage -b" isn't
>> convincing, because the user is explicitly installing a package
>> anyways, so they are potentially changing things all over Sage.   Or,
>>
>>   (2) Tell people they have to run "sage -b" clearly in the package
>> install message.  This won't work, because after 20 pages of build
>> output, nobody is likely to read this.  Or,
>>
>>   (3) Instead of telling the user to reinstall the missing package (in
>> minisat say), actually give a useful error message, instead of a
>> totally wrong one.  E.g., check to see if the minisat library is
>> installed, but the cython module isn't built.   I don't like this
>> since it is fragile.
>
> --
> 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 post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org
wst...@uw.edu

-- 
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 post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to