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

Last change on this file was 147765, checked in by eborisch@…, 20 months ago

py-h5py-devel: Fix logic.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.3 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 147765 2016-04-15 17:05:27Z ryandesign@macports.org $
3
4PortSystem              1.0
5PortGroup               github 1.0
6PortGroup               python 1.0
7PortGroup               mpi 1.0
8
9github.setup            h5py h5py 2.6.0
10name                    py-h5py
11revision                0
12# h5py needs to be re-built after hdf5 upgrades
13
14platforms               darwin
15license                 BSD
16maintainers             eborisch openmaintainer
17
18description             Read and write HDF5 files from Python
19
20long_description  \
21    The h5py package provides both a high- and low-level interface to the \
22    HDF5 library from Python. The low-level interface is intended to be a \
23    complete wrapping of the HDF5 API, while the high-level component \
24    supports  access to HDF5 files, datasets and groups using established \
25    Python and NumPy concepts. \
26    \n\nA strong emphasis on automatic conversion between Python (Numpy) \
27    datatypes and data structures and their HDF5 equivalents vastly \
28    simplifies the process of reading and writing data from Python.
29
30homepage                http://www.h5py.org
31
32# Support for -devel
33set DEV_VERSION     0
34
35subport                 py26-h5py-devel {set DEV_VERSION 26}
36subport                 py27-h5py-devel {set DEV_VERSION 27}
37subport                 py33-h5py-devel {set DEV_VERSION 33}
38subport                 py34-h5py-devel {set DEV_VERSION 34}
39subport                 py35-h5py-devel {set DEV_VERSION 35}
40
41python.versions     26 27 33 34 35
42
43if {${DEV_VERSION}} {
44    checksums \
45        rmd160  937ec9ac2cfc290025ebdada30f35a021cb12efc \
46        sha256  b2872862d1d5afd3d34fc831a5feae394516683996c22f73c3eccc5fcd4cdb89
47} else {
48    checksums \
49        rmd160  f9a975c3a4fdac3f06cae38e8b5bcc565d90a61a \
50        sha256  62bf69569d685f4eda7fbbcfb1be76dd769e593058f5f0f466434b7240127c42
51}
52
53if {${DEV_VERSION}} {
54    python.version          ${DEV_VERSION}
55    # epoch was already set to a date; continuing with that approach
56    epoch                   20160412
57    github.setup            h5py h5py 8e58fa6
58    name                    py${python.version}-h5py-devel
59    conflicts               py${python.version}-h5py
60} elseif {${name} ne ${subport}} {
61    conflicts               py${python.version}-h5py-devel
62}
63
64python.default_version 27
65
66if {${name} ne ${subport} || ${DEV_VERSION}} {
67    depends_build-append    port:py${python.version}-cython
68
69    depends_lib-append      port:py${python.version}-numpy \
70                            port:py${python.version}-six \
71                            port:py${python.version}-pkgconfig \
72                            port:hdf5
73
74
75    post-destroot {
76        system -W ${destroot}${prefix} "mkdir -p share/doc/${subport}"
77        copy ${worksrcpath}/lzf/LICENSE.txt \
78            ${destroot}${prefix}/share/doc/${subport}
79    }
80
81    # Add MPI support
82    mpi.setup
83    if {[mpi_variant_isset]} {
84        build.env-append        DISTUTILS_DEBUG=1
85        depends_lib-append      port:py${python.version}-mpi4py
86        mpi.enforce_variant     hdf5 \
87                                py${python.version}-mpi4py
88
89        use_configure           yes
90        configure.cmd           ${build.cmd} configure
91        configure.args          --mpi
92        configure.pre_args
93    }
94
95    livecheck.type          none
96}
Note: See TracBrowser for help on using the repository browser.