Ticket #24485: appengine.patch

File appengine.patch, 1.8 KB (added by singingwolfboy@…, 15 years ago)
  • Portfile

    old new  
    66
    77name                    py26-googleappengine
    88version                 1.3.2
     9revision                1
    910categories-append       devel www
    1011maintainers             snc openmaintainer
    1112description             The Google App Engine Python SDK
     
    2324                    sha1    9390f8250ef4d7acdf7ff42a7eab8f3646ade9f6 \
    2425                    rmd160  dea73e8b0a0fe4e04a7262125cd115170d9a6310
    2526
     27# contents of lib directory, minus cacerts
     28depends_lib-append      port:py26-antlr3 \
     29                        port:py26-django \
     30                        port:py26-ipaddr \
     31                        port:py26-webob \
     32                        port:py26-yaml
     33
     34set python.branch       2.6
     35set python.prefix       ${frameworks_dir}/Python.framework/Versions/${python.branch}
     36set python.pkgd ${python.prefix}/lib/python${python.branch}/site-packages
     37
    2638destroot {
     39    # delete libs (already installed, due to dependencies)
     40    file delete -force \
     41        ${worksrcpath}/lib/antlr3 \
     42        ${worksrcpath}/lib/django \
     43        ${worksrcpath}/lib/ipaddr \
     44        ${worksrcpath}/lib/webob \
     45        ${worksrcpath}/lib/yaml
     46    # delete tools dir (deprecated)
     47    file delete -force ${worksrcpath}/tools
     48    # install modified work directory into destroot
    2749    file rename ${worksrcpath} ${destroot}${prefix}/share/${worksrcdir}
     50   
     51    # add this directory to the Python path, so we can import google
     52    xinstall -d ${destroot}${python.pkgd}
     53    set fp [open "${destroot}${python.pkgd}/googleappengine.pth" "w"]
     54    puts $fp "${prefix}/share/${worksrcdir}"
     55    close $fp
    2856}
    2957build {}
    3058