diff options
author | Joseph Koshy <jkoshy@FreeBSD.org> | 2006-06-16 13:50:45 +0000 |
---|---|---|
committer | Joseph Koshy <jkoshy@FreeBSD.org> | 2006-06-16 13:50:45 +0000 |
commit | 5952f9e33569c024ce577dbae4f7581e2ce8fac6 (patch) | |
tree | 6f494755d06182a837cc62b5c79d6a0a3edd9f82 /devel/py-yaml | |
parent | 74ab11eb1b9f83ad65e9e7b98fa05267d1e021ed (diff) | |
download | ports-5952f9e33569c024ce577dbae4f7581e2ce8fac6.tar.gz ports-5952f9e33569c024ce577dbae4f7581e2ce8fac6.zip |
Notes
Diffstat (limited to 'devel/py-yaml')
-rw-r--r-- | devel/py-yaml/Makefile | 1 | ||||
-rw-r--r-- | devel/py-yaml/files/patch-lib_yaml_constructor.py | 12 | ||||
-rw-r--r-- | devel/py-yaml/files/patch-lib_yaml_representer.py | 20 |
3 files changed, 33 insertions, 0 deletions
diff --git a/devel/py-yaml/Makefile b/devel/py-yaml/Makefile index 96aed5927396..5e4048db29d6 100644 --- a/devel/py-yaml/Makefile +++ b/devel/py-yaml/Makefile @@ -8,6 +8,7 @@ PORTNAME= yaml PORTVERSION= 3.02 +PORTREVISION= 1 CATEGORIES= devel python MASTER_SITES= http://pyyaml.org/download/pyyaml/ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} diff --git a/devel/py-yaml/files/patch-lib_yaml_constructor.py b/devel/py-yaml/files/patch-lib_yaml_constructor.py new file mode 100644 index 000000000000..896ae5da0565 --- /dev/null +++ b/devel/py-yaml/files/patch-lib_yaml_constructor.py @@ -0,0 +1,12 @@ +Index: lib/yaml/constructor.py +=================================================================== +--- pyyaml/trunk/lib/yaml/constructor.py (revision 147) ++++ pyyaml/trunk/lib/yaml/constructor.py (revision 168) +@@ -232,5 +232,7 @@ + return sign*int(value) + +- inf_value = 1e300000 ++ inf_value = 1e300 ++ while repr(inf_value) != repr(inf_value*inf_value): ++ inf_value *= inf_value + nan_value = inf_value/inf_value diff --git a/devel/py-yaml/files/patch-lib_yaml_representer.py b/devel/py-yaml/files/patch-lib_yaml_representer.py new file mode 100644 index 000000000000..3a2ce8ff842b --- /dev/null +++ b/devel/py-yaml/files/patch-lib_yaml_representer.py @@ -0,0 +1,20 @@ +Index: lib/yaml/representer.py +=================================================================== +--- pyyaml/trunk/lib/yaml/representer.py (revision 152) ++++ pyyaml/trunk/lib/yaml/representer.py (revision 168) +@@ -193,7 +193,12 @@ + return self.represent_scalar(u'tag:yaml.org,2002:int', unicode(data)) + +- repr_pos_inf = repr(1e300000) +- repr_neg_inf = repr(-1e300000) +- repr_nan = repr(1e300000/1e300000) ++ inf_value = 1e300 ++ while repr(inf_value) != repr(inf_value*inf_value): ++ inf_value *= inf_value ++ nan_value = inf_value/inf_value ++ ++ repr_pos_inf = repr(inf_value) ++ repr_neg_inf = repr(-inf_value) ++ repr_nan = repr(inf_value/inf_value) + + def represent_float(self, data): |