[python-polybori] Rebuild for new m4ri. Fix a broken python import that crashes the GUI.
Jerry James
jjames at fedoraproject.org
Fri Jun 17 20:40:26 UTC 2011
commit e61487219c5cbb1b6211ee44b8185e31ac11e513
Author: Jerry James <loganjerry at gmail.com>
Date: Fri Jun 17 14:38:47 2011 -0600
Rebuild for new m4ri.
Fix a broken python import that crashes the GUI.
polybori-import.patch | 27 +++++++++++++++++++++++++++
polybori-m4ri.patch | 35 +++++++++++++++++------------------
python-polybori.spec | 15 +++++++++++----
3 files changed, 55 insertions(+), 22 deletions(-)
---
diff --git a/polybori-import.patch b/polybori-import.patch
new file mode 100644
index 0000000..1588ea9
--- /dev/null
+++ b/polybori-import.patch
@@ -0,0 +1,27 @@
+--- ./pyroot/polybori/fglm.py.orig 2011-04-27 05:00:31.000000000 -0600
++++ ./pyroot/polybori/fglm.py 2011-06-17 14:22:13.594457573 -0600
+@@ -1,5 +1,5 @@
+ from polybori.PyPolyBoRi import BooleSet, Polynomial, BoolePolynomialVector, FGLMStrategy,\
+- get_order_code, dp_asc, global_ring, Variable, Monomial, Ring, change_ordering
++ get_order_code, OrderCode, global_ring, Variable, Monomial, Ring, change_ordering
+ from polybori.blocks import declare_ring
+ def fglm(I, from_ring, to_ring):
+ """
+@@ -9,7 +9,7 @@
+ >>> r=declare_ring(['x','y','z'],dict())
+ >>> (x,y,z)=[Variable(i) for i in xrange(3)]
+ >>> old_ring=global_ring()
+- >>> change_ordering(dp_asc)
++ >>> change_ordering(OrderCode.dp_asc)
+ >>> new_ring=global_ring()
+ >>> ideal=[x+z, y+z]# lp Groebner basis
+ >>> list(fglm(ideal, old_ring, new_ring))
+@@ -39,7 +39,7 @@
+ >>> variables=BooleSet([x(1),x(2),x(3)])
+ >>> m_k_plus_one(s,variables)
+ x(2)*x(3)
+- >>> change_ordering(dp_asc)
++ >>> change_ordering(OrderCode.dp_asc)
+ >>> m_k_plus_one(s,variables)
+ x(1)*x(3)
+ """
diff --git a/polybori-m4ri.patch b/polybori-m4ri.patch
index 60ca0d4..d81bd77 100644
--- a/polybori-m4ri.patch
+++ b/polybori-m4ri.patch
@@ -1,34 +1,33 @@
---- groebner/src/fglm.h.orig 2011-02-23 07:59:49.000000000 -0700
-+++ groebner/src/fglm.h 2011-04-21 14:26:44.651349074 -0600
-@@ -12,6 +12,7 @@
- #include <BooleEnv.h>
- #include "groebner_alg.h"
- extern "C" {
-+#include <m4ri/config.h>
- #include <m4ri/m4ri.h>
- }
- BEGIN_NAMESPACE_PBORIGB
---- groebner/src/nf.h.orig 2011-02-23 07:59:49.000000000 -0700
-+++ groebner/src/nf.h 2011-04-21 14:27:05.777606878 -0600
-@@ -12,7 +12,8 @@
+--- ./groebner/src/nf.h.orig 2011-04-27 05:00:31.000000000 -0600
++++ ./groebner/src/nf.h 2011-06-17 13:34:00.506457539 -0600
+@@ -12,7 +12,7 @@
#include "groebner_alg.h"
#if HAVE_M4RI
extern "C"{
-#include "m4ri/m4ri.h"
-+#include <m4ri/config.h>
+#include <m4ri/m4ri.h>
}
#endif
#ifndef PBORI_GB_NF_H
---- PyPolyBoRi/main_wrapper.cc.orig 2011-02-23 07:59:49.000000000 -0700
-+++ PyPolyBoRi/main_wrapper.cc 2011-04-21 14:29:43.021314973 -0600
-@@ -22,8 +22,10 @@
+--- ./groebner/src/nf.cc.orig 2011-04-27 05:00:31.000000000 -0600
++++ ./groebner/src/nf.cc 2011-06-17 13:34:24.528457537 -0600
+@@ -63,7 +63,7 @@
+
+ static int log2_floor(int n){
+ int i;
+- for(i=0;TWOPOW(i)<=n;i++){}
++ for(i=0;__M4RI_TWOPOW(i)<=n;i++){}
+ return i-1;
+ }
+ static int optimal_k_for_multiplication(int a,int b,int c,const GroebnerStrategy& strat){
+--- ./PyPolyBoRi/main_wrapper.cc.orig 2011-04-27 05:00:31.000000000 -0600
++++ ./PyPolyBoRi/main_wrapper.cc 2011-06-17 13:34:00.506457539 -0600
+@@ -22,8 +22,9 @@
#ifdef HAVE_M4RI
#define PACKED 1
extern "C"{
-#include "m4ri/packedmatrix.h"
-#include "m4ri/grayflex.h"
-+#include <m4ri/config.h>
+#include <m4ri/misc.h>
+#include <m4ri/packedmatrix.h>
+#include <m4ri/grayflex.h>
diff --git a/python-polybori.spec b/python-polybori.spec
index c66ab89..440e675 100644
--- a/python-polybori.spec
+++ b/python-polybori.spec
@@ -1,6 +1,6 @@
Name: python-polybori
Version: 0.7.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Framework for Boolean Rings
Group: Development/Libraries
License: GPLv2+
@@ -9,8 +9,10 @@ Source0: http://downloads.sourceforge.net/polybori/polybori-%{version}.ta
Source1: polybori.desktop
# Use system CUDD libraries instead of building the included CUDD sources
Patch0: polybori-dont-build-libcudd.patch
-# Adapt include file statements for m4ri 20100817
+# Adapt to m4ri 20110613
Patch1: polybori-m4ri.patch
+# Fix a broken import
+Patch2: polybori-import.patch
BuildRequires: boost-devel
BuildRequires: cudd-devel
@@ -82,8 +84,9 @@ Static libraries for %{name}.
%prep
%setup -q -n polybori-0.7
-%patch0 -b .orig
-%patch1 -b .orig
+%patch0
+%patch1
+%patch2
# Save a doc file
mv Singular/README README.Singular
@@ -198,6 +201,10 @@ fi
%changelog
+* Fri Jun 17 2011 Jerry James <loganjerry at gmail.com> - 0.7.1-2
+- Rebuild for new m4ri
+- Fix a broken python import that crashes the GUI
+
* Mon May 23 2011 Jerry James <loganjerry at gmail.com> - 0.7.1-1
- New upstream version
More information about the scm-commits
mailing list