Skip to content
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

remove annoying printing of primes in conway polynomials spkg #14075

Closed
kcrisman opened this issue Feb 7, 2013 · 13 comments
Closed

remove annoying printing of primes in conway polynomials spkg #14075

kcrisman opened this issue Feb 7, 2013 · 13 comments

Comments

@kcrisman
Copy link
Member

kcrisman commented Feb 7, 2013

See #12205 and this log. For some reason it always prints a lot of primes.

Spkg at http://sage.math.washington.edu/home/kcrisman/conway_polynomials-0.4.p0.spkg

CC: @kiwifb @williamstein @ohanar

Component: packages: standard

Author: Karl-Dieter Crisman

Reviewer: François Bissey, R. Andrew Ohana

Merged: sage-5.8.beta0

Issue created by migration from https://trac.sagemath.org/ticket/14075

@kcrisman kcrisman added this to the sage-5.7 milestone Feb 7, 2013
@kcrisman
Copy link
Member Author

comment:1

François, I see this commit in sage-on-gentoo, but

$ ls src/conway_polynomials/
conway_polynomials		conway_table.py.bz2
conway_polynomials.index

and none of these are easy to look at for me, and your commit of course is to the ebuild. What file here could someone (I?) fix? Sorry, I'm not a binary file whiz :(

@kiwifb
Copy link
Member

kiwifb commented Feb 13, 2013

comment:2

Replying to @kcrisman:

François, I see this commit in sage-on-gentoo, but

$ ls src/conway_polynomials/
conway_polynomials		conway_table.py.bz2
conway_polynomials.index

and none of these are easy to look at for me, and your commit of course is to the ebuild. What file here could someone (I?) fix? Sorry, I'm not a binary file whiz :(

Hi Karl-Dieter,

You need to edit spkg-install and remove the line that says "print .....". There are a couple more things we have done in sage-on-gentoo that could be interesting. Currently this spkg depends on sage-runtime and I think the change we made could enable us to drop that in favor of just sage.

Long story short I had problems with gap and that prevented this to be installed. sage-runtime implies that gap for example can be loaded and it is in the current incarnation of the spkg. With what we did it is not necessary anymore.

@kiwifb
Copy link
Member

kiwifb commented Feb 13, 2013

comment:3

spkg-install in sage-on-gentoo look like this:

#!/usr/bin/env python

import os
from sage.structure.sage_object import save

install_root = os.path.join('/scratch/portage/sci-mathematics/sage-data-conway_polynomials-0.4-r1/image/usr/share/sage', 'conway_polynomials')

def create_db():
    db = {}
    from src import conway_polynomials
    for p,n,v in conway_polynomials:
        if not db.has_key(p):
            db[p] = {}
        db[p][n] = v
    if not os.path.exists(install_root):
        os.makedirs(install_root)
    save(db, os.path.join(install_root, 'conway_polynomials.sobj'))

if __name__ == '__main__':
    create_db()

the definition of install_root is gentoo specific, so you shouldn't use that bit. The rest is ok for consumption in "vanilla" sage.

@kcrisman
Copy link
Member Author

comment:4

Oh, I see, I was confused because we had

#!/bin/sh

rm -rf $SAGE_SHARE/conway_polynomials
mkdir -p $SAGE_SHARE
mv src/conway_polynomials $SAGE_SHARE/conway_polynomials

but #12205 wasn't merged until 5.7 betas, so I couldn't just get it from the standard packages directory. Now I see what happened, sorry for that - I'll download the correct spkg later and fix this :)

@kcrisman
Copy link
Member Author

comment:5

Here we go.

diff --git a/SPKG.txt b/SPKG.txt
--- a/SPKG.txt
+++ b/SPKG.txt
@@ -15,6 +15,9 @@
 
 == Changelog ==
 
+=== conway_polynomials-0.4.p0 (Karl-Dieter Crisman, 13 February 2013) ===
+ * #14075: Remove printing of primes while installing
+
 === conway_polynomials-0.4 (R. Andrew Ohana and William Stein, 18 June 2012) ===
  * #12205: Rewrite database to not use ZODB
 
diff --git a/spkg-install b/spkg-install
--- a/spkg-install
+++ b/spkg-install
@@ -12,7 +12,6 @@
     for p,n,v in conway_polynomials:
         if not db.has_key(p):
             db[p] = {}
-            print p
         db[p][n] = v
     if not os.path.exists(install_root):
         os.makedirs(install_root)

@kcrisman
Copy link
Member Author

comment:6

Package at http://sage.math.washington.edu/home/kcrisman/conway_polynomials-0.4.p0.spkg. William and Andrew, if there is some good reason to not make this change, I'm happy to have this ticket closed as wontfix, but it seems like it was just an oversight.

@kcrisman
Copy link
Member Author

Author: Karl-Dieter Crisman

@kcrisman

This comment has been minimized.

@kiwifb
Copy link
Member

kiwifb commented Feb 14, 2013

comment:8

And I am happy to give this a positive review. I just checked the spkg and it is all good by me. So if William and Andrew have no objection the button can be pushed.

@ohanar
Copy link
Member

ohanar commented Feb 15, 2013

comment:9

This looks fine to me, the only thing I might change is the version number to be 0.5 since there is no upstream package.

@kcrisman
Copy link
Member Author

comment:10

Okay, thanks. I think I'll leave it since you and WIlliam are "upstream" and I'm not ;-)

@kcrisman
Copy link
Member Author

Reviewer: François Bissey, R. Andrew Ohana

@jdemeyer
Copy link

Merged: sage-5.8.beta0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants