mirror of
https://github.com/bertptrs/aur.git
synced 2025-12-25 20:40:32 +01:00
Add split package and unit testing.
This commit is contained in:
14
.SRCINFO
14
.SRCINFO
@@ -1,18 +1,24 @@
|
||||
pkgbase = python-pydicom
|
||||
pkgdesc = Pure python package for working with DICOM files
|
||||
pkgver = 1.1.0
|
||||
pkgrel = 1
|
||||
pkgrel = 2
|
||||
url = https://pydicom.github.io/pydicom/stable/index.html
|
||||
arch = x86_64
|
||||
license = MIT
|
||||
license = custom
|
||||
checkdepends = python-pytest
|
||||
makedepends = python-setuptools
|
||||
makedepends = python2-setuptools
|
||||
depends = python
|
||||
depends = python-numpy
|
||||
optdepends = python-numpy: for working with pixel data
|
||||
optdepends = python-pillow: for working with compressed image data
|
||||
source = python-pydicom-1.1.0.tar.gz::https://github.com/pydicom/pydicom/archive/v1.1.0.tar.gz
|
||||
source = file://license.txt
|
||||
md5sums = 759799fbe1d01d1daadeca649717122b
|
||||
md5sums = dee3b5d8029934bd8195cd244b966055
|
||||
|
||||
pkgname = python-pydicom
|
||||
|
||||
pkgname = python2-pydicom
|
||||
depends = python2
|
||||
optdepends = python2-numpy: for working with pixel data
|
||||
optdepends = python2-pillow: for working with compressed image data
|
||||
|
||||
|
||||
51
PKGBUILD
51
PKGBUILD
@@ -1,36 +1,53 @@
|
||||
# Maintainer: Bert Peters <bert@bertptrs.nl>
|
||||
# Maintainer: wedjat <wedjat@protonmail.com>
|
||||
# Contributor: Andrzej Giniewicz <gginiu@gmail.com>
|
||||
pkgname=python-pydicom
|
||||
pkgname=('python-pydicom' 'python2-pydicom')
|
||||
pkgver=1.1.0
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="Pure python package for working with DICOM files"
|
||||
arch=("x86_64")
|
||||
url="https://pydicom.github.io/pydicom/stable/index.html"
|
||||
license=('MIT' 'custom')
|
||||
depends=('python' 'python-numpy')
|
||||
makedepends=('python-setuptools')
|
||||
optdepends=()
|
||||
options=()
|
||||
source=("$pkgname-$pkgver.tar.gz::https://github.com/pydicom/pydicom/archive/v$pkgver.tar.gz" "file://license.txt")
|
||||
md5sums=('759799fbe1d01d1daadeca649717122b'
|
||||
'dee3b5d8029934bd8195cd244b966055')
|
||||
prepare()
|
||||
{
|
||||
cd "$srcdir/pydicom-$pkgver"
|
||||
sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python|" $(find -name '*.py')
|
||||
}
|
||||
depends=('python')
|
||||
makedepends=('python-setuptools' 'python2-setuptools')
|
||||
optdepends=('python-numpy: for working with pixel data'
|
||||
'python-pillow: for working with compressed image data')
|
||||
checkdepends=('python-pytest')
|
||||
source=("$pkgname-$pkgver.tar.gz::https://github.com/pydicom/pydicom/archive/v$pkgver.tar.gz")
|
||||
md5sums=('759799fbe1d01d1daadeca649717122b')
|
||||
|
||||
build()
|
||||
build()
|
||||
{
|
||||
cd "$srcdir/pydicom-$pkgver"
|
||||
python setup.py build
|
||||
}
|
||||
|
||||
package()
|
||||
package_python-pydicom()
|
||||
{
|
||||
cd "$srcdir/pydicom-$pkgver"
|
||||
python setup.py install --skip-build --root="$pkgdir"/ --optimize=1
|
||||
|
||||
install -D "$srcdir/pydicom-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
install -D "$srcdir/pydicom-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
}
|
||||
|
||||
package_python2-pydicom()
|
||||
{
|
||||
depends=('python2')
|
||||
optdepends=('python2-numpy: for working with pixel data'
|
||||
'python2-pillow: for working with compressed image data')
|
||||
cd "$srcdir/pydicom-$pkgver"
|
||||
python2 setup.py install --skip-build --root="$pkgdir"/ --optimize=1
|
||||
|
||||
install -D "$srcdir/pydicom-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
}
|
||||
|
||||
|
||||
check()
|
||||
{
|
||||
cd "$srcdir/pydicom-$pkgver"
|
||||
# Test suite has a known issue with Pillow 5 and up
|
||||
# See: https://github.com/pydicom/pydicom/issues/663
|
||||
# Don't write byte code to prevent a "$srcdir in pkg" error on rebuilds
|
||||
PYTHONDONTWRITEBYTECODE=1 \
|
||||
pytest --deselect=pydicom/tests/test_pillow_pixel_data.py::test_PI_RGB[JPEG_RGB_RGB]
|
||||
}
|
||||
|
||||
61
license.txt
61
license.txt
@@ -1,61 +0,0 @@
|
||||
License file for pydicom, a pure-python DICOM library
|
||||
|
||||
Copyright (c) 2008-2017 Darcy Mason and pydicom contributors
|
||||
|
||||
Except for portions outlined below, pydicom is released under an MIT license:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
Portions of pydicom (private dictionary file(s)) were generated from the
|
||||
private dictionary of the GDCM library, released under the following license:
|
||||
|
||||
Program: GDCM (Grassroots DICOM). A DICOM library
|
||||
Module: http://gdcm.sourceforge.net/Copyright.html
|
||||
|
||||
Copyright (c) 2006-2010 Mathieu Malaterre
|
||||
Copyright (c) 1993-2005 CREATIS
|
||||
(CREATIS = Centre de Recherche et d'Applications en Traitement de l'Image)
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither name of Mathieu Malaterre, or CREATIS, nor the names of any
|
||||
contributors (CNRS, INSERM, UCB, Universite Lyon I), may be used to
|
||||
endorse or promote products derived from this software without specific
|
||||
prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Reference in New Issue
Block a user