[arch-commits] Commit in sage-data-conway_polynomials/repos (3 files)
Antonio Rojas
arojas at archlinux.org
Sat Oct 22 09:08:36 UTC 2016
Date: Saturday, October 22, 2016 @ 09:08:35
Author: arojas
Revision: 192961
archrelease: copy trunk to community-testing-any
Added:
sage-data-conway_polynomials/repos/community-testing-any/
sage-data-conway_polynomials/repos/community-testing-any/PKGBUILD
(from rev 192960, sage-data-conway_polynomials/trunk/PKGBUILD)
sage-data-conway_polynomials/repos/community-testing-any/spkg-install
(from rev 192960, sage-data-conway_polynomials/trunk/spkg-install)
--------------+
PKGBUILD | 25 +++++++++++++++++++++++++
spkg-install | 22 ++++++++++++++++++++++
2 files changed, 47 insertions(+)
Copied: sage-data-conway_polynomials/repos/community-testing-any/PKGBUILD (from rev 192960, sage-data-conway_polynomials/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD (rev 0)
+++ community-testing-any/PKGBUILD 2016-10-22 09:08:35 UTC (rev 192961)
@@ -0,0 +1,25 @@
+# $Id$
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+
+_dbname=conway_polynomials
+pkgname=sage-data-$_dbname
+pkgver=0.4
+pkgrel=3
+pkgdesc="A small database of Conway polynomials"
+arch=(any)
+url="http://www.sagemath.org"
+license=(GPL)
+depends=()
+makedepends=(sagemath)
+source=("http://mirrors.mit.edu/sage/spkg/upstream/conway_polynomials/$_dbname-$pkgver.tar.bz2" 'spkg-install')
+md5sums=('17f061204b3a6133abb21e17b3abea19'
+ '5b3b2fc90d2d639f1a44b621d7848b4d')
+
+package() {
+ export PYTHONPATH="$PWD:/usr/lib/sage/site-packages:/usr/bin"
+ export SAGE_LOCAL="/usr"
+ export SAGE_SHARE="$pkgdir/usr/share"
+
+ ln -s conway_polynomials-$pkgver src
+ python2 spkg-install
+}
Copied: sage-data-conway_polynomials/repos/community-testing-any/spkg-install (from rev 192960, sage-data-conway_polynomials/trunk/spkg-install)
===================================================================
--- community-testing-any/spkg-install (rev 0)
+++ community-testing-any/spkg-install 2016-10-22 09:08:35 UTC (rev 192961)
@@ -0,0 +1,22 @@
+#!/usr/bin/env python2
+
+import os
+from sage.all import save
+from sage.env import SAGE_SHARE
+
+install_root = os.path.join(SAGE_SHARE, 'conway_polynomials')
+
+def create_db():
+ db = {}
+ from src import conway_polynomials
+ for p,n,v in conway_polynomials:
+ if not p in db:
+ 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()
+
More information about the arch-commits
mailing list