From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id ED5FC1381F3 for ; Wed, 3 Jul 2013 10:05:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7CA21E09A5; Wed, 3 Jul 2013 10:05:39 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EC7AAE09A4 for ; Wed, 3 Jul 2013 10:05:38 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C809D33E793 for ; Wed, 3 Jul 2013 10:05:37 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 95FE5E5459 for ; Wed, 3 Jul 2013 10:05:32 +0000 (UTC) From: "André Erdmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "André Erdmann" Message-ID: <1372845859.3585d9bf76990672a2fb2f75ac694ffe8345de0d.dywi@gentoo> Subject: [gentoo-commits] proj/R_overlay:master commit in: tests/static/ X-VCS-Repository: proj/R_overlay X-VCS-Files: tests/static/depres.py X-VCS-Directories: tests/static/ X-VCS-Committer: dywi X-VCS-Committer-Name: André Erdmann X-VCS-Revision: 3585d9bf76990672a2fb2f75ac694ffe8345de0d X-VCS-Branch: master Date: Wed, 3 Jul 2013 10:05:32 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 9581577a-ad68-4494-b3f2-1200b15ebe8d X-Archives-Hash: 2f484388844e3556ae2d1278faea91cd Message-ID: <20130703100532.NoHw0afgp9ZoGZIyBasmsMMvbSWCLf3hTAxGJ4s_59I@z> commit: 3585d9bf76990672a2fb2f75ac694ffe8345de0d Author: André Erdmann mailerd de> AuthorDate: Wed Jul 3 10:04:19 2013 +0000 Commit: André Erdmann mailerd de> CommitDate: Wed Jul 3 10:04:19 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=3585d9bf tests/static/depres: add examples from doc/rst --- tests/static/depres.py | 121 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 120 insertions(+), 1 deletion(-) diff --git a/tests/static/depres.py b/tests/static/depres.py index f72d3dd..873237e 100644 --- a/tests/static/depres.py +++ b/tests/static/depres.py @@ -6,6 +6,9 @@ # ready-to-use input for testing dependency resolution +EMPTY_STR = "" + +RESOLVE_AS_IGNORED = lambda s: ( s, EMPTY_STR ) DONT_RESOLVE = lambda s: ( s, None ) DONT_RESOLVE_TUPLE = lambda *S: tuple ( map ( DONT_RESOLVE, S ) ) @@ -17,6 +20,7 @@ DEPRES_DATA = { ( "fftw 2", ">=sci-libs/fftw-2" ), ( "fftw 2.1.5", ">=sci-libs/fftw-2.1.5:2.1" ), ), + 'slot0': ( ( "p0", "cat/pkg:*" ), DONT_RESOLVE ( "p0 !=2" ), @@ -31,8 +35,88 @@ DEPRES_DATA = { DONT_RESOLVE ( "p3 1." ), ( "p3 2.1.0", "cat/pkg:1" ), ( "p4 5.4.3.2.1", "cat/pkg:5=" ), + ( "p5 4", "cat/pkg:99/2" ), ), + 'empty': DONT_RESOLVE_TUPLE ( "fftw", ), + + # examples from doc/rst/usage.rst + 'example1': ( + ( "r 2.12", ">=dev-lang/R-2.12" ), + ( "R(>= 2.14)", ">=dev-lang/R-2.14" ), + ( "R [<2.10]", "= 1.3.1 && GDAL < 1.6.0 ' + '(until tested) library and PROJ.4 (proj >= 4.4.9)', + '( sci-libs/gdal sci-libs/proj )' + ), + ( + 'for building from source: GDAL >= 1.3.1 library ' + 'and PROJ.4 (proj >= 4.4.9)', + '( sci-libs/gdal sci-libs/proj )' + ), + ( + 'for building from source: GDAL >= 1.3.1 library ' + 'and PROJ.4(proj >= 4.4.9)', + '( sci-libs/gdal sci-libs/proj )' + ), + ( + 'for building from source: GDAL >= 1.6.0 library ' + 'and PROJ.4(proj >= 4.4.9)', + '( sci-libs/gdal sci-libs/proj )' + ), + DONT_RESOLVE ( "for building from source: GDAL AND PROJ" ), + ), + 'example4': ( + RESOLVE_AS_IGNORED ( "see README" ), + RESOLVE_AS_IGNORED ( "read INSTALL" ), + RESOLVE_AS_IGNORED ( + "Will use djmrgl or rgl packages for rendering if present" + ), + ), + 'example5': ( + ( "fftw", "sci-libs/fftw" ), + DONT_RESOLVE ( "fftw 2" ), + ( "fftw 2.1", "sci-libs/fftw:2.1" ), + ( "fftw 2.1.2", "sci-libs/fftw:2.1" ), + ( "fftw 2.1.3", "sci-libs/fftw:2.1" ), + ( "fftw [ <=2.2]", "sci-libs/fftw:2.2" ), + ( "fftw (=3.0)", "sci-libs/fftw:3.0" ), + # !! + ( "fftw (=3.2)", "sci-libs/fftw:3.2" ), + DONT_RESOLVE ( "fftw ( != 5 )" ), + ), + 'example6': ( + ( "fftw", "sci-libs/fftw" ), + DONT_RESOLVE ( "fftw 2" ), + ( "fftw 2.1", "sci-libs/fftw:2.1" ), + ( "fftw 2.1.2", "sci-libs/fftw:2.1" ), + ( "fftw 2.1.3", "sci-libs/fftw:2.1" ), + DONT_RESOLVE ( "fftw [ <=2.2]" ), + ( "fftw (=3.0)", "sci-libs/fftw:3.0" ), + # !! + DONT_RESOLVE ( "fftw (=3.2)" ), + DONT_RESOLVE ( "fftw ( != 5 )" ), + ), + 'example5+6' : 'example5', + 'example7': ( + DONT_RESOLVE ( "fftw (=2.1)" ), + ( "fftw (=3.0)", "sci-libs/fftw:3.0" ), + ( "fftw (=3.1)", "sci-libs/fftw:3.0" ), + ( "fftw (=3.2)", "sci-libs/fftw:3.0" ), + ( "fftw (=3.3)", "sci-libs/fftw:3.0" ), + ), + } # dict , ( ^m ) @@ -42,20 +126,55 @@ DEPRES_RULES = { '~sci-libs/fftw:+v:s=..1 :: fftw', '~sci-libs/fftw :: fftw', ), + 'slot0': ( '~cat/pkg:open:* :: p0', '~cat/pkg:open: :: p1', '~cat/pkg:with_version:s=..1:/2 :: p2', '~cat/pkg:s=1 :: p3', '~cat/pkg:= :: p4', + '~cat/pkg:s=i99:/i2 :: p5', ), + 'empty': (), + + # examples from doc/rst/usage.rst + 'example1': ( + '~dev-lang/R :: R', + ), + 'example2': ( + 'zoo', + ), + 'example3': ( + '( sci-libs/gdal sci-libs/proj ) {', + 'for building from source: GDAL >= 1.3.1 && GDAL < 1.6.0 (until tested) library and PROJ.4 (proj >= 4.4.9)', + 'for building from source: GDAL >= 1.3.1 library and PROJ.4 (proj >= 4.4.9)', + 'for building from source: GDAL >= 1.3.1 library and PROJ.4(proj >= 4.4.9)', + 'for building from source: GDAL >= 1.6.0 library and PROJ.4(proj >= 4.4.9)', + '}', + ), + 'example4': ( + '! {', + 'see README', + 'read INSTALL', + 'Will use djmrgl or rgl packages for rendering if present', + '}', + ), + 'example5': ( + '~sci-libs/fftw:s=0..1 :: fftw', + ), + 'example6': ( + '~sci-libs/fftw:s=0..1:restrict=2.1,3.0: :: fftw', + ), + 'example7': ( + '~sci-libs/fftw:s=i3.0:r=3.0,3.1,3.2,3.3 :: fftw', + ), } # dict , > # datasets not listed here default to as DEPRES_INCLUDE = { - #"fftw": "fftw", + 'example5+6': ( "example5", "example6", ), } #DEPRES_FAULTY_RULES=...