source: trunk/dports/python/py-openslide/Portfile

Last change on this file was 149329, checked in by bgilbert@…, 16 months ago

py-openslide: Update to 1.1.1

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.8 KB
Line 
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 149329 2016-06-12 05:45:10Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           python 1.0
6PortGroup           github 1.0
7
8github.setup        openslide openslide-python 1.1.1 v
9name                py-openslide
10categories-append   graphics
11platforms           darwin
12license             LGPL-2.1 MIT BSD
13maintainers         bgilbert
14
15python.versions     27 34 35
16python.default_version  27
17
18description         Python binding for the OpenSlide library.
19
20long_description    OpenSlide Python allows the OpenSlide library to be \
21                    used from Python programs.  OpenSlide provides a simple \
22                    interface for reading whole-slide images, also known as \
23                    virtual slides, which are high-resolution images used in \
24                    digital pathology.  These images can occupy tens of \
25                    gigabytes when uncompressed, and so cannot be easily \
26                    read using standard tools or libraries, which are \
27                    designed for images that can be comfortably uncompressed \
28                    into RAM.  Whole-slide images are typically \
29                    multi-resolution\; OpenSlide allows reading a small \
30                    amount of image data at the resolution closest to a \
31                    desired zoom level.
32
33homepage            http://openslide.org/
34github.tarball_from releases
35use_xz              yes
36
37checksums           rmd160  badc962f1e057f1c2df8bcbfada4a110c083589e \
38                    sha256  e3c1f27e4704221327d3c74b0960742079b18fea2d1896eda71a3efdd3f9d3f7
39
40if {${name} ne ${subport}} {
41    depends_build       port:py${python.version}-sphinx
42    # py-flask is only needed for the examples.
43    # On Python 2.x, we can use either PIL or Pillow.
44    depends_lib-append  port:openslide \
45                        port:py${python.version}-flask \
46                        path:${frameworks_dir}/Python.framework/Versions/${python.branch}/lib/python${python.branch}/site-packages/PIL/Image.py:py${python.version}-Pillow
47
48    livecheck.type      none
49
50    build.target-append build_sphinx
51    test.run            yes
52
53    patchfiles          patch-disable-find_library-fallback.diff
54
55    post-patch {
56        reinplace "s|@@PREFIX@@|${prefix}|g" \
57            ${worksrcpath}/openslide/lowlevel.py
58    }
59
60    post-destroot {
61        set docdir ${prefix}/share/doc/${subport}
62        xinstall -m 644 -W ${worksrcpath} \
63            CHANGELOG.txt \
64            LICENSE.txt \
65            lgpl-2.1.txt \
66            ${destroot}${docdir}
67        file copy ${worksrcpath}/build/sphinx/html ${destroot}${docdir}
68        # Empty examples directory created by python portgroup
69        file delete ${destroot}${docdir}/examples
70        file copy ${worksrcpath}/examples ${destroot}${docdir}
71    }
72}
Note: See TracBrowser for help on using the repository browser.