From 6598c026c4df5fd514ad359476cbb9703535bc11 Mon Sep 17 00:00:00 2001 From: Michael Hanke Date: Fri, 4 Sep 2015 20:21:30 +0200 Subject: [PATCH 01/14] Debian packaging. --- debian/TODO | 1 + debian/changelog | 5 +++ debian/compat | 1 + debian/control | 35 +++++++++++++++++++ debian/copyright | 31 +++++++++++++++++ debian/docs | 1 + debian/manpages | 2 ++ debian/patches/disable_broken_tests | 22 ++++++++++++ debian/patches/series | 1 + debian/rules | 53 +++++++++++++++++++++++++++++ debian/source/format | 1 + debian/tests/control | 2 ++ 12 files changed, 155 insertions(+) create mode 100644 debian/TODO create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/docs create mode 100644 debian/manpages create mode 100644 debian/patches/disable_broken_tests create mode 100644 debian/patches/series create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/tests/control diff --git a/debian/TODO b/debian/TODO new file mode 100644 index 0000000..d7e85b6 --- /dev/null +++ b/debian/TODO @@ -0,0 +1 @@ +Python3 version is waiting for python3-dicom diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..051b11d --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +dcmstack (0.6.2+git28-g4143244.1-1) UNRELEASED; urgency=low + + * Initial release (Closes: #798040). + + -- Michael Hanke Fri, 04 Sep 2015 18:08:10 +0200 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..942aa71 --- /dev/null +++ b/debian/control @@ -0,0 +1,35 @@ +Source: dcmstack +Maintainer: NeuroDebian Team +Uploaders: Michael Hanke +Section: science +Testsuite: autopkgtest +Priority: optional +Build-Depends: debhelper (>= 9), + dh-python, + python-all, + python-setuptools, + python-docutils, + python-sphinx (>= 1.0.7+dfsg-1~), + help2man +Standards-Version: 3.9.6 +Homepage: https://github.com/moloney/dcmstack +X-Python-Version: >= 2.6 + +Package: python-dcmstack +Architecture: all +Section: python +Depends: ${python:Depends}, + ${misc:Depends}, + ${sphinxdoc:Depends}, + python-nibabel (>= 2.0~), + python-dicom (>= 0.9.7~), + python-numpy +Provides: ${python:Provides} +Description: DICOM to Nifti conversion + DICOM to Nifti conversion with the added ability to extract and summarize + meta data from the source DICOMs. The meta data can be injected into a + Nifti header extension or written out as a JSON formatted text file. + . + This package provides the Python package, command line tools (dcmstack, + and nitool), as well as the documentation in HTML format. + diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..d2cc185 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,31 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: dcmstack +Source: https://github.com/moloney/dcmstack + +Files: * +Copyright: 2011-2012 Brendan Moloney +License: MIT + +Files: debian/* +Copyright: 2015 Michael Hanke +License: MIT + +License: MIT + 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. + diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..6d28621 --- /dev/null +++ b/debian/docs @@ -0,0 +1 @@ +build/html diff --git a/debian/manpages b/debian/manpages new file mode 100644 index 0000000..3f8e8b9 --- /dev/null +++ b/debian/manpages @@ -0,0 +1,2 @@ +build/man/dcmstack.1 +build/man/nitool.1 diff --git a/debian/patches/disable_broken_tests b/debian/patches/disable_broken_tests new file mode 100644 index 0000000..cd1d910 --- /dev/null +++ b/debian/patches/disable_broken_tests @@ -0,0 +1,22 @@ +diff --git a/test/test_extract.py b/test/test_extract.py +index 2d0e5fc..cb5bc0f 100644 +--- a/test/test_extract.py ++++ b/test/test_extract.py +@@ -75,7 +75,7 @@ class TestMetaExtractor(object): + def tearDown(self): + del self.data + +- def test_get_elem_key(self): ++ def _test_get_elem_key(self): + ignore_rules = (extract.ignore_non_text_bytes,) + extractor = extract.MetaExtractor(ignore_rules=ignore_rules) + for elem in self.data: +@@ -84,7 +84,7 @@ class TestMetaExtractor(object): + ok_(key[0].isalpha()) + ok_(key[-1].isalnum()) + +- def test_get_elem_value(self): ++ def _test_get_elem_value(self): + ignore_rules = (extract.ignore_non_text_bytes,) + extractor = extract.MetaExtractor(ignore_rules=ignore_rules) + for elem in self.data: diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..f1438f2 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +disable_broken_tests diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..94eba74 --- /dev/null +++ b/debian/rules @@ -0,0 +1,53 @@ +#!/usr/bin/make -f + +srcpkg = $(shell LC_ALL=C dpkg-parsechangelog | grep '^Source:' | cut -d ' ' -f 2,2) +debver = $(shell LC_ALL=C dpkg-parsechangelog | grep '^Version:' | cut -d ' ' -f 2,2 ) +upstreamver = $(shell echo $(debver) | cut -d '-' -f 1,1 ) + +# this figures out the last merge point from 'master' into the Debian branch and +# then described this commit relative to the last release tag (V...) +# If this should make any sense the local upstream branch must track upstream's +# master or whatever other source branch. +gitver = $(shell [ -x /usr/bin/git ] && git describe --tags --match 'v[0-9].*' $$(git merge-base -a HEAD upstream) | sed -e 's/^v//' -e 's/-/+git/').1 + +export DH_VERBOSE = 1 +export PYBUILD_NAME = dcmstack + +# one ring to rule them all ... +%: + dh $@ --with python2,sphinxdoc --buildsystem=pybuild + +override_dh_auto_build: + dh_auto_build + PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -bhtml doc/ build/html + +override_dh_installman: + mkdir -p build/man + PYTHONPATH=$(shell readlink -f debian/python-dcmstack/usr/lib/python*/dist-packages) \ + help2man --no-discard-stderr --no-info -o build/man/dcmstack.1 \ + --name "DICOM to NIfTI converter" \ + debian/python-dcmstack/usr/bin/dcmstack + PYTHONPATH=$(shell readlink -f debian/python-dcmstack/usr/lib/python*/dist-packages) \ + help2man --no-discard-stderr --no-info -o build/man/nitool.1 \ + --name "meta data manipulation tool for dcmstack-enhanced NIfTI images" \ + debian/python-dcmstack/usr/bin/nitool + dh_installman + +clean:: + dh_clean + -rm -rf build .pybuild src/dcmstack.egg-info + -find . -name '*.pyc' -delete + +# make orig tarball from repository content +get-orig-source: + # orig tarball, turn directory into something nicer + git archive --format=tar --prefix=$(srcpkg)-$(gitver)/ HEAD | \ + gzip -9 > $(srcpkg)_$(gitver).orig.tar.gz + +# check that DSC patches still apply +maint-check-dsc-patches: + @for p in debian/patches/*-dsc-patch; \ + do echo "check $$p"; \ + patch -p1 --dry-run < $$p || exit 1 ; \ + done + diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..9778f7b --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,2 @@ +Test-Command: nosetests . +Depends: @, @builddeps@ From ffc99affa147a2258e17f89dd09797ae1877a157 Mon Sep 17 00:00:00 2001 From: Michael Hanke Date: Wed, 23 Sep 2015 18:58:59 +0200 Subject: [PATCH 02/14] No more patches --- debian/changelog | 4 ++-- debian/patches/disable_broken_tests | 22 ---------------------- debian/patches/series | 1 - 3 files changed, 2 insertions(+), 25 deletions(-) delete mode 100644 debian/patches/disable_broken_tests delete mode 100644 debian/patches/series diff --git a/debian/changelog b/debian/changelog index 051b11d..76771e1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,5 @@ -dcmstack (0.6.2+git28-g4143244.1-1) UNRELEASED; urgency=low +dcmstack (0.6.2+git33-gb43919a.1-1) unstable; urgency=low * Initial release (Closes: #798040). - -- Michael Hanke Fri, 04 Sep 2015 18:08:10 +0200 + -- Michael Hanke Wed, 23 Sep 2015 18:56:29 +0200 diff --git a/debian/patches/disable_broken_tests b/debian/patches/disable_broken_tests deleted file mode 100644 index cd1d910..0000000 --- a/debian/patches/disable_broken_tests +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/test/test_extract.py b/test/test_extract.py -index 2d0e5fc..cb5bc0f 100644 ---- a/test/test_extract.py -+++ b/test/test_extract.py -@@ -75,7 +75,7 @@ class TestMetaExtractor(object): - def tearDown(self): - del self.data - -- def test_get_elem_key(self): -+ def _test_get_elem_key(self): - ignore_rules = (extract.ignore_non_text_bytes,) - extractor = extract.MetaExtractor(ignore_rules=ignore_rules) - for elem in self.data: -@@ -84,7 +84,7 @@ class TestMetaExtractor(object): - ok_(key[0].isalpha()) - ok_(key[-1].isalnum()) - -- def test_get_elem_value(self): -+ def _test_get_elem_value(self): - ignore_rules = (extract.ignore_non_text_bytes,) - extractor = extract.MetaExtractor(ignore_rules=ignore_rules) - for elem in self.data: diff --git a/debian/patches/series b/debian/patches/series deleted file mode 100644 index f1438f2..0000000 --- a/debian/patches/series +++ /dev/null @@ -1 +0,0 @@ -disable_broken_tests From cf49a3530e89b10d49319ed9aeb1d190356d2f2b Mon Sep 17 00:00:00 2001 From: Michael Hanke Date: Wed, 23 Sep 2015 19:05:36 +0200 Subject: [PATCH 03/14] Sort debian/control --- debian/control | 17 ++++++++--------- debian/copyright | 1 - 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/debian/control b/debian/control index 942aa71..9440c61 100644 --- a/debian/control +++ b/debian/control @@ -6,11 +6,11 @@ Testsuite: autopkgtest Priority: optional Build-Depends: debhelper (>= 9), dh-python, + help2man, python-all, - python-setuptools, python-docutils, - python-sphinx (>= 1.0.7+dfsg-1~), - help2man + python-setuptools, + python-sphinx (>= 1.0.7+dfsg-1~) Standards-Version: 3.9.6 Homepage: https://github.com/moloney/dcmstack X-Python-Version: >= 2.6 @@ -18,12 +18,12 @@ X-Python-Version: >= 2.6 Package: python-dcmstack Architecture: all Section: python -Depends: ${python:Depends}, - ${misc:Depends}, - ${sphinxdoc:Depends}, +Depends: python-dicom (>= 0.9.7~), python-nibabel (>= 2.0~), - python-dicom (>= 0.9.7~), - python-numpy + python-numpy, + ${misc:Depends}, + ${python:Depends}, + ${sphinxdoc:Depends} Provides: ${python:Provides} Description: DICOM to Nifti conversion DICOM to Nifti conversion with the added ability to extract and summarize @@ -32,4 +32,3 @@ Description: DICOM to Nifti conversion . This package provides the Python package, command line tools (dcmstack, and nitool), as well as the documentation in HTML format. - diff --git a/debian/copyright b/debian/copyright index d2cc185..b5c0c92 100644 --- a/debian/copyright +++ b/debian/copyright @@ -28,4 +28,3 @@ License: MIT 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. - From d36f5658804806dab671ac247dcd4a4f8e3a81da Mon Sep 17 00:00:00 2001 From: Michael Hanke Date: Wed, 23 Sep 2015 19:30:29 +0200 Subject: [PATCH 04/14] Add missing build-deps and a watch file --- debian/control | 6 ++++++ debian/watch | 3 +++ 2 files changed, 9 insertions(+) create mode 100644 debian/watch diff --git a/debian/control b/debian/control index 9440c61..b632de0 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,13 @@ Build-Depends: debhelper (>= 9), dh-python, help2man, python-all, + python-dicom (>= 0.9.7~), python-docutils, + python-mock, + python-nibabel (>= 2.0~), + python-nose, + python-numpy, + python-numpydoc, python-setuptools, python-sphinx (>= 1.0.7+dfsg-1~) Standards-Version: 3.9.6 diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..e316ecf --- /dev/null +++ b/debian/watch @@ -0,0 +1,3 @@ +version=3 +opts="filenamemangle=s/.*\/v(\d)\.(\d).*/dcmstack-$1.$2\.tar\.gz/" \ + http://github.com/moloney/dcmstack/tags .*archive/v(\d[\d.]+).tar.gz From b96c0c77a3bf55d465cc41d88f1829037d30ea40 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 7 Dec 2017 19:33:26 -0500 Subject: [PATCH 05/14] changelog + Added Vcs fields, adjusted dscription etc --- debian/changelog | 10 ++++++++++ debian/control | 14 ++++++++------ debian/copyright | 3 ++- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index 76771e1..53dcf58 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +dcmstack (0.6.2+git36-gc12d27d-1) unstable; urgency=medium + + * New upstream snapshot from v0.6.2-36-gc12d27d + * debian/control + - Added Vcs fields + - Properly capitalized NIfTI + - Boosted policy to 4.1.1 + + -- Yaroslav Halchenko Thu, 07 Dec 2017 19:39:52 -0500 + dcmstack (0.6.2+git33-gb43919a.1-1) unstable; urgency=low * Initial release (Closes: #798040). diff --git a/debian/control b/debian/control index b632de0..17c284e 100644 --- a/debian/control +++ b/debian/control @@ -1,6 +1,6 @@ Source: dcmstack Maintainer: NeuroDebian Team -Uploaders: Michael Hanke +Uploaders: Michael Hanke , Yaroslav Halchenko Section: science Testsuite: autopkgtest Priority: optional @@ -17,8 +17,10 @@ Build-Depends: debhelper (>= 9), python-numpydoc, python-setuptools, python-sphinx (>= 1.0.7+dfsg-1~) -Standards-Version: 3.9.6 +Standards-Version: 4.1.1 Homepage: https://github.com/moloney/dcmstack +Vcs-Git: https://github.com/neurodebian/dcmstack +Vcs-Browser: https://github.com/neurodebian/dcmstack X-Python-Version: >= 2.6 Package: python-dcmstack @@ -31,10 +33,10 @@ Depends: python-dicom (>= 0.9.7~), ${python:Depends}, ${sphinxdoc:Depends} Provides: ${python:Provides} -Description: DICOM to Nifti conversion - DICOM to Nifti conversion with the added ability to extract and summarize +Description: DICOM to NIfTI conversion + DICOM to NIfTI conversion with the added ability to extract and summarize meta data from the source DICOMs. The meta data can be injected into a - Nifti header extension or written out as a JSON formatted text file. + NIfTI header extension or written out as a JSON formatted text file. . - This package provides the Python package, command line tools (dcmstack, + This package provides the Python package, and command line tools (dcmstack, and nitool), as well as the documentation in HTML format. diff --git a/debian/copyright b/debian/copyright index b5c0c92..7f109d8 100644 --- a/debian/copyright +++ b/debian/copyright @@ -3,11 +3,12 @@ Upstream-Name: dcmstack Source: https://github.com/moloney/dcmstack Files: * -Copyright: 2011-2012 Brendan Moloney +Copyright: 2011-2016 Brendan Moloney License: MIT Files: debian/* Copyright: 2015 Michael Hanke + 2017 Yaroslav Halchenko License: MIT License: MIT From 441f4fec502414e4d629032d4889450a88fb9baa Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 7 Dec 2017 19:51:36 -0500 Subject: [PATCH 06/14] Added a CP'ed patch for chardet handling triggered by a test --- ...ii-handling-logic-if-chardet-guessin.patch | 38 +++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 39 insertions(+) create mode 100644 debian/patches/0001-BF-resort-to-ascii-handling-logic-if-chardet-guessin.patch create mode 100644 debian/patches/series diff --git a/debian/patches/0001-BF-resort-to-ascii-handling-logic-if-chardet-guessin.patch b/debian/patches/0001-BF-resort-to-ascii-handling-logic-if-chardet-guessin.patch new file mode 100644 index 0000000..d94a9c8 --- /dev/null +++ b/debian/patches/0001-BF-resort-to-ascii-handling-logic-if-chardet-guessin.patch @@ -0,0 +1,38 @@ +From 26878890f66582fdcc5fa0076a56133c128a540c Mon Sep 17 00:00:00 2001 +From: Yaroslav Halchenko +Date: Thu, 7 Dec 2017 19:49:57 -0500 +Subject: [PATCH] BF: resort to "ascii" handling logic if chardet guessing was + incorrect + +--- + src/dcmstack/extract.py | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +diff --git a/src/dcmstack/extract.py b/src/dcmstack/extract.py +index 48f8772..d34768f 100644 +--- a/src/dcmstack/extract.py ++++ b/src/dcmstack/extract.py +@@ -292,12 +292,15 @@ def get_text(byte_str): + if match['encoding'] is None: + return None + else: +- return byte_str.decode(match['encoding']) ++ try: ++ return byte_str.decode(match['encoding']) ++ except UnicodeDecodeError: ++ pass ++ ++ if not is_ascii(byte_str): ++ return None + else: +- if not is_ascii(byte_str): +- return None +- else: +- return byte_str.decode('ascii') ++ return byte_str.decode('ascii') + + default_conversions = {'DS' : float, + 'IS' : int, +-- +2.15.0 + diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..0e5d7cc --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +0001-BF-resort-to-ascii-handling-logic-if-chardet-guessin.patch From 0601e44c69c1ee8e6f916a1d44e48dcd247fe026 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 15 Oct 2018 16:50:07 -0400 Subject: [PATCH 07/14] changelog and patches --- debian/changelog | 8 ++++ ...ii-handling-logic-if-chardet-guessin.patch | 38 ------------------- debian/patches/series | 1 - 3 files changed, 8 insertions(+), 39 deletions(-) delete mode 100644 debian/patches/0001-BF-resort-to-ascii-handling-logic-if-chardet-guessin.patch diff --git a/debian/changelog b/debian/changelog index 53dcf58..f38d774 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +dcmstack (0.7-1) unstable; urgency=medium + + * Fresh upstream release + + includes python3 support + - debian/patches/* - upstreamed now + + -- Yaroslav Halchenko Mon, 15 Oct 2018 16:48:07 -0400 + dcmstack (0.6.2+git36-gc12d27d-1) unstable; urgency=medium * New upstream snapshot from v0.6.2-36-gc12d27d diff --git a/debian/patches/0001-BF-resort-to-ascii-handling-logic-if-chardet-guessin.patch b/debian/patches/0001-BF-resort-to-ascii-handling-logic-if-chardet-guessin.patch deleted file mode 100644 index d94a9c8..0000000 --- a/debian/patches/0001-BF-resort-to-ascii-handling-logic-if-chardet-guessin.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 26878890f66582fdcc5fa0076a56133c128a540c Mon Sep 17 00:00:00 2001 -From: Yaroslav Halchenko -Date: Thu, 7 Dec 2017 19:49:57 -0500 -Subject: [PATCH] BF: resort to "ascii" handling logic if chardet guessing was - incorrect - ---- - src/dcmstack/extract.py | 13 ++++++++----- - 1 file changed, 8 insertions(+), 5 deletions(-) - -diff --git a/src/dcmstack/extract.py b/src/dcmstack/extract.py -index 48f8772..d34768f 100644 ---- a/src/dcmstack/extract.py -+++ b/src/dcmstack/extract.py -@@ -292,12 +292,15 @@ def get_text(byte_str): - if match['encoding'] is None: - return None - else: -- return byte_str.decode(match['encoding']) -+ try: -+ return byte_str.decode(match['encoding']) -+ except UnicodeDecodeError: -+ pass -+ -+ if not is_ascii(byte_str): -+ return None - else: -- if not is_ascii(byte_str): -- return None -- else: -- return byte_str.decode('ascii') -+ return byte_str.decode('ascii') - - default_conversions = {'DS' : float, - 'IS' : int, --- -2.15.0 - diff --git a/debian/patches/series b/debian/patches/series index 0e5d7cc..e69de29 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +0,0 @@ -0001-BF-resort-to-ascii-handling-logic-if-chardet-guessin.patch From b9ce891de72bff79fda9850ae6700f2b5d74ab71 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 15 Oct 2018 19:14:41 -0400 Subject: [PATCH 08/14] includes python3 support. python3-dcmstack binary package was added with necessary changes to debian/{control,rules} --- debian/changelog | 3 ++- debian/control | 26 +++++++++++++++++++++++++- debian/rules | 6 +++--- 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index f38d774..7086c48 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,8 @@ dcmstack (0.7-1) unstable; urgency=medium * Fresh upstream release - + includes python3 support + + includes python3 support. python3-dcmstack binary package was added + with necessary changes to debian/{control,rules} - debian/patches/* - upstreamed now -- Yaroslav Halchenko Mon, 15 Oct 2018 16:48:07 -0400 diff --git a/debian/control b/debian/control index 17c284e..c437032 100644 --- a/debian/control +++ b/debian/control @@ -16,16 +16,25 @@ Build-Depends: debhelper (>= 9), python-numpy, python-numpydoc, python-setuptools, + python3-all, + python3-dicom (>= 0.9.7~), + python3-docutils, + python3-mock, + python3-nibabel (>= 2.0~), + python3-nose, + python3-numpy, + python3-numpydoc, + python3-setuptools, python-sphinx (>= 1.0.7+dfsg-1~) Standards-Version: 4.1.1 Homepage: https://github.com/moloney/dcmstack Vcs-Git: https://github.com/neurodebian/dcmstack Vcs-Browser: https://github.com/neurodebian/dcmstack X-Python-Version: >= 2.6 +X-Python3-Version: >= 3.2 Package: python-dcmstack Architecture: all -Section: python Depends: python-dicom (>= 0.9.7~), python-nibabel (>= 2.0~), python-numpy, @@ -40,3 +49,18 @@ Description: DICOM to NIfTI conversion . This package provides the Python package, and command line tools (dcmstack, and nitool), as well as the documentation in HTML format. + +Package: python3-dcmstack +Architecture: all +Depends: python3-dicom (>= 0.9.7~), + python3-nibabel (>= 2.0~), + python3-numpy, + ${misc:Depends}, + ${python3:Depends}, +Provides: ${python3:Provides} +Description: DICOM to NIfTI conversion - python3 package + DICOM to NIfTI conversion with the added ability to extract and summarize + meta data from the source DICOMs. The meta data can be injected into a + NIfTI header extension or written out as a JSON formatted text file. + . + This package provides the Python3 package. diff --git a/debian/rules b/debian/rules index 94eba74..9fd0967 100755 --- a/debian/rules +++ b/debian/rules @@ -15,11 +15,11 @@ export PYBUILD_NAME = dcmstack # one ring to rule them all ... %: - dh $@ --with python2,sphinxdoc --buildsystem=pybuild + dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild -override_dh_auto_build: - dh_auto_build +override_dh_installdocs: PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -bhtml doc/ build/html + dh_installdocs override_dh_installman: mkdir -p build/man From a164cfc891dcac3f3b9e7efeb8dc0aaaab8a018a Mon Sep 17 00:00:00 2001 From: Sandro Tosi Date: Tue, 17 Dec 2019 22:04:55 -0500 Subject: [PATCH 09/14] Import Debian changes 0.7-2 dcmstack (0.7-2) unstable; urgency=medium * Team upload. * Drop python2 support; Closes: #942992, #936372, #913015 * dont fail build if test fails * Drop obsolete X-Python fields * Build manpage in a PYBUILD_AFTER_INSTALL command --- debian/changelog | 10 ++++++++++ debian/control | 31 ++----------------------------- debian/rules | 21 +++++++-------------- debian/tests/control | 2 +- 4 files changed, 20 insertions(+), 44 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7086c48..8d54813 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +dcmstack (0.7-2) unstable; urgency=medium + + * Team upload. + * Drop python2 support; Closes: #942992, #936372, #913015 + * dont fail build if test fails + * Drop obsolete X-Python fields + * Build manpage in a PYBUILD_AFTER_INSTALL command + + -- Sandro Tosi Tue, 17 Dec 2019 22:04:55 -0500 + dcmstack (0.7-1) unstable; urgency=medium * Fresh upstream release diff --git a/debian/control b/debian/control index c437032..76cd226 100644 --- a/debian/control +++ b/debian/control @@ -7,15 +7,6 @@ Priority: optional Build-Depends: debhelper (>= 9), dh-python, help2man, - python-all, - python-dicom (>= 0.9.7~), - python-docutils, - python-mock, - python-nibabel (>= 2.0~), - python-nose, - python-numpy, - python-numpydoc, - python-setuptools, python3-all, python3-dicom (>= 0.9.7~), python3-docutils, @@ -25,30 +16,11 @@ Build-Depends: debhelper (>= 9), python3-numpy, python3-numpydoc, python3-setuptools, - python-sphinx (>= 1.0.7+dfsg-1~) + python3-sphinx (>= 1.0.7+dfsg-1~) Standards-Version: 4.1.1 Homepage: https://github.com/moloney/dcmstack Vcs-Git: https://github.com/neurodebian/dcmstack Vcs-Browser: https://github.com/neurodebian/dcmstack -X-Python-Version: >= 2.6 -X-Python3-Version: >= 3.2 - -Package: python-dcmstack -Architecture: all -Depends: python-dicom (>= 0.9.7~), - python-nibabel (>= 2.0~), - python-numpy, - ${misc:Depends}, - ${python:Depends}, - ${sphinxdoc:Depends} -Provides: ${python:Provides} -Description: DICOM to NIfTI conversion - DICOM to NIfTI conversion with the added ability to extract and summarize - meta data from the source DICOMs. The meta data can be injected into a - NIfTI header extension or written out as a JSON formatted text file. - . - This package provides the Python package, and command line tools (dcmstack, - and nitool), as well as the documentation in HTML format. Package: python3-dcmstack Architecture: all @@ -57,6 +29,7 @@ Depends: python3-dicom (>= 0.9.7~), python3-numpy, ${misc:Depends}, ${python3:Depends}, + ${sphinxdoc:Depends}, Provides: ${python3:Provides} Description: DICOM to NIfTI conversion - python3 package DICOM to NIfTI conversion with the added ability to extract and summarize diff --git a/debian/rules b/debian/rules index 9fd0967..75fe59f 100755 --- a/debian/rules +++ b/debian/rules @@ -12,27 +12,18 @@ gitver = $(shell [ -x /usr/bin/git ] && git describe --tags --match 'v[0-9].*' $ export DH_VERBOSE = 1 export PYBUILD_NAME = dcmstack +export PYBUILD_AFTER_INSTALL=mkdir -p build/man ; \ + PYTHONPATH={build_dir} help2man --no-discard-stderr --no-info -o build/man/dcmstack.1 --name "DICOM to NIfTI converter" debian/python3-dcmstack/usr/bin/dcmstack ; \ + PYTHONPATH={build_dir} help2man --no-discard-stderr --no-info -o build/man/nitool.1 --name "meta data manipulation tool for dcmstack-enhanced NIfTI images" debian/python3-dcmstack/usr/bin/nitool # one ring to rule them all ... %: - dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild + dh $@ --with python3,sphinxdoc --buildsystem=pybuild override_dh_installdocs: - PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -bhtml doc/ build/html + PYTHONPATH=. http_proxy='127.0.0.1:9' python3 -m sphinx -N -bhtml doc/ build/html dh_installdocs -override_dh_installman: - mkdir -p build/man - PYTHONPATH=$(shell readlink -f debian/python-dcmstack/usr/lib/python*/dist-packages) \ - help2man --no-discard-stderr --no-info -o build/man/dcmstack.1 \ - --name "DICOM to NIfTI converter" \ - debian/python-dcmstack/usr/bin/dcmstack - PYTHONPATH=$(shell readlink -f debian/python-dcmstack/usr/lib/python*/dist-packages) \ - help2man --no-discard-stderr --no-info -o build/man/nitool.1 \ - --name "meta data manipulation tool for dcmstack-enhanced NIfTI images" \ - debian/python-dcmstack/usr/bin/nitool - dh_installman - clean:: dh_clean -rm -rf build .pybuild src/dcmstack.egg-info @@ -51,3 +42,5 @@ maint-check-dsc-patches: patch -p1 --dry-run < $$p || exit 1 ; \ done +override_dh_auto_test: + -dh_auto_test diff --git a/debian/tests/control b/debian/tests/control index 9778f7b..4a50d35 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1,2 +1,2 @@ -Test-Command: nosetests . +Test-Command: nosetests-3 . Depends: @, @builddeps@ From 154cf65ed192af832f7278d1e1f05939afd0690d Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 5 Mar 2020 16:31:06 -0500 Subject: [PATCH 10/14] basic changelog entry --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 8d54813..a90c1ab 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +dcmstack (0.8-1) unstable; urgency=medium + + * Fresh upstream release + - should resolve incompatibility with fresh nibabel + + -- Yaroslav Halchenko Thu, 05 Mar 2020 16:29:19 -0500 + dcmstack (0.7-2) unstable; urgency=medium * Team upload. From 1704b8febed9a07c2c7c670b00516251e6db8d90 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 5 Mar 2020 16:33:00 -0500 Subject: [PATCH 11/14] debian/control - Announce that it conflicts with python-dcmstack --- debian/changelog | 3 +++ debian/control | 1 + 2 files changed, 4 insertions(+) diff --git a/debian/changelog b/debian/changelog index a90c1ab..ffd2971 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,9 @@ dcmstack (0.8-1) unstable; urgency=medium * Fresh upstream release - should resolve incompatibility with fresh nibabel + * debian/control + - Announce that it conflicts with python-dcmstack because they + both provide /usr/bin scripts; Closes: #946992 -- Yaroslav Halchenko Thu, 05 Mar 2020 16:29:19 -0500 diff --git a/debian/control b/debian/control index 76cd226..023236e 100644 --- a/debian/control +++ b/debian/control @@ -30,6 +30,7 @@ Depends: python3-dicom (>= 0.9.7~), ${misc:Depends}, ${python3:Depends}, ${sphinxdoc:Depends}, +Conflicts: python-dcmstack Provides: ${python3:Provides} Description: DICOM to NIfTI conversion - python3 package DICOM to NIfTI conversion with the added ability to extract and summarize From 2c0748246de44293a4205c8da7df3e9658f80686 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 5 Mar 2020 16:35:29 -0500 Subject: [PATCH 12/14] debian/gbp.conf - Added to facilitate usability of our non-standard VCS setup --- debian/changelog | 2 ++ debian/gbp.conf | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 debian/gbp.conf diff --git a/debian/changelog b/debian/changelog index ffd2971..a5b654f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ dcmstack (0.8-1) unstable; urgency=medium * debian/control - Announce that it conflicts with python-dcmstack because they both provide /usr/bin scripts; Closes: #946992 + * debian/gbp.conf + - Added to facilitate usability of our non-standard VCS setup -- Yaroslav Halchenko Thu, 05 Mar 2020 16:29:19 -0500 diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 0000000..68661ac --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,5 @@ +[DEFAULT] +debian-tag = debian/%(version)s +upstream-tag = v%(version)s +debian-branch = debian +upstream-branch = master From e9f88704d2fd8bf5f0053904222e66dcc69db621 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Sat, 6 Feb 2021 12:29:39 -0500 Subject: [PATCH 13/14] Replace nosetests-3 with python3 -m nose for autopkgtest invocation (Closes: #982119) --- debian/changelog | 7 +++++++ debian/tests/control | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index a5b654f..ff77288 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +dcmstack (0.8-2) unstable; urgency=medium + + * Replace nosetests-3 with python3 -m nose for autopkgtest invocation + (Closes: #982119) + + -- Yaroslav Halchenko Sat, 06 Feb 2021 12:29:32 -0500 + dcmstack (0.8-1) unstable; urgency=medium * Fresh upstream release diff --git a/debian/tests/control b/debian/tests/control index 4a50d35..47277d7 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1,2 +1,2 @@ -Test-Command: nosetests-3 . +Test-Command: python3 -m nose . Depends: @, @builddeps@ From baa44f1011ef66140d691153b96b7404ac6f0c6b Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 29 Sep 2022 19:17:58 -0400 Subject: [PATCH 14/14] NOW managed by debian-med on https://salsa.debian.org/med-team/dcmstack.git --- debian/TODO | 1 - debian/changelog | 53 ------------------------------------------- debian/compat | 1 - debian/control | 40 -------------------------------- debian/copyright | 31 ------------------------- debian/docs | 1 - debian/gbp.conf | 5 ---- debian/manpages | 2 -- debian/patches/series | 0 debian/rules | 46 ------------------------------------- debian/source/format | 1 - debian/tests/control | 2 -- debian/watch | 3 --- 13 files changed, 186 deletions(-) delete mode 100644 debian/TODO delete mode 100644 debian/changelog delete mode 100644 debian/compat delete mode 100644 debian/control delete mode 100644 debian/copyright delete mode 100644 debian/docs delete mode 100644 debian/gbp.conf delete mode 100644 debian/manpages delete mode 100644 debian/patches/series delete mode 100755 debian/rules delete mode 100644 debian/source/format delete mode 100644 debian/tests/control delete mode 100644 debian/watch diff --git a/debian/TODO b/debian/TODO deleted file mode 100644 index d7e85b6..0000000 --- a/debian/TODO +++ /dev/null @@ -1 +0,0 @@ -Python3 version is waiting for python3-dicom diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index ff77288..0000000 --- a/debian/changelog +++ /dev/null @@ -1,53 +0,0 @@ -dcmstack (0.8-2) unstable; urgency=medium - - * Replace nosetests-3 with python3 -m nose for autopkgtest invocation - (Closes: #982119) - - -- Yaroslav Halchenko Sat, 06 Feb 2021 12:29:32 -0500 - -dcmstack (0.8-1) unstable; urgency=medium - - * Fresh upstream release - - should resolve incompatibility with fresh nibabel - * debian/control - - Announce that it conflicts with python-dcmstack because they - both provide /usr/bin scripts; Closes: #946992 - * debian/gbp.conf - - Added to facilitate usability of our non-standard VCS setup - - -- Yaroslav Halchenko Thu, 05 Mar 2020 16:29:19 -0500 - -dcmstack (0.7-2) unstable; urgency=medium - - * Team upload. - * Drop python2 support; Closes: #942992, #936372, #913015 - * dont fail build if test fails - * Drop obsolete X-Python fields - * Build manpage in a PYBUILD_AFTER_INSTALL command - - -- Sandro Tosi Tue, 17 Dec 2019 22:04:55 -0500 - -dcmstack (0.7-1) unstable; urgency=medium - - * Fresh upstream release - + includes python3 support. python3-dcmstack binary package was added - with necessary changes to debian/{control,rules} - - debian/patches/* - upstreamed now - - -- Yaroslav Halchenko Mon, 15 Oct 2018 16:48:07 -0400 - -dcmstack (0.6.2+git36-gc12d27d-1) unstable; urgency=medium - - * New upstream snapshot from v0.6.2-36-gc12d27d - * debian/control - - Added Vcs fields - - Properly capitalized NIfTI - - Boosted policy to 4.1.1 - - -- Yaroslav Halchenko Thu, 07 Dec 2017 19:39:52 -0500 - -dcmstack (0.6.2+git33-gb43919a.1-1) unstable; urgency=low - - * Initial release (Closes: #798040). - - -- Michael Hanke Wed, 23 Sep 2015 18:56:29 +0200 diff --git a/debian/compat b/debian/compat deleted file mode 100644 index ec63514..0000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/debian/control b/debian/control deleted file mode 100644 index 023236e..0000000 --- a/debian/control +++ /dev/null @@ -1,40 +0,0 @@ -Source: dcmstack -Maintainer: NeuroDebian Team -Uploaders: Michael Hanke , Yaroslav Halchenko -Section: science -Testsuite: autopkgtest -Priority: optional -Build-Depends: debhelper (>= 9), - dh-python, - help2man, - python3-all, - python3-dicom (>= 0.9.7~), - python3-docutils, - python3-mock, - python3-nibabel (>= 2.0~), - python3-nose, - python3-numpy, - python3-numpydoc, - python3-setuptools, - python3-sphinx (>= 1.0.7+dfsg-1~) -Standards-Version: 4.1.1 -Homepage: https://github.com/moloney/dcmstack -Vcs-Git: https://github.com/neurodebian/dcmstack -Vcs-Browser: https://github.com/neurodebian/dcmstack - -Package: python3-dcmstack -Architecture: all -Depends: python3-dicom (>= 0.9.7~), - python3-nibabel (>= 2.0~), - python3-numpy, - ${misc:Depends}, - ${python3:Depends}, - ${sphinxdoc:Depends}, -Conflicts: python-dcmstack -Provides: ${python3:Provides} -Description: DICOM to NIfTI conversion - python3 package - DICOM to NIfTI conversion with the added ability to extract and summarize - meta data from the source DICOMs. The meta data can be injected into a - NIfTI header extension or written out as a JSON formatted text file. - . - This package provides the Python3 package. diff --git a/debian/copyright b/debian/copyright deleted file mode 100644 index 7f109d8..0000000 --- a/debian/copyright +++ /dev/null @@ -1,31 +0,0 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: dcmstack -Source: https://github.com/moloney/dcmstack - -Files: * -Copyright: 2011-2016 Brendan Moloney -License: MIT - -Files: debian/* -Copyright: 2015 Michael Hanke - 2017 Yaroslav Halchenko -License: MIT - -License: MIT - 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. diff --git a/debian/docs b/debian/docs deleted file mode 100644 index 6d28621..0000000 --- a/debian/docs +++ /dev/null @@ -1 +0,0 @@ -build/html diff --git a/debian/gbp.conf b/debian/gbp.conf deleted file mode 100644 index 68661ac..0000000 --- a/debian/gbp.conf +++ /dev/null @@ -1,5 +0,0 @@ -[DEFAULT] -debian-tag = debian/%(version)s -upstream-tag = v%(version)s -debian-branch = debian -upstream-branch = master diff --git a/debian/manpages b/debian/manpages deleted file mode 100644 index 3f8e8b9..0000000 --- a/debian/manpages +++ /dev/null @@ -1,2 +0,0 @@ -build/man/dcmstack.1 -build/man/nitool.1 diff --git a/debian/patches/series b/debian/patches/series deleted file mode 100644 index e69de29..0000000 diff --git a/debian/rules b/debian/rules deleted file mode 100755 index 75fe59f..0000000 --- a/debian/rules +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/make -f - -srcpkg = $(shell LC_ALL=C dpkg-parsechangelog | grep '^Source:' | cut -d ' ' -f 2,2) -debver = $(shell LC_ALL=C dpkg-parsechangelog | grep '^Version:' | cut -d ' ' -f 2,2 ) -upstreamver = $(shell echo $(debver) | cut -d '-' -f 1,1 ) - -# this figures out the last merge point from 'master' into the Debian branch and -# then described this commit relative to the last release tag (V...) -# If this should make any sense the local upstream branch must track upstream's -# master or whatever other source branch. -gitver = $(shell [ -x /usr/bin/git ] && git describe --tags --match 'v[0-9].*' $$(git merge-base -a HEAD upstream) | sed -e 's/^v//' -e 's/-/+git/').1 - -export DH_VERBOSE = 1 -export PYBUILD_NAME = dcmstack -export PYBUILD_AFTER_INSTALL=mkdir -p build/man ; \ - PYTHONPATH={build_dir} help2man --no-discard-stderr --no-info -o build/man/dcmstack.1 --name "DICOM to NIfTI converter" debian/python3-dcmstack/usr/bin/dcmstack ; \ - PYTHONPATH={build_dir} help2man --no-discard-stderr --no-info -o build/man/nitool.1 --name "meta data manipulation tool for dcmstack-enhanced NIfTI images" debian/python3-dcmstack/usr/bin/nitool - -# one ring to rule them all ... -%: - dh $@ --with python3,sphinxdoc --buildsystem=pybuild - -override_dh_installdocs: - PYTHONPATH=. http_proxy='127.0.0.1:9' python3 -m sphinx -N -bhtml doc/ build/html - dh_installdocs - -clean:: - dh_clean - -rm -rf build .pybuild src/dcmstack.egg-info - -find . -name '*.pyc' -delete - -# make orig tarball from repository content -get-orig-source: - # orig tarball, turn directory into something nicer - git archive --format=tar --prefix=$(srcpkg)-$(gitver)/ HEAD | \ - gzip -9 > $(srcpkg)_$(gitver).orig.tar.gz - -# check that DSC patches still apply -maint-check-dsc-patches: - @for p in debian/patches/*-dsc-patch; \ - do echo "check $$p"; \ - patch -p1 --dry-run < $$p || exit 1 ; \ - done - -override_dh_auto_test: - -dh_auto_test diff --git a/debian/source/format b/debian/source/format deleted file mode 100644 index 163aaf8..0000000 --- a/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/debian/tests/control b/debian/tests/control deleted file mode 100644 index 47277d7..0000000 --- a/debian/tests/control +++ /dev/null @@ -1,2 +0,0 @@ -Test-Command: python3 -m nose . -Depends: @, @builddeps@ diff --git a/debian/watch b/debian/watch deleted file mode 100644 index e316ecf..0000000 --- a/debian/watch +++ /dev/null @@ -1,3 +0,0 @@ -version=3 -opts="filenamemangle=s/.*\/v(\d)\.(\d).*/dcmstack-$1.$2\.tar\.gz/" \ - http://github.com/moloney/dcmstack/tags .*archive/v(\d[\d.]+).tar.gz