[arch-commits] Commit in sagemath/trunk (PKGBUILD env.patch test-optional.patch)

Antonio Rojas arojas at archlinux.org
Sat Oct 22 14:14:48 UTC 2016


    Date: Saturday, October 22, 2016 @ 14:14:48
  Author: arojas
Revision: 192974

Fix dependencies and conflicts, update patches

Modified:
  sagemath/trunk/PKGBUILD
  sagemath/trunk/env.patch
  sagemath/trunk/test-optional.patch

---------------------+
 PKGBUILD            |   27 +++++++++++++++------------
 env.patch           |   20 +++++++++++++++++++-
 test-optional.patch |   36 +++++++++++++++++++++++++-----------
 3 files changed, 59 insertions(+), 24 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-10-22 14:12:38 UTC (rev 192973)
+++ PKGBUILD	2016-10-22 14:14:48 UTC (rev 192974)
@@ -10,13 +10,13 @@
 pkgbase=sagemath
 pkgname=(sagemath sagemath-jupyter)
 pkgver=7.4
-pkgrel=1
+pkgrel=2
 pkgdesc="Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab"
 arch=(i686 x86_64)
 url="http://www.sagemath.org"
 license=(GPL)
-depends=(ipython2 cysignals ppl palp brial singular cliquer maxima-ecl gfan sympow tachyon python2-rpy2 nauty # fpylll
-  python2-matplotlib python2-scipy python2-sympy python2-networkx python2-pillow libgap flintqs lcalc lrcalc arb
+depends=(ipython2 cysignals ppl palp brial singular cliquer maxima-ecl gfan sympow tachyon python2-rpy2 nauty fpylll
+  python2-matplotlib python2-scipy python2-sympy python2-networkx python2-pillow python2-future libgap flintqs lcalc lrcalc arb
   eclib gmp-ecm zn_poly gd python2-cvxopt pynac linbox rubiks pari-galdata pari-seadata-small planarity rankwidth
   sage-data-combinatorial_designs sage-data-elliptic_curves sage-data-graphs sage-data-polytopes_db sage-data-conway_polynomials)
 optdepends=('cython2: to compile cython code' 'python2-pkgconfig: to compile cython code'
@@ -30,14 +30,11 @@
   'libhomfly: for computing the homfly polynomial of links' 'libbraiding: for computing in braid groups')
 makedepends=(cython2 boost ratpoints symmetrica fflas-ffpack python2-jinja coin-or-cbc libhomfly libbraiding
   mcqd coxeter3 cryptominisat modular_decomposition bliss-graphs tdlib python2-pkgconfig meataxe) # libfes
-conflicts=(sage-mathematics)
-replaces=(sage-mathematics)
-provides=(sage-mathematics)
 source=("$pkgname-$pkgver.tar.gz::https://github.com/sagemath/sage/archive/$pkgver.tar.gz"
         env.patch skip-check.patch cython-sys-path.patch is-package-installed.patch package.patch disable-fes.patch
         jupyter-path.patch test-optional.patch python-2.7.11.patch ecm-7.patch increase-rtol.patch sagemath-singular4.patch)
 md5sums=('8311ee35a309dbc668b5148795211254'
-         'b902f9e21dd13c2c9efea4803f003501'
+         '784ba3fca83f24ed0bbf62e01fa4e967'
          '6cafcb381437d4751fd55b25d5090987'
          'a1bcdd3fe620dbae60ed8b0e98b2ece7'
          '5dca842e4440e4ef235ae18c1b1f20e3'
@@ -44,7 +41,7 @@
          '493a9e0eae9b2ef87544b42785ae11ea'
          '06a67e611d10aa2381efe1f08ea4ffd9'
          '0d88207416dfb98a17bf8886257d9a02'
-         'cdcabd475b80afe0534a5621e972736e'
+         '921017fd2d9dadbb6b602ac0476bfd58'
          'ef927896f2071b442b1d07d7e69f5f3a'
          '0c9a57d35de80c2cd418ebec912efbbb'
          '39d3fded716d2a7ae0ab03e0896b7497'
@@ -65,7 +62,7 @@
 # supress warning about GAP install dir
   sed -e "s|gapdir = os.path.join(SAGE_LOCAL, 'gap', 'latest')|gapdir = '/usr/lib/gap'|" -i src/sage/libs/gap/util.pyx 
 # don't list optional packages when running tests
-# patch -p0 -i ../test-optional.patch
+  patch -p0 -i ../test-optional.patch
 # set jupyter path
   patch -p0 -i ../jupyter-path.patch
 # fix timeit with Python 2.7.11
@@ -75,7 +72,7 @@
 # fix regressions with ECM 7
   patch -p1 -i ../ecm-7.patch
 # increase numerical tolerance, needed by scipy 0.18
-# patch -p1 -i ../increase-rtol.patch
+  patch -p1 -i ../increase-rtol.patch
 
 # Upstream patches  
 # fix build against libfes 0.2 http://trac.sagemath.org/ticket/15209
@@ -100,6 +97,7 @@
   cd sage-$pkgver/src
 
   export SAGE_LOCAL="/usr"
+  export SAGE_ROOT="$PWD"
   export SAGE_SRC="$PWD"
   export CC=gcc
 
@@ -108,6 +106,10 @@
 
 package_sagemath() {
   optdepends+=('sagemath-jupyter: Jupyter kernel')
+  conflicts=(sage-mathematics)
+  replaces=(sage-mathematics) 
+  provides=(sage-mathematics)
+
   cd sage-$pkgver/src
 
   export SAGE_ROOT="$PWD"
@@ -129,8 +131,9 @@
   mkdir -p "$pkgdir"/usr/share/sage
   cp -r ext "$pkgdir"/usr/share/sage
   
-# Create SAGE_SRC, needed for the notebook
+# Create SAGE_SRC, needed for the notebook and help
   mkdir "$pkgdir"/usr/share/sage/source
+  ln -s /usr/share/doc/sage "$pkgdir"/usr/share/sage/source/doc
 
 # Remove sage_setup
   rm -r "$pkgdir"/usr/lib/python2.7/site-packages/sage_setup
@@ -141,7 +144,7 @@
 
 package_sagemath-jupyter() {
   pkgdesc='Jupyter kernel for SageMath'
-  depends=(sagemath python2-ipykernel jupyter-notebook mathjax thebe)
+  depends=(sagemath python2-jupyter_client jupyter-widgetsnbextension python-ipywidgets mathjax thebe)
   optdepends=('sage-notebook-exporter: convert flask notebooks to Jupyter')
 
   cd sage-$pkgver/src

Modified: env.patch
===================================================================
--- env.patch	2016-10-22 14:12:38 UTC (rev 192973)
+++ env.patch	2016-10-22 14:14:48 UTC (rev 192974)
@@ -52,6 +52,17 @@
  fi
  
  # sage-env must know where the Sage's script files are
+@@ -233,8 +233,8 @@
+ export SAGE_EXTCODE="$SAGE_SHARE/sage/ext"
+ export SAGE_SPKG_INST="$SAGE_LOCAL/var/lib/sage/installed"
+ export SAGE_LOGS="$SAGE_ROOT/logs/pkgs"
+-export SAGE_SRC="$SAGE_ROOT/src"
+-export SAGE_DOC_SRC="$SAGE_SRC/doc"
++export SAGE_SRC="$SAGE_SHARE/sage/source"
++export SAGE_DOC_SRC="$SAGE_SHARE/doc/sage"
+ export SAGE_DOC="$SAGE_SHARE/doc/sage"
+ 
+ if [ -z "${SAGE_ORIG_PATH_SET}" ]; then
 @@ -374,6 +337,9 @@
      export SAGE_STARTUP_FILE
  fi
@@ -62,7 +73,14 @@
  if [ -z "$IPYTHONDIR" ]; then
      # We hardcode a version number in the directory name. The idea is
      # that we keep using the same version number as long as that is
-
+@@ -468,7 +400,6 @@
+         fi
+     fi
+ fi
+-export MAXIMA_PREFIX="$SAGE_LOCAL"
+ 
+ PERL5LIB="$SAGE_LOCAL/lib/perl5:$PERL5LIB" && export PERL5LIB
+ 
 @@ -629,9 +608,6 @@
      LD_LIBRARY_PATH="$SAGE_LOCAL/bin:$LD_LIBRARY_PATH" && export LD_LIBRARY_PATH
  fi

Modified: test-optional.patch
===================================================================
--- test-optional.patch	2016-10-22 14:12:38 UTC (rev 192973)
+++ test-optional.patch	2016-10-22 14:14:48 UTC (rev 192974)
@@ -1,11 +1,25 @@
---- src/sage/doctest/control.py.orig	2015-10-31 09:40:55.173671531 +0100
-+++ src/sage/doctest/control.py	2015-10-31 09:40:05.370125436 +0100
-@@ -253,7 +253,7 @@
-                 if 'optional' in options.optional:
-                     options.optional.discard('optional')
-                     from sage.misc.package import package_versions
--                    optional_pkgs = package_versions("optional", local=True)
-+                    optional_pkgs = {}
-                     for pkg, versions in optional_pkgs.items():
-                         if versions[0] == versions[1]:
-                             options.optional.add(pkg)
+--- src/sage/doctest/control.py.orig       2016-10-20 19:39:53.714618246 +0200
++++ src/sage/doctest/control.py    2016-10-20 19:40:15.158049920 +0200
+@@ -307,22 +307,6 @@
+             if "all" in options.optional:
+                 # Special case to run all optional tests
+                 options.optional = True
+-            else:
+-                # We replace the 'optional' tag by all optional
+-                # packages for which the installed version matches the
+-                # latest available version (this implies in particular
+-                # that the package is actually installed).
+-                if 'optional' in options.optional:
+-                    options.optional.discard('optional')
+-                    from sage.misc.package import list_packages
+-                    for pkg in list_packages('optional', local=True).values():
+-                        if pkg['installed_version'] == pkg['remote_version']:
+-                            options.optional.add(pkg['name'])
+-
+-                # Check that all tags are valid
+-                for o in options.optional:
+-                    if not optionaltag_regex.search(o):
+-                        raise ValueError('invalid optional tag {!r}'.format(o))
+ 
+         self.options = options
+         self.files = args



More information about the arch-commits mailing list