summaryrefslogtreecommitdiff
path: root/libre/sagemath/package.patch
diff options
context:
space:
mode:
Diffstat (limited to 'libre/sagemath/package.patch')
-rw-r--r--libre/sagemath/package.patch37
1 files changed, 33 insertions, 4 deletions
diff --git a/libre/sagemath/package.patch b/libre/sagemath/package.patch
index b2a0d2dcf..ef449fdf3 100644
--- a/libre/sagemath/package.patch
+++ b/libre/sagemath/package.patch
@@ -1,11 +1,40 @@
--- src/sage/misc/package.py.orig 2014-11-23 15:58:13.000000000 +0100
+++ src/sage/misc/package.py 2015-01-22 20:32:25.651383902 +0100
-@@ -204,7 +204,7 @@
- Otherwise, installing "pillow" will cause this function to think
- that "pil" is installed, for example.
+@@ -343,7 +343,7 @@
+ sage: for pkg in list_packages('pip', local=True):
+ ....: assert not is_package_installed(pkg)
"""
-- return any(p.split('-')[0] == package for p in installed_packages())
+- return any(p.split('-')[0] == package for p in installed_packages(exclude_pip))
+ return True
def package_versions(package_type, local=False):
r"""
+--- src/sage_setup/optional_extension.py.orig 2016-10-19 18:35:10.092577510 +0000
++++ src/sage_setup/optional_extension.py 2016-10-19 18:38:13.514765366 +0000
+@@ -21,8 +21,6 @@
+ from distutils.extension import Extension
+ from sage.misc.package import is_package_installed, list_packages
+
+-all_packages = list_packages(local=True)
+-
+
+ class CythonizeExtension(Extension):
+ """
+@@ -75,15 +73,7 @@
+ try:
+ condition = kwds.pop("condition")
+ except KeyError:
+- pkg = kwds.pop("package")
+- try:
+- pkginfo = all_packages[pkg]
+- except KeyError:
+- # Might be an installed old-style package
+- condition = is_package_installed(pkg)
+- else:
+- condition = (pkginfo["installed_version"] == pkginfo["remote_version"])
+-
++ condition = True
+ if condition:
+ return Extension(*args, **kwds)
+ else:
+