PortSystem 1.0
PortGroup python 1.0

name                    py-psyco
version                 1.6
supported_archs         i386
license                 MIT
maintainers             {jmr @jmroot} openmaintainer
description             a python specializing compiler
long_description        Psyco is a Python extension module which can \
                        massively speed up the execution of any Python code.

homepage                http://psyco.sourceforge.net/
master_sites            sourceforge:project/psyco/psyco/${version}/
distname                psyco-${version}-src
checksums               md5 8816fca8ba521e05d18dde3e1a11b0bd \
                        sha1 3c1ffa70b1a37bd855454d41d41a830e9ea82e7d \
                        rmd160 472669a7a3714aae63710fd9bc5322b4b5214944
worksrcdir              psyco-${version}

python.versions         26

if {$subport ne $name} {
    extract.post_args       "| tar -xf - --exclude '.cvsignore'"

    pre-fetch {
        if {${os.arch} ne "i386"} {
            return -code error "psyco only works on Intel machines"
        }
    }
    
    if {${build_arch} eq "x86_64"} {
        set interp_path ${python.prefix}/Resources/Python.app/Contents/MacOS/Python
        notes "Since MacPorts is configured to build for the x86_64 architecture where\
possible and psyco can only be built for i386, you will probably need\
to run python like this to use psyco:

arch -i386 $interp_path"
    }

    post-destroot {
            xinstall -m 644 -W ${worksrcpath} README.txt \
                     ${destroot}${prefix}/share/doc/${subport}
            file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${subport}/
    }
}

livecheck.type          none
