[arch-commits] Commit in sage-data-elliptic_curves/repos/community-any (4 files)

Antonio Rojas arojas at archlinux.org
Tue Aug 9 18:06:17 UTC 2016


    Date: Tuesday, August 9, 2016 @ 18:06:17
  Author: arojas
Revision: 186231

archrelease: copy trunk to community-any

Added:
  sage-data-elliptic_curves/repos/community-any/PKGBUILD
    (from rev 186230, sage-data-elliptic_curves/trunk/PKGBUILD)
  sage-data-elliptic_curves/repos/community-any/spkg-install
    (from rev 186230, sage-data-elliptic_curves/trunk/spkg-install)
Deleted:
  sage-data-elliptic_curves/repos/community-any/PKGBUILD
  sage-data-elliptic_curves/repos/community-any/spkg-install

--------------+
 PKGBUILD     |   60 ++++++++++---------
 spkg-install |  176 ++++++++++++++++++++++++++++-----------------------------
 2 files changed, 119 insertions(+), 117 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2016-08-09 18:06:05 UTC (rev 186230)
+++ PKGBUILD	2016-08-09 18:06:17 UTC (rev 186231)
@@ -1,29 +0,0 @@
-# Maintainer: Antonio Rojas <arojas at archlinux.org>
-
-_dbname=elliptic_curves
-pkgname=sage-data-$_dbname
-pkgver=0.8
-pkgrel=1
-pkgdesc="Database of elliptic curves for Sage"
-arch=('any')
-url="http://www.sagemath.org"
-license=('GPL')
-depends=()
-makedepends=('python' 'sqlite')
-source=("http://www.sagemath.org/packages/upstream/elliptic_curves/$_dbname-$pkgver.tar.bz2" "https://raw.githubusercontent.com/sagemath/sage/6ae960b3db36b628546c0fd3ea0f7f75154edb22/build/pkgs/elliptic_curves/spkg-install")
-md5sums=('42fd8ee63c1193fab6c08c0e7523fe01'
-         'b74eff87bdc6e9df132bc50a7e3513c6')
-
-package() {
-  export SAGE_SHARE="$pkgdir"/usr/share/sage
-  cd $_dbname-$pkgver
-  mkdir src
-  mv common ellcurves src
-  python ../spkg-install
-
-# fix permissions
-  chmod 755 "$pkgdir"/usr/share/sage/ellcurves
-  chmod 644 "$pkgdir"/usr/share/sage/ellcurves/*
-
-  rm -r "$pkgdir"/usr/share/sage/ellcurves/{.r*,..r*}
-}

Copied: sage-data-elliptic_curves/repos/community-any/PKGBUILD (from rev 186230, sage-data-elliptic_curves/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2016-08-09 18:06:17 UTC (rev 186231)
@@ -0,0 +1,31 @@
+# $Id$
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+
+_dbname=elliptic_curves
+pkgname=sage-data-$_dbname
+pkgver=0.8
+pkgrel=1
+pkgdesc="Database of elliptic curves for SageMath"
+arch=('any')
+url="http://www.sagemath.org"
+license=('GPL')
+depends=()
+makedepends=('python' 'sqlite')
+source=("http://mirrors.mit.edu/sage/spkg/upstream/elliptic_curves/$_dbname-$pkgver.tar.bz2"
+        "https://raw.githubusercontent.com/sagemath/sage/6ae960b3db36b628546c0fd3ea0f7f75154edb22/build/pkgs/elliptic_curves/spkg-install")
+md5sums=('fd9beee5a0e4a5ae330ffd6f1ab12112'
+         'b74eff87bdc6e9df132bc50a7e3513c6')
+
+package() {
+  export SAGE_SHARE="$pkgdir"/usr/share/sage
+  cd $_dbname-$pkgver
+  mkdir src
+  mv common ellcurves src
+  python ../spkg-install
+
+# fix permissions
+  chmod 755 "$pkgdir"/usr/share/sage/ellcurves
+  chmod 644 "$pkgdir"/usr/share/sage/ellcurves/*
+
+  rm -r "$pkgdir"/usr/share/sage/ellcurves/{.r*,..r*}
+}

Deleted: spkg-install
===================================================================
--- spkg-install	2016-08-09 18:06:05 UTC (rev 186230)
+++ spkg-install	2016-08-09 18:06:17 UTC (rev 186231)
@@ -1,88 +0,0 @@
-#!/usr/bin/env python
-
-import os
-common_curves = os.path.join(os.getcwd(), 'src', 'common')
-
-def install_cremona():
-    from sqlite3 import connect
-
-    if 'SAGE_SHARE' not in os.environ:
-        raise RuntimeError("SAGE_SHARE undefined, maybe run `sage -sh`?")
-
-    cremona_root = os.path.join(os.environ['SAGE_SHARE'], 'cremona')
-    if not os.path.exists(cremona_root):
-        os.makedirs(cremona_root)
-
-    target = os.path.join(cremona_root, 'cremona_mini.db')
-
-    if os.path.exists(target):
-        os.remove(target)
-
-    con = connect(target)
-
-    con.execute('CREATE TABLE t_class(rank INTEGER, class TEXT PRIMARY KEY,'
-            ' conductor INTEGER)')
-    con.execute('CREATE TABLE t_curve(curve TEXT PRIMARY KEY, class TEXT, tors'
-            ' INTEGER, eqn TEXT UNIQUE)')
-    con.execute('CREATE INDEX i_t_class_conductor ON t_class(conductor)')
-    con.execute('CREATE INDEX i_t_curve_class ON t_curve(class)')
-
-    class_data = []
-    curve_data = []
-
-    for line in open(os.path.join(common_curves, 'allcurves.00000-09999')):
-        N, iso, num, eqn, r, tors = line.split()
-        cls = N + iso
-        cur = cls + num
-        if num == "1":
-            class_data.append((N, cls, r))
-        curve_data.append((cur, cls, eqn, tors))
-
-    con.executemany('INSERT INTO t_class(conductor,class,rank) VALUES'
-            ' (?,?,?)', class_data)
-    con.executemany('INSERT INTO t_curve(curve,class,eqn,tors) VALUES'
-            ' (?,?,?,?)', curve_data)
-
-    con.commit()
-
-def install_ellcurves():
-    import shutil, tempfile
-
-    if 'SAGE_SHARE' not in os.environ:
-        raise RuntimeError("SAGE_SHARE undefined, maybe run `sage -sh`?")
-
-    target = os.path.join(os.environ['SAGE_SHARE'], 'ellcurves')
-    if os.path.exists(target):
-        try:
-            shutil.rmtree(target)
-        except OSError:
-            os.remove(target)
-
-    shutil.move(os.path.join('src', 'ellcurves'), target)
-    rank = {}
-    for line in open(os.path.join(common_curves, 'allcurves.00000-09999')):
-        r = line.split()[4]
-        if r not in rank:
-            rank[r] = open(tempfile.mkstemp()[1], 'w')
-        rank[r].write(line)
-
-    for r, f in rank.items():
-        f.close()
-        endpath = os.path.join(target, 'rank' + r)
-        if os.path.exists(endpath):
-            old = tempfile.mkstemp()[1]
-            shutil.move(endpath, old)
-            shutil.move(f.name, endpath)
-            f = open(endpath, 'a')
-            tmp = open(old, 'r')
-            f.write(tmp.read())
-            tmp.close()
-            f.close()
-            os.remove(old)
-        else:
-            shutil.move(f.name, endpath)
-        os.chmod(endpath, 0o644)
-
-if __name__ == '__main__':
-    install_cremona()
-    install_ellcurves()

Copied: sage-data-elliptic_curves/repos/community-any/spkg-install (from rev 186230, sage-data-elliptic_curves/trunk/spkg-install)
===================================================================
--- spkg-install	                        (rev 0)
+++ spkg-install	2016-08-09 18:06:17 UTC (rev 186231)
@@ -0,0 +1,88 @@
+#!/usr/bin/env python
+
+import os
+common_curves = os.path.join(os.getcwd(), 'src', 'common')
+
+def install_cremona():
+    from sqlite3 import connect
+
+    if 'SAGE_SHARE' not in os.environ:
+        raise RuntimeError("SAGE_SHARE undefined, maybe run `sage -sh`?")
+
+    cremona_root = os.path.join(os.environ['SAGE_SHARE'], 'cremona')
+    if not os.path.exists(cremona_root):
+        os.makedirs(cremona_root)
+
+    target = os.path.join(cremona_root, 'cremona_mini.db')
+
+    if os.path.exists(target):
+        os.remove(target)
+
+    con = connect(target)
+
+    con.execute('CREATE TABLE t_class(rank INTEGER, class TEXT PRIMARY KEY,'
+            ' conductor INTEGER)')
+    con.execute('CREATE TABLE t_curve(curve TEXT PRIMARY KEY, class TEXT, tors'
+            ' INTEGER, eqn TEXT UNIQUE)')
+    con.execute('CREATE INDEX i_t_class_conductor ON t_class(conductor)')
+    con.execute('CREATE INDEX i_t_curve_class ON t_curve(class)')
+
+    class_data = []
+    curve_data = []
+
+    for line in open(os.path.join(common_curves, 'allcurves.00000-09999')):
+        N, iso, num, eqn, r, tors = line.split()
+        cls = N + iso
+        cur = cls + num
+        if num == "1":
+            class_data.append((N, cls, r))
+        curve_data.append((cur, cls, eqn, tors))
+
+    con.executemany('INSERT INTO t_class(conductor,class,rank) VALUES'
+            ' (?,?,?)', class_data)
+    con.executemany('INSERT INTO t_curve(curve,class,eqn,tors) VALUES'
+            ' (?,?,?,?)', curve_data)
+
+    con.commit()
+
+def install_ellcurves():
+    import shutil, tempfile
+
+    if 'SAGE_SHARE' not in os.environ:
+        raise RuntimeError("SAGE_SHARE undefined, maybe run `sage -sh`?")
+
+    target = os.path.join(os.environ['SAGE_SHARE'], 'ellcurves')
+    if os.path.exists(target):
+        try:
+            shutil.rmtree(target)
+        except OSError:
+            os.remove(target)
+
+    shutil.move(os.path.join('src', 'ellcurves'), target)
+    rank = {}
+    for line in open(os.path.join(common_curves, 'allcurves.00000-09999')):
+        r = line.split()[4]
+        if r not in rank:
+            rank[r] = open(tempfile.mkstemp()[1], 'w')
+        rank[r].write(line)
+
+    for r, f in rank.items():
+        f.close()
+        endpath = os.path.join(target, 'rank' + r)
+        if os.path.exists(endpath):
+            old = tempfile.mkstemp()[1]
+            shutil.move(endpath, old)
+            shutil.move(f.name, endpath)
+            f = open(endpath, 'a')
+            tmp = open(old, 'r')
+            f.write(tmp.read())
+            tmp.close()
+            f.close()
+            os.remove(old)
+        else:
+            shutil.move(f.name, endpath)
+        os.chmod(endpath, 0o644)
+
+if __name__ == '__main__':
+    install_cremona()
+    install_ellcurves()



More information about the arch-commits mailing list