Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
cython: upgrade to 0.20
Browse files Browse the repository at this point in the history
  • Loading branch information
ohanar committed Jan 28, 2014
1 parent 1bd3319 commit 019d4d0
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 106 deletions.
50 changes: 0 additions & 50 deletions build/pkgs/cython/SPKG.txt
Expand Up @@ -28,53 +28,3 @@ Apache License, Version 2.0

== Dependencies ==
* Python

== Changelog ==

=== cython-0.19.1.p0 (R. Andrew Ohana, 11 May 2013, #14570) ===
* Add build_dir.patch

=== cython-0.19.1 (R. Andrew Ohana, 11 May 2013, #14569) ===
* Upgrade Cython 0.19.1
* Remove deps.patch and restrict.patch

=== cython-0.19.p1 (Robert Bradshaw, 7 May 2013, #14544) ===
* Add deps.patch.

=== cython-0.19.p0 (Jeroen Demeyer, 19 April 2013, #14452) ===
* Upgrade Cython to 0.19
* Add restrict.patch.

=== cython-0.17.4 (Robert Bradshaw, 4 January 2013, #13896) ===
* Upgrade Cython 0.17.4

=== cython-0.17.3 (Volker Braun, 14 December 2012, #13832) ===
* Upgrade Cython 0.17.3

=== cython-0.17.2 (Volker Braun, 21 November 2012, #13740) ===
* Upgrade Cython 0.17.2

=== cython-0.17pre (Robert Bradshaw, 25 June 2012, #13029) ===
* Upgrade Cython to 0.17 prerelease.

=== cython-0.15.1 (Robert Bradshaw, 3 October 2011, #11761) ===
* Upgrade Cython to 0.15.1

=== cython-0.14.1.p3 (Robert Bradshaw, 1 March 2011, #10493) ===
* Upgrade Cython to 0.14.1
* Disable (broken) temp arg assignments.

=== cython-0.13.p1 (Robert Bradshaw, 1 October 2010) ===
* Removed __getattr__ hack (upstreamed).

=== cython-0.13.p0 (Robert Bradshaw, 16 September 2010) ===
* New upstream release.
* Add a patch to speed up __getattr__().
* Minor clean-up in spkg-install.
* SPKG.txt reformatted to 80 columns; Changelog section added.

=== cython-0.12.1 ===

See Mercurial repository for a few changes previously made; most of the rest is
"lost".

8 changes: 4 additions & 4 deletions build/pkgs/cython/checksums.ini
@@ -1,4 +1,4 @@
tarball=cython-VERSION.tar.bz2
sha1=9728545db586559ff736a18183c57e419ad18b4a
md5=7838eac2e779d60fe4eefab920f54f31
cksum=650483743
tarball=Cython-VERSION.tar.gz
sha1=fb22442bd23acb26b6a803bad0dd6746cbb602f3
md5=6563dad21e2b5e31f9f7262a60dd0550
cksum=988879217
2 changes: 1 addition & 1 deletion build/pkgs/cython/package-version.txt
@@ -1 +1 @@
0.19.1.p0
0.20.p0
42 changes: 42 additions & 0 deletions build/pkgs/cython/patches/01-revert_list_mul.patch
@@ -0,0 +1,42 @@
diff --git a/Cython/Compiler/Optimize.py b/Cython/Compiler/Optimize.py
index cefcef4..f1a55e2 100644
--- a/Cython/Compiler/Optimize.py
+++ b/Cython/Compiler/Optimize.py
@@ -3378,22 +3378,25 @@ class ConstantFolding(Visitor.VisitorTransform, SkipDeclarations):
return new_node

def visit_MulNode(self, node):
- self._calculate_const(node)
if isinstance(node.operand1, (ExprNodes.ListNode, ExprNodes.TupleNode)):
- return self._calculate_constant_seq(node.operand1, node.operand2)
+ sequence_node = node.operand1
+ factor = node.operand2
+ self._calculate_const(factor)
+ if factor.constant_result != 1 and sequence_node.args:
+ sequence_node.mult_factor = factor
+ self.visitchildren(sequence_node)
+ return sequence_node
if isinstance(node.operand1, ExprNodes.IntNode) and \
- isinstance(node.operand2, (ExprNodes.ListNode, ExprNodes.TupleNode)):
- return self._calculate_constant_seq(node.operand2, node.operand1)
+ isinstance(node.operand2, (ExprNodes.ListNode, ExprNodes.TupleNode)):
+ sequence_node = node.operand2
+ factor = node.operand1
+ self._calculate_const(factor)
+ if factor.constant_result != 1 and sequence_node.args:
+ sequence_node.mult_factor = factor
+ self.visitchildren(sequence_node)
+ return sequence_node
return self.visit_BinopNode(node)

- def _calculate_constant_seq(self, sequence_node, factor):
- if factor.constant_result != 1 and sequence_node.args:
- if isinstance(factor.constant_result, (int, long)) and factor.constant_result <= 0:
- del sequence_node.args[:]
- factor = None
- sequence_node.mult_factor = factor
- return sequence_node
-
def visit_PrimaryCmpNode(self, node):
# calculate constant partial results in the comparison cascade
self.visitchildren(node, ['operand1'])
31 changes: 0 additions & 31 deletions build/pkgs/cython/patches/build_dir.patch

This file was deleted.

20 changes: 0 additions & 20 deletions build/pkgs/cython/patches/gdbout.patch

This file was deleted.

0 comments on commit 019d4d0

Please sign in to comment.