[med-svn] [falcon] 06/08: Revamp packaging for bundled subcomponents

Afif Elghraoui afif at moszumanska.debian.org
Sun Oct 23 12:18:48 UTC 2016


This is an automated email from the git hooks/post-receive script.

afif pushed a commit to branch master
in repository falcon.

commit 8253fbf294b1def2dd021d4c2e5ff283c36e3456
Author: Afif Elghraoui <afif at debian.org>
Date:   Sun Oct 23 04:30:28 2016 -0700

    Revamp packaging for bundled subcomponents
    
    * Install all private executables and Python modules in /usr/lib/falcon
    * Run automatic build and CI tests
    * Update manpage
---
 debian/README.source                               |  17 +--
 debian/control                                     |  23 +++-
 debian/copyright                                   |  92 +++++++++++++++-
 debian/docs                                        |   2 -
 debian/examples                                    |   2 +-
 debian/falconkit.1                                 |  34 ------
 debian/fc_run                                      |   7 ++
 debian/fc_run.1                                    |  12 +++
 debian/get-orig-source                             |  21 +++-
 debian/install                                     |   2 +
 debian/links                                       |   4 +
 debian/lintian-overrides                           |   4 +
 debian/manpages                                    |   2 +-
 debian/patches/add-shebang-lines.patch             | 116 ---------------------
 debian/patches/build-system.patch                  |  78 ++++++++++++++
 debian/patches/pyscripts.patch                     |  14 ---
 debian/patches/rdflib.patch                        |  32 ++++++
 debian/patches/series                              |   6 +-
 ...networkx-version.patch => versioned-deps.patch} |  15 ++-
 debian/rules                                       |  57 +++++-----
 debian/tests/control                               |  20 ++--
 21 files changed, 338 insertions(+), 222 deletions(-)

diff --git a/debian/README.source b/debian/README.source
index e467f87..9cce215 100644
--- a/debian/README.source
+++ b/debian/README.source
@@ -1,13 +1,14 @@
 falcon for Debian
 -----------------
 
-The primary repository for this project does not have tagged releases.
-However, there is an integration repository at
-https://github.com/PacificBiosciences/FALCON-integrate
-that does. This repository has the primary repository as a submodule,
-so releases can be had by going to the latest tagged release in the integration
-repository, and finding the corresponding snapshot of the primary repository.
+FALCON relies on modified versions of third-party modules from the
+DAZZLER suite (DALIGNER, DAZZ_DB, ...), so we cannot safely use
+the externally packaged versions here.
 
+The packaging for FALCON is based on the FALCON-integrate repository
+managed upstream. Conversion of the git repository into a tarball
+usable for packaging is done in the debian/get-orig-source script,
+which is called by uscan. This script downloads the git submodules and
+data files so that all are accessible from the same location.
 
- -- Afif Elghraoui <afif at debian.org>, Thu, 10 Mar 2016 21:12:32 -0800
-
+ -- Afif Elghraoui <afif at debian.org>, Sat, 22 Oct 2016 22:31:04 -0700
diff --git a/debian/control b/debian/control
index f9fea87..a359275 100644
--- a/debian/control
+++ b/debian/control
@@ -6,9 +6,17 @@ Uploaders: Afif Elghraoui <afif at debian.org>
 Build-Depends:
 	debhelper (>= 9),
 	dh-python,
+	rsync,
 	python-all-dev,
 	python-setuptools,
+	python-six,
 	python-networkx (>= 1.7),
+	python-isodate,
+	python-pyparsing,
+	python-decorator,
+	python-rdflib,
+	python-sparqlwrapper,
+	python-html5lib,
 # Test-Depends:
 	python-nose,
 Standards-Version: 3.9.8
@@ -22,14 +30,27 @@ Depends:
 	${shlibs:Depends},
 	${misc:Depends},
 	${python:Depends},
+	python-pkg-resources,
+	python-six,
+	python-networkx (>= 1.7),
+	python-isodate,
+	python-pyparsing,
+	python-decorator,
+	python-rdflib,
+	python-sparqlwrapper,
+	python-html5lib,
 Description: genome assembly toolkit
  Falcon is a set of tools for fast aligning long reads for consensus
  and assembly. It is a simple code collection for efficient assembly of
  haploid and diploid genomes.
 
 Package: falconkit
+Section: oldlibs
+Priority: extra
 Architecture: all
-Depends: falcon
+Depends:
+	${misc:Depends},
+	falcon,
 Description: transitional package for the FALCON assembler
  Falcon is a set of tools for fast aligning long reads for consensus
  and assembly. It is a simple code collection for efficient assembly of
diff --git a/debian/copyright b/debian/copyright
index 4c3800a..bdcd033 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,17 +1,54 @@
 Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: falcon
 Upstream-Contact: devnet at pacificbiosciences.com
-Source: https://github.com/PacificBiosciences/FALCON
+Source: https://github.com/PacificBiosciences/FALCON-integrate
 
 Files: *
-Copyright: 2011-2014 Pacific Biosciences of California, Inc.
-License: PacBio-BSD-3-Clause
+Copyright: 2011-2016 Pacific Biosciences of California, Inc.
+License: BSD-3-Clause-PacBio
+
+Files: FALCON-examples/*
+Copyright:
+	2015 Christopher Dunn
+	2015 Pacific Biosciences
+License: MIT
+
+Files: pypeFLOW/*
+Copyright: 2010-2011 Chen-Shan "Jason" Chin
+License: MIT
+
+Files: pypeFLOW/presentation/pypeFLOW_tutorial.html
+Copyright: 2010 Google Inc.
+License: Apache-2.0
+
+Files:
+	DALIGNER/*
+	DAZZ_DB/*
+	DAMASKER/*
+Copyright: 2013-2016 Eugene W. Myers, Jr. <gene.myers at gmail.com>
+License: BSD-3-Clause-EWM
 
 Files: debian/*
 Copyright: 2015-2016 Afif Elghraoui <afif at debian.org>
-License: PacBio-BSD-3-Clause
+License: BSD-3-Clause-PacBio
 
-License: PacBio-BSD-3-Clause
+License: Apache-2.0
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ .
+ https://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ .
+ On Debian systems, the complete text of the Apache version 2.0 license
+ can be found in "/usr/share/common-licenses/Apache-2.0".
+
+License: BSD-3-Clause-PacBio
  Redistribution and use in source and binary forms, with or without
  modification, are permitted (subject to the limitations in the
  disclaimer below) provided that the following conditions are met:
@@ -38,3 +75,48 @@ License: PacBio-BSD-3-Clause
  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.
+
+License: BSD-3-Clause-EWM
+ 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.
+ .
+  · The name of EWM may not be used to endorse or promote products derived from 
+    this software without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY EWM ”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 EWM 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.
+
+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
index e4d0d00..e69de29 100644
--- a/debian/docs
+++ b/debian/docs
@@ -1,2 +0,0 @@
-README.md
-test_data
diff --git a/debian/examples b/debian/examples
index e39721e..2e59d9d 100644
--- a/debian/examples
+++ b/debian/examples
@@ -1 +1 @@
-examples/*
+FALCON-examples/*
diff --git a/debian/falconkit.1 b/debian/falconkit.1
deleted file mode 100644
index 3a4efa4..0000000
--- a/debian/falconkit.1
+++ /dev/null
@@ -1,34 +0,0 @@
-.TH FALCONKIT 1 "December 2015"
-.SH NAME
-falconkit \- genome assembly toolkit
-.PP
-falcontask
-.br
-fc_actg_coordinate
-.br
-fc_consensus \- simple multi-processor consensus sequence generator
-.br
-fc_contig_annotate
-.br
-fc_ctg_link_analysis
-.br
-fc_dedup_a_tigs
-.br
-fc_graph_to_contig
-.br
-fc_graph_to_utgs
-.br
-fc_ovlp_filter \- simple multi-process LAS overlap data filter
-.br
-fc_ovlp_stats \- simple multi-process LAS overlap data filter
-.br
-fc_ovlp_to_graph
-.SH OPTIONS
-A summary of options is included below.
-For a complete description, see the programs' individual help menus
-or the online documentation.
-.TP
-.B \-h, \-\-help
-Show summary of options.
-.SH SEE ALSO
-https://github.com/PacificBiosciences/FALCON/wiki/Manual
diff --git a/debian/fc_run b/debian/fc_run
new file mode 100644
index 0000000..55ae829
--- /dev/null
+++ b/debian/fc_run
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+prefix=$(realpath $(dirname $BASH_SOURCE)/../)
+export PATH="$prefix/lib/falcon/bin:$PATH"
+export PYTHONPATH="$prefix/lib/falcon/lib/python2.7/site-packages:$PYTHONPATH"
+
+$prefix/lib/falcon/bin/$(basename $0) "$@"
diff --git a/debian/fc_run.1 b/debian/fc_run.1
new file mode 100644
index 0000000..754a12e
--- /dev/null
+++ b/debian/fc_run.1
@@ -0,0 +1,12 @@
+.TH FC_RUN 1 "October 2016"
+.SH NAME
+fc_run \- run genome assembly using FALCON
+.SH OPTIONS
+A summary of options is included below.
+For a complete description, see the program's help menu
+or the online documentation.
+.TP
+.B \-h, \-\-help
+Show summary of options.
+.SH SEE ALSO
+https://github.com/PacificBiosciences/FALCON/wiki/Manual
diff --git a/debian/get-orig-source b/debian/get-orig-source
index 7ce9a14..ca26212 100755
--- a/debian/get-orig-source
+++ b/debian/get-orig-source
@@ -1,5 +1,7 @@
 #!/bin/sh
 
+set -ex
+
 # This is based on code from https://bugs.debian.org/748474
 
 while [ "$1" ];
@@ -30,12 +32,21 @@ git clone \
     --branch ${NEW_VERSION} \
     https://github.com/PacificBiosciences/FALCON-integrate.git $new_package
 
-cd $new_package \
-    && git describe --tags \
-    && make init \
-    && find -name ".git*" -exec rm -rf {} +
+export PATH="$PATH:$PWD/$new_package/git-sym"
+
+cd $new_package
+git describe --tags
+make init
+cd FALCON-examples && make setup-synth0 && cd ..
+find FALCON-examples/run/synth0 -type l \
+    | xargs -I{} sh -c 'cp -L {} {}.actual && mv {}.actual {}'
+# Get rid of absolute symlinks
+find FALCON-examples -type l \
+    | xargs -I{} sh -c 'perl -e "\"$(readlink {})\" =~ /^\//" && rm {}'
+rm -f FALCON-examples/scripts/git-sym
+find -name ".git*" -exec rm -rf {} +
+rm -rf git-sym
 cd ..
 
-# make any modification to files in ${SPKG}-${NEW_VERSION}
 tar --xz -cf ${SPKG}_${NEW_VERSION}.orig.tar.xz ${new_package}
 rm -rf ${new_package}
diff --git a/debian/install b/debian/install
new file mode 100644
index 0000000..35e051b
--- /dev/null
+++ b/debian/install
@@ -0,0 +1,2 @@
+inst/*	/usr/lib/falcon
+debian/fc_run	/usr/bin
diff --git a/debian/links b/debian/links
new file mode 100644
index 0000000..a6be2ae
--- /dev/null
+++ b/debian/links
@@ -0,0 +1,4 @@
+/usr/bin/fc_run	/usr/bin/fc_run.py
+/usr/bin/fc_run	/usr/bin/fc_run0
+/usr/bin/fc_run	/usr/bin/fc_run1
+/usr/share/man/man1/fc_run.1	/usr/share/man/man1/fc_run.py.1
diff --git a/debian/lintian-overrides b/debian/lintian-overrides
new file mode 100644
index 0000000..881b806
--- /dev/null
+++ b/debian/lintian-overrides
@@ -0,0 +1,4 @@
+# These files were copied by and marked as executable during the build process.
+# They also exist in /usr/lib/falcon/bin/ and appear to work fine (tests are
+# passing)
+executable-not-elf-or-script usr/lib/falcon/lib/python2.7/site-packages/falcon_kit-0.7-py2.7-linux-x86_64.egg/EGG-INFO/scripts/*
diff --git a/debian/manpages b/debian/manpages
index 654ff0d..0d05899 100644
--- a/debian/manpages
+++ b/debian/manpages
@@ -1 +1 @@
-debian/falconkit.1
+debian/fc_run.1
diff --git a/debian/patches/add-shebang-lines.patch b/debian/patches/add-shebang-lines.patch
deleted file mode 100644
index cec11b4..0000000
--- a/debian/patches/add-shebang-lines.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-Description: Add shebang lines to executable scripts
-Author: Afif Elghraoui <afif at ghraoui.name>
-Forwarded: no
-Last-Update: 2015-12-20
---- falconkit.orig/src/py_scripts/fc_consensus.py
-+++ falconkit/src/py_scripts/fc_consensus.py
-@@ -1,3 +1,5 @@
-+#!/usr/bin/python
-+
- from falcon_kit.mains.consensus import main
- import sys
- 
---- falconkit.orig/src/py_scripts/fc_ctg_link_analysis.py
-+++ falconkit/src/py_scripts/fc_ctg_link_analysis.py
-@@ -1,3 +1,5 @@
-+#!/usr/bin/python
-+
- from falcon_kit.mains.ctg_link_analysis import main
- import sys
- 
---- falconkit.orig/src/py_scripts/fc_contig_annotate.py
-+++ falconkit/src/py_scripts/fc_contig_annotate.py
-@@ -1,3 +1,5 @@
-+#!/usr/bin/python
-+
- from falcon_kit.mains.contig_annotate import main
- import sys
- 
---- falconkit.orig/src/py_scripts/fc_dedup_a_tigs.py
-+++ falconkit/src/py_scripts/fc_dedup_a_tigs.py
-@@ -1,3 +1,5 @@
-+#!/usr/bin/python
-+
- from falcon_kit.mains.dedup_a_tigs import main
- import sys
- 
---- falconkit.orig/src/py_scripts/fc_graph_to_contig.py
-+++ falconkit/src/py_scripts/fc_graph_to_contig.py
-@@ -1,3 +1,5 @@
-+#!/usr/bin/python
-+
- from falcon_kit.mains.graph_to_contig import main
- import sys
- 
---- falconkit.orig/src/py_scripts/fc_graph_to_utgs.py
-+++ falconkit/src/py_scripts/fc_graph_to_utgs.py
-@@ -1,3 +1,5 @@
-+#!/usr/bin/python
-+
- from falcon_kit.mains.graph_to_utgs import main
- import sys
- 
---- falconkit.orig/src/py_scripts/fc_ovlp_stats.py
-+++ falconkit/src/py_scripts/fc_ovlp_stats.py
-@@ -1,3 +1,5 @@
-+#!/usr/bin/python
-+
- from falcon_kit.mains.ovlp_stats import main
- import sys
- 
---- falconkit.orig/src/py_scripts/fc_ovlp_filter.py
-+++ falconkit/src/py_scripts/fc_ovlp_filter.py
-@@ -1,3 +1,5 @@
-+#!/usr/bin/python
-+
- from falcon_kit.mains.ovlp_filter import main
- import sys
- 
---- falconkit.orig/src/py_scripts/fc_actg_coordinate.py
-+++ falconkit/src/py_scripts/fc_actg_coordinate.py
-@@ -1,3 +1,5 @@
-+#!/usr/bin/python
-+
- from falcon_kit.mains.actg_coordinate import main
- import sys
- 
---- falconkit.orig/src/py_scripts/fc_ovlp_to_graph.py
-+++ falconkit/src/py_scripts/fc_ovlp_to_graph.py
-@@ -1,3 +1,5 @@
-+#!/usr/bin/python
-+
- from falcon_kit.mains.ovlp_to_graph import main
- import sys
- 
---- falconkit.orig/src/py_scripts_v0.1/redis_graph.py
-+++ falconkit/src/py_scripts_v0.1/redis_graph.py
-@@ -1,3 +1,5 @@
-+#!/usr/bin/python
-+
- import redis
- import sys
- from pbcore.io import FastaReader
---- falconkit.orig/src/py_scripts_v0.1/overlapper.py
-+++ falconkit/src/py_scripts_v0.1/overlapper.py
-@@ -1,3 +1,5 @@
-+#!/usr/bin/python
-+x
- from falcon_kit import kup, falcon, DWA, get_consensus, get_alignment
- from pbcore.io import FastaReader
- import numpy as np
---- falconkit.orig/src/py_scripts_v0.1/falcon_dedup.py
-+++ falconkit/src/py_scripts_v0.1/falcon_dedup.py
-@@ -1,3 +1,5 @@
-+#!/usr/bin/python
-+
- import subprocess
- from pbcore.io import FastaReader
- 
---- falconkit.orig/src/py_scripts/fc_run.py
-+++ falconkit/src/py_scripts/fc_run.py
-@@ -1,3 +1,5 @@
-+#!/usr/bin/python
-+
- from falcon_kit.mains.run1 import main
- import sys
- 
diff --git a/debian/patches/build-system.patch b/debian/patches/build-system.patch
new file mode 100644
index 0000000..9bd46d1
--- /dev/null
+++ b/debian/patches/build-system.patch
@@ -0,0 +1,78 @@
+Description: Adjust build system for Debian packaging
+ * Do not use pip to install included Python packages
+ * Do not use git-sym - the data have already been included in the tarball
+ * Slight changes to Makefile rules and dependencies
+Author: Afif Elghraoui <afif at debian.org>
+Forwarded: not-needed
+Last-Update: 2016-10-22
+--- falcon.orig/default-env.sh
++++ falcon/default-env.sh
+@@ -1,5 +1,4 @@
+ FALCON_WORKSPACE=$(pwd)
+-PYTHONUSERBASE=$(pwd)/fc_env
+ FALCON_PREFIX=${PYTHONUSERBASE}
+ PATH=${PYTHONUSERBASE}/bin:${FALCON_PREFIX}/bin:${PATH}
+ export PYTHONUSERBASE
+--- falcon.orig/FALCON-make/makefile
++++ falcon/FALCON-make/makefile
+@@ -9,18 +9,18 @@
+ #   PYTHONUSERBASE
+ FALCON_PIP_EDIT?=--edit
+ FALCON_INSTALL_RULE?=symlink
++FALCON_PYFLAGS += --prefix ${FALCON_PREFIX}
+ export CC=gcc
+ export CXX=g++
+ 
+ all: checklist
+ 	${MAKE} show
+-	${MAKE} install-pip
+ 	${MAKE} install
+ 	${MAKE} check
+ checklist:
+ 	@if [ -z "$${FALCON_PREFIX}" ]; then echo 'Error: FALCON_PREFIX is not set'; exit 1; fi
+ 	@if [ ! -e "$${FALCON_PREFIX}/bin" ] ; then echo 'Error: directory FALCON_PREFIX/bin (${FALCON_PREFIX}/bin) does not exist'; exit 1; fi
+-install: install-DAZZ_DB install-DALIGNER install-DAMASKER install-pypeFLOW install-FALCON install-git-sym
++install: install-DAZZ_DB install-DALIGNER install-DAMASKER install-pypeFLOW install-FALCON
+ install-DAZZ_DB:
+ 	${MAKE} -C ${FALCON_WORKSPACE}/DAZZ_DB all
+ 	PREFIX=${FALCON_PREFIX} ${MAKE} -C ${FALCON_WORKSPACE}/DAZZ_DB ${FALCON_INSTALL_RULE}
+@@ -31,9 +31,9 @@
+ 	${MAKE} -C ${FALCON_WORKSPACE}/DAMASKER all
+ 	PREFIX=${FALCON_PREFIX} ${MAKE} -C ${FALCON_WORKSPACE}/DAMASKER ${FALCON_INSTALL_RULE}
+ install-pypeFLOW:
+-	cd ${FALCON_WORKSPACE}/pypeFLOW; pip uninstall -v .; pip install -v ${FALCON_PIP_USER} ${FALCON_PIP_EDIT} .
++	cd ${FALCON_WORKSPACE}/pypeFLOW; python setup.py install ${FALCON_PYFLAGS}
+ install-FALCON: install-pypeFLOW
+-	cd ${FALCON_WORKSPACE}/FALCON; pip uninstall -v .; pip install -v ${FALCON_PIP_USER} ${FALCON_PIP_EDIT} .
++	cd ${FALCON_WORKSPACE}/FALCON; python setup.py install ${FALCON_PYFLAGS}
+ install-git-sym:
+ 	# TODO: copy vs. symlink?
+ 	ln -sf $(abspath ${FALCON_WORKSPACE}/git-sym/git-sym) ${FALCON_PREFIX}/bin/git-sym
+--- falcon.orig/FALCON-examples/makefile
++++ falcon/FALCON-examples/makefile
+@@ -1,15 +1,23 @@
+ default:
+ 	@echo 'Try "make run-foo" for any sub-dir of run/.'
+-run-%: setup-%
++run-%:
+ 	cd run/$*; fc_run.py fc_run.cfg logging.ini
++clean-%:
++	${MAKE} -C run/$* clean
+ setup-%:
+ 	git-sym update run/$*
+ 	git-sym show run/$*
+ 	git-sym check run/$*
+ # Our only integration test, for now.
+-test:
++test: full-test import-test ;
++
++.PHONY: import-test
++import-test:
+ 	python -c 'import pypeflow.common; print pypeflow.common'
+ 	python -c 'import falcon_kit; print falcon_kit.falcon'
++
++.PHONY: full-test
++full-test:
+ 	${MAKE} run-synth0
+ 	${MAKE} -C run/synth0 test
+ 	${MAKE} -C run/synth0 clean
diff --git a/debian/patches/pyscripts.patch b/debian/patches/pyscripts.patch
deleted file mode 100644
index 815e22e..0000000
--- a/debian/patches/pyscripts.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Description: Don't install hand-written scripts
- The setup script generates entry points automatically.
-Author: Afif Elghraoui <afif at debian.org>
-Last-Update: 2016-06-22
---- falconkit.orig/setup.py
-+++ falconkit/setup.py
-@@ -61,7 +61,6 @@
-       extras_require = {
-           'falcon-task':  ['falcon_kit'],
-       },
--      scripts = scripts,
-       zip_safe = False,
-       setup_requires=install_requires,
-       install_requires=install_requires
diff --git a/debian/patches/rdflib.patch b/debian/patches/rdflib.patch
new file mode 100644
index 0000000..dccd94f
--- /dev/null
+++ b/debian/patches/rdflib.patch
@@ -0,0 +1,32 @@
+Description: Update to rdflib 4.x
+ rdflib-extras is obsolete. See
+ http://rdflib3.readthedocs.io/en/latest/upgrade3to4.html
+Author: Afif Elghraoui <afif at debian.org>
+Forwarded: no
+Last-Update: 2016-10-22
+--- falcon.orig/pypeFLOW/setup.py
++++ falcon/pypeFLOW/setup.py
+@@ -14,8 +14,7 @@
+     package_dir = {'':'.'},
+     zip_safe = False,
+     install_requires=[
+-        'rdflib == 3.4.0',
+-        'rdfextras >= 0.1',
++        'rdflib',
+         'html5lib == 0.999999',
+     ],
+     entry_points = {'console_scripts': [
+--- falcon.orig/pypeFLOW/pypeflow/common.py
++++ falcon/pypeFLOW/pypeflow/common.py
+@@ -34,11 +34,6 @@
+ import rdflib
+ try:
+     from rdflib import ConjunctiveGraph as Graph #work for rdflib-3.1.0
+-    # need to install rdfextras for rdflib-3.0.0
+-    rdflib.plugin.register('sparql', rdflib.query.Processor,
+-                           'rdfextras.sparql.processor', 'Processor')
+-    rdflib.plugin.register('sparql', rdflib.query.Result,
+-                           'rdfextras.sparql.query', 'SPARQLQueryResult')
+ except Exception:
+     from rdflib.Graph import ConjunctiveGraph as Graph #work for rdflib-2.4.2
+ from rdflib import Namespace
diff --git a/debian/patches/series b/debian/patches/series
index 2b6d660..91f7636 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,3 @@
-add-shebang-lines.patch
-networkx-version.patch
-pyscripts.patch
+build-system.patch
+rdflib.patch
+versioned-deps.patch
diff --git a/debian/patches/networkx-version.patch b/debian/patches/versioned-deps.patch
similarity index 54%
rename from debian/patches/networkx-version.patch
rename to debian/patches/versioned-deps.patch
index 9243107..4ade4bd 100644
--- a/debian/patches/networkx-version.patch
+++ b/debian/patches/versioned-deps.patch
@@ -4,8 +4,8 @@ Description: Remove networkx max version
  aside from lack of testing.
 Author: Afif Elghraoui <afif at debian.org>
 Last-Update: 2016-06-22
---- falconkit.orig/setup.py
-+++ falconkit/setup.py
+--- falcon.orig/FALCON/setup.py
++++ falcon/FALCON/setup.py
 @@ -5,7 +5,7 @@
  import glob
  
@@ -15,3 +15,14 @@ Last-Update: 2016-06-22
          #"logging_tree",
          #"pbcore >= 0.6.3",
          ]
+--- falcon.orig/pypeFLOW/setup.py
++++ falcon/pypeFLOW/setup.py
+@@ -15,7 +15,7 @@
+     zip_safe = False,
+     install_requires=[
+         'rdflib',
+-        'html5lib == 0.999999',
++        'html5lib',
+     ],
+     entry_points = {'console_scripts': [
+             'pwatcher-main=pwatcher.mains.pwatcher:main',
diff --git a/debian/rules b/debian/rules
index 39566ea..d0c94df 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,31 +1,40 @@
 #!/usr/bin/make -f
 
 #DH_VERBOSE = 1
+#include /usr/share/dpkg/default.mk
+export LC_ALL=C.UTF-8
 
-include /usr/share/dpkg/default.mk
-
-define link-man =
-ln -s $1 \
-$(CURDIR)/debian/$(DEB_SOURCE)/usr/share/man/man1/`basename $2`
-endef
+export FALCON_WORKSPACE=$(CURDIR)
+export FALCON_PREFIX=$(CURDIR)/inst
+export FALCON_INSTALL_RULE=install
 
-export LC_ALL=C.UTF-8
+export PYTHONPATH:=$(FALCON_PREFIX)/lib/python2.7/site-packages:$(PYTHONPATH)
 
 %:
-	dh $@ --with python2 --buildsystem=pybuild
-
-override_dh_auto_test:
-	PYBUILD_SYSTEM=custom \
-	PYBUILD_TEST_ARGS="nosetests -v test/" dh_auto_test
-
-override_dh_link:
-	for script in $(CURDIR)/debian/$(DEB_SOURCE)/usr/bin/*; \
-	do \
-	$(call link-man,falconkit.1,$$script.1); \
-	done
-	dh_link
-
-override_dh_fixperms:
-	dh_fixperms
-	chmod -x \
-	$(CURDIR)/debian/$(DEB_SOURCE)/usr/share/doc/$(DEB_SOURCE)/examples/fc_run_LG.cfg
+	dh $@ --with python2
+
+override_dh_auto_build:
+	mkdir -p \
+		$(FALCON_PREFIX)/bin \
+		$(FALCON_PREFIX)/include \
+		$(FALCON_PREFIX)/lib \
+		$(FALCON_PREFIX)/lib/python2.7/site-packages
+	$(MAKE) all
+
+override_dh_auto_test: unit-tests integration-tests ;
+
+.PHONY: unit-tests
+unit-tests:
+	nosetests -v FALCON/test/
+
+.PHONY: integration-tests
+integration-tests:
+	PATH=$(FALCON_PREFIX)/bin:$(PATH) $(MAKE) test
+	$(MAKE) -C FALCON-examples clean-synth0
+
+override_dh_install:
+	dh_install -XLICENSE
+
+override_dh_auto_clean:
+	dh_auto_clean
+	$(RM) -r $(FALCON_PREFIX)
diff --git a/debian/tests/control b/debian/tests/control
index 980f700..9068835 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,7 +1,15 @@
 Test-Command:
-	cp -r test test_data $ADTTMP && cd $ADTTMP && nosetests -v test/
-Depends:
-	@,
-	python-nose,
-Restrictions:
-	allow-stderr,
+	export PYTHONPATH=/usr/lib/falcon/lib/python2.7/site-packages;
+	cp -r FALCON/test FALCON/test_data $ADTTMP
+	&& cd $ADTTMP
+	&& nosetests -v test/
+Depends: @, python-nose
+Restrictions: allow-stderr
+
+Test-Command:
+	cp -r /usr/share/doc/falcon/examples/* $ADTTMP
+	&& cd $ADTTMP;
+	find -name "*.gz" -exec gunzip {} +;
+	make full-test
+Depends: @, make
+Restrictions: allow-stderr

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/falcon.git



More information about the debian-med-commit mailing list