1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id: Portfile 87112 2011-11-10 20:53:51Z snc@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup python 1.0 |
---|
6 | |
---|
7 | name py-psycopg2 |
---|
8 | version 2.4.2 |
---|
9 | python.versions 24 25 26 27 |
---|
10 | python.default_version 27 |
---|
11 | categories python databases |
---|
12 | maintainers snc openmaintainer |
---|
13 | license LGPL-3+ |
---|
14 | platforms darwin freebsd |
---|
15 | description A python DBAPI-2.0-compliant database adapter for postgresql |
---|
16 | long_description Psycopg2 is a postgresql database adapter for python. \ |
---|
17 | It's fully compliant to python's DBAPI-2.0. psycopg is \ |
---|
18 | designed for heavily multi-threaded applications \ |
---|
19 | featuring connection pooling. |
---|
20 | |
---|
21 | homepage http://www.initd.org/software/initd/psycopg/ |
---|
22 | |
---|
23 | set branch [join [lrange [split ${version} .] 0 1] -] |
---|
24 | master_sites http://www.psycopg.org/psycopg/tarballs/PSYCOPG-${branch}/ |
---|
25 | distname psycopg2-${version} |
---|
26 | |
---|
27 | checksums rmd160 ec0fe7573260773b5e701f00ea365a1b7d4cc329 \ |
---|
28 | sha256 16c2ad8b19039888354944c75f25da40c22f91a79d230ed2aedeabf9d3b585b9 |
---|
29 | |
---|
30 | if {$subport != $name} { |
---|
31 | depends_lib-append port:openssl |
---|
32 | |
---|
33 | patchfiles patch-setup.cfg.diff |
---|
34 | |
---|
35 | post-patch { |
---|
36 | |
---|
37 | if {[variant_isset postgresql83]} { |
---|
38 | reinplace \ |
---|
39 | s|@PG_CONFIG@|${prefix}/lib/postgresql83/bin/pg_config|g \ |
---|
40 | ${worksrcpath}/setup.cfg |
---|
41 | } |
---|
42 | |
---|
43 | if {[variant_isset postgresql84]} { |
---|
44 | reinplace \ |
---|
45 | s|@PG_CONFIG@|${prefix}/lib/postgresql84/bin/pg_config|g \ |
---|
46 | ${worksrcpath}/setup.cfg |
---|
47 | } |
---|
48 | |
---|
49 | if {[variant_isset postgresql90]} { |
---|
50 | reinplace \ |
---|
51 | s|@PG_CONFIG@|${prefix}/lib/postgresql90/bin/pg_config|g \ |
---|
52 | ${worksrcpath}/setup.cfg |
---|
53 | } |
---|
54 | |
---|
55 | if {[variant_isset postgresql91]} { |
---|
56 | reinplace \ |
---|
57 | s|@PG_CONFIG@|${prefix}/lib/postgresql91/bin/pg_config|g \ |
---|
58 | ${worksrcpath}/setup.cfg |
---|
59 | } |
---|
60 | } |
---|
61 | |
---|
62 | livecheck.type none |
---|
63 | } else { |
---|
64 | livecheck.url ${master_sites} |
---|
65 | livecheck.regex psycopg2-(\\d+(\\.\\d+)+)${extract.suffix} |
---|
66 | } |
---|
67 | |
---|
68 | |
---|
69 | if {![variant_isset postgresql83] && ![variant_isset postgresql84] && ![variant_isset postgresql90] && ![variant_isset postgresql91]} { |
---|
70 | default_variants +postgresql91 |
---|
71 | } |
---|
72 | |
---|
73 | variant postgresql83 conflicts postgresql84 postgresql90 postgresql91 description "Build using postgresql v8.3" { |
---|
74 | depends_lib-append port:postgresql83 |
---|
75 | } |
---|
76 | |
---|
77 | variant postgresql84 conflicts postgresql83 postgresql90 postgresql91 description "Build using postgresql v8.4" { |
---|
78 | depends_lib-append port:postgresql84 |
---|
79 | } |
---|
80 | |
---|
81 | variant postgresql90 conflicts postgresql83 postgresql84 postgresql91 description "Build using postgresql v9.0" { |
---|
82 | depends_lib-append port:postgresql90 |
---|
83 | } |
---|
84 | |
---|
85 | variant postgresql91 conflicts postgresql83 postgresql84 postgresql90 description "Build using postgresql v9.1" { |
---|
86 | depends_lib-append port:postgresql91 |
---|
87 | } |
---|