Skip to content
Permalink
Browse files

py-pydicom: Update to 1.0.1; Add compat port

The library name itself (within python) changed from dicom to pydiom to
match the package. Added new (old library naming) py-dicom package as a
compatibility option. (In keeping with PyPi.)
  • Loading branch information
eborisch committed Mar 5, 2018
1 parent ed14f54 commit 0a527e99a40093f5549d9ac7df01a2c92e788224
Showing with 68 additions and 24 deletions.
  1. +53 −0 python/py-dicom/Portfile
  2. +15 −24 python/py-pydicom/Portfile
@@ -0,0 +1,53 @@
# -*- 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

PortSystem 1.0
PortGroup python 1.0
PortGroup github 1.0
github.setup pydicom pydicom 0.9.9.post1 v
name py-dicom
python.versions 27
platforms darwin
license MIT BSD
maintainers eborisch \
openmaintainer
supported_archs noarch

description Python Module for working with DICOM files

long_description pydicom is a pure python package for working with DICOM \
files. It was made for inspecting and modifying DICOM \
files in an easy pythonic way. The modifications can be \
written again to a new file. As a pure python package, it \
should run anywhere python runs without any other \
requirements.

checksums \
rmd160 dfcbce2681e92b0da9c29973d6e08a6c3a2effc0 \
sha256 2d7f1460c61a8cd85c59096dfe7aa1a292a4d33298e446e6015d32c9ba9ad845

if {${name} ne ${subport}} {
depends_lib-append port:py${python.version}-numpy
depends_build-append port:py${python.version}-sphinx

worksrcdir ${distname}/source

post-extract {
reinplace s/sphinx-build/sphinx-build-${python.branch}/ \
../docs/Makefile
}

post-build {
system -W ${worksrcpath}/../docs/ \
"make html"
}

post-destroot {
set DOCDIR ${destroot}${prefix}/share/doc/${subport}
xinstall -d ${DOCDIR}
file copy ${worksrcpath}/dicom/license.txt ${DOCDIR}
file copy ${worksrcpath}/../docs/release-notes.txt ${DOCDIR}
file copy ${worksrcpath}/../docs/_build/html ${DOCDIR}
}

notes "Port exists for compatibility. Ongoing development in pyNN-pydicom."
}
@@ -3,10 +3,9 @@
PortSystem 1.0
PortGroup python 1.0
PortGroup github 1.0
github.setup darcymason pydicom 0.9.9 v
github.setup pydicom pydicom 1.0.2 v
name py-pydicom
version 0.9.9
python.versions 27
python.versions 27 34 35 36
platforms darwin
license MIT BSD
maintainers eborisch \
@@ -22,35 +21,27 @@ long_description pydicom is a pure python package for working with DICOM \
should run anywhere python runs without any other \
requirements.

homepage http://www.pydicom.org
homepage https://pydicom.github.io/pydicom/stable/index.html

checksums \
rmd160 8505bfd7f10f861508e89736ec8771834f2f6492 \
sha256 c42cbc6d1177ce31bfe2d8aba379c8203cd42e8e1c6a9410f67d8e224bf464a1
rmd160 c0956d927bf4883cf5d81b72f9b3237dafff2a9e \
sha256 fc22f3fdc7825ce86873f843d9e52b6a31109a8ca8400ac84b1246be37e558c4

if {${name} ne ${subport}} {
depends_lib-append port:py${python.version}-numpy
depends_build-append port:py${python.version}-sphinx

worksrcdir ${distname}/source

post-extract {
reinplace s/sphinx-build/sphinx-build-${python.branch}/ \
../docs/Makefile
}

post-build {
system -W ${worksrcpath}/../docs/ \
"make html"
}

post-destroot {
set DOCDIR ${destroot}${prefix}/share/doc/${subport}
xinstall -d ${DOCDIR}
file copy ${worksrcpath}/dicom/license.txt ${DOCDIR}
file copy ${worksrcpath}/../docs/release-notes.txt ${DOCDIR}
file copy ${worksrcpath}/../docs/_build/html ${DOCDIR}
file copy ${worksrcpath}/LICENSE ${DOCDIR}
}
}

livecheck.regex {pydicom-(\d+(?:\.\d+)*).tar.gz}
if {${subport} eq "py27-pydicom"} {
# Backwards compatibility for upgraders
notes \
"pydicom >= 1.0 changed the library name. Install py27-dicom for backward\
compatibility if required. (Can be installed without conflict.) See\
https://pydicom.github.io/pydicom/stable/transition_to_pydicom1.html\
for more information."
}
}

0 comments on commit 0a527e9

Please sign in to comment.
You can’t perform that action at this time.