[med-svn] [Git][med-team/snakemake][master] Attempt -2

Steffen Möller (@moeller) gitlab at salsa.debian.org
Tue Oct 19 21:06:52 BST 2021



Steffen Möller pushed to branch master at Debian Med / snakemake


Commits:
33dbba63 by Steffen Moeller at 2021-10-19T21:55:24+02:00
Attempt -2

- - - - -


6 changed files:

- debian/changelog
- debian/control
- debian/rules
- − debian/snakemake.examples
- − debian/snakemake.install
- debian/tests/control


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+snakemake (6.9.1+dfsg1-2) UNRELEASED; urgency=medium
+
+  * Team upload.
+  * Removing .snakemake folders from .deb
+  * Separated documentation and tests into -doc package
+
+ -- Steffen Moeller <moeller at debian.org>  Tue, 19 Oct 2021 19:47:19 +0200
+
 snakemake (6.9.1+dfsg1-1) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/control
=====================================
@@ -60,7 +60,10 @@ Rules-Requires-Root: no
 
 Package: snakemake
 Architecture: all
-Depends: ca-certificates,
+Depends: ${misc:Depends},
+         ${python3:Depends},
+         ${sphinxdoc:Depends},
+         ca-certificates,
          libjs-bootstrap,
          libjs-d3,
          libjs-jquery,
@@ -81,9 +84,6 @@ Depends: ca-certificates,
          python3-toposort,
          python3-wrapt,
          python3-yaml,
-         ${misc:Depends},
-         ${python3:Depends},
-         ${sphinxdoc:Depends}
 Recommends: cwltool,
             imagemagick,
             python3-tz,
@@ -105,9 +105,38 @@ Recommends: cwltool,
             python3-irodsclient,
             python3-kubernetes,
             python3-urllib3
+Suggests: snakemake-doc
 Description: pythonic workflow management system
  Build systems like GNU Make are frequently used to create complicated
  workflows, e.g. in bioinformatics. This project aims to reduce the
  complexity of creating workflows by providing a clean and modern domain
  specific language (DSL) in Python style, together with a fast and
  comfortable execution environment.
+
+
+#Package: snakemake-doc
+#Architecture: all
+#Depends: ${misc:Depends},
+#         ${sphinxdoc:Depends}
+#Recommends: snakemake
+#Description: documentation for pythonic workflow management system
+# Build systems like GNU Make are frequently used to create complicated
+# workflows, e.g. in bioinformatics. This project aims to reduce the
+# complexity of creating workflows by providing a clean and modern domain
+# specific language (DSL) in Python style, together with a fast and
+# comfortable execution environment.
+# .
+# This package provides the Sphinx-generated documentation and examples.
+#
+#Package: snakemake-test
+#Architecture: all
+#Depends: ${misc:Depends},
+#Recommends: snakemake
+#Description: tests for pythonic workflow management system
+# Build systems like GNU Make are frequently used to create complicated
+# workflows, e.g. in bioinformatics. This project aims to reduce the
+# complexity of creating workflows by providing a clean and modern domain
+# specific language (DSL) in Python style, together with a fast and
+# comfortable execution environment.
+# .
+# This package provides files for the automated testing of snakemake.


=====================================
debian/rules
=====================================
@@ -8,6 +8,12 @@ export PYBUILD_DESTDIR_python3=debian/snakemake
 export PYBUILD_BEFORE_TEST_python3=chmod +x {dir}/bin/snakemake; cp -r {dir}/bin {dir}/tests {build_dir}
 export PYBUILD_TEST_ARGS=python{version} -m pytest -v tests/test*.py -k 'not test_cwl and not test_cwl_singularity and not test_url_include and not test_wrapper and not test_issue1083 and not test_github_issue78 and not test_container and not test_singularity and not test_singularity_conda and not test_convert_to_cwl and not test_report and not test_report_zip and not test_archive and not test_jupyter_notebook and not test_conda and not test_upstream_conda and not test_conda_custom_prefix and not test_script and not test_issue635 and not test_issue1093 and not test_default_resources and not test_default_remote and not test_remote and not test_output_file_cache_remote and not test_tibanna and not test_ancient and not test_module_complex and not test_module_complex2 and not test_module_with_script and not test_module_report and not test_github_issue1062 and not test_env_modules and not test_modules_meta_wrapper and not test_tes'
 
+# Avoiding new queue and leaving all in one big package for now
+#DOCPACKAGE=snakemake-doc
+#TESTPACKAGE=snakemake-test
+DOCPACKAGE=snakemake
+TESTPACKAGE=snakemake
+
 # Skipped because they download executables (which is forbidden in Debian buildd and debci)
 # Snakefile/snakemake-wrapper/CWL scripts: test_cwl, test_cwl_singularity, test_url_include, test_wrapper
 # Docker images: test_issue1083, test_github_issue78, test_container, test_singularity, test_singularity_conda, test_cwl_singularity, test_convert_to_cwl, test_report, test_report_zip
@@ -38,26 +44,41 @@ override_dh_auto_build:
 	PYTHONPATH=$(shell pybuild --print build_dir --interpreter python3) \
 		python3 setup.py build_sphinx
 
-override_dh_auto_install:
-	dh_auto_install
+execute_after_dh_install:
 	find debian/snakemake -name '.gitignore' | xargs -r rm
-	find debian -name '__pycache__' | xargs -r rm -r
-	rm -rf debian/snakemake/usr/share/doc/snakemake/tests/__pycache__
 
 execute_after_dh_installdocs:
-	find debian/ -name '__pycache__' -o -name '\.snakemake' -o -name 'expected-results' | xargs rm -rf
+	find debian/ -name '__pycache__' -o -name '\.snakemake' | xargs rm -rf
 
 # the modules.sh is a workaround for #928826; putting it in PYBUILD_BEFORE_TEST_python3 doesn't work
 override_dh_auto_test:
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 	. /etc/profile.d/modules.sh && PYBUILD_SYSTEM=custom dh_auto_test
+endif
+
+override_dh_installdocs:
+	dh_installdocs
+	rm -rf debian/$(DOCPACKAGE)/usr/share/doc/snakemake/html
+	rm -rf debian/$(DOCPACKAGE)/usr/share/doc/snakemake/examples
+	mkdir -p debian/$(DOCPACKAGE)/usr/share/doc/snakemake/html
+	mkdir -p debian/$(DOCPACKAGE)/usr/share/doc/snakemake/examples
+	cp -r build/sphinx/html/* debian/$(DOCPACKAGE)/usr/share/doc/snakemake/html/
+	cp -r examples/* debian/$(DOCPACKAGE)/usr/share/doc/snakemake/examples
+	find debian -name .snakemake | xargs -r rm -r
 	find debian/snakemake -name '.gitignore' -o -name '.gitkeep' | xargs -r rm
-	find debian -name '__pycache__' | xargs -r rm -r
-	rm -rf debian/snakemake/usr/share/doc/snakemake/tests/__pycache__
+	find debian/$(DOCPACKAGE) -name '.gitignore' -o -name '.gitkeep' | xargs -r rm
+	rm -rf debian/*/usr/share/doc/snakemake/tests/__pycache__
+ifneq (snakemake,$(TESTPACKAGE))
+	if [ -d debian/snakemake/usr/share/doc/snakemake/tests/ ]; then \
+	    mv debian/snakemake/usr/share/doc/snakemake/tests debian/$(TESTPACKAGE)/usr/share/doc/snakemake/ ; \
+	fi
 endif
 
 override_dh_auto_clean:
 	dh_auto_clean
+	# eaasing transition between all-in-one and separate packages
+	rm -rf debian/snakemake-doc debian/snakemake-test
+	# cleaning up after build
 	find . -name '__pycache__' | xargs -r rm -r
 	find . -name '*.pyc' | xargs -r rm
 	rm -f tests/test_filegraph/fg.pdf


=====================================
debian/snakemake.examples deleted
=====================================
@@ -1 +0,0 @@
-examples/* 


=====================================
debian/snakemake.install deleted
=====================================
@@ -1 +0,0 @@
-build/sphinx/html	usr/share/doc/snakemake


=====================================
debian/tests/control
=====================================
@@ -1,11 +1,12 @@
 # minimal Depends smoke test
 Test-Command: cp tests/test_bash/Snakefile $AUTOPKGTEST_TMP && cd $AUTOPKGTEST_TMP && snakemake --cores 1 && grep -e bash test.out
-Depends: snakemake
+Depends: snakemake, snakemake-doc
 Restrictions: allow-stderr
 
 # upstream's tests
 Tests: run-unit-test
 Depends: snakemake,
+         snakemake-doc,
          environment-modules,
          python3-pygraphviz,
          python3-pandas,



View it on GitLab: https://salsa.debian.org/med-team/snakemake/-/commit/33dbba638611d7fbb74c2757b392f4a4967872c3

-- 
View it on GitLab: https://salsa.debian.org/med-team/snakemake/-/commit/33dbba638611d7fbb74c2757b392f4a4967872c3
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20211019/69ce7cd0/attachment-0001.htm>


More information about the debian-med-commit mailing list