Emmanuel Arias pushed to branch master at Debian Med / kineticstools
Commits: ccce34da by Emmanuel Arias at 2025-01-22T18:43:25-03:00 * d/patches/remove-pkg-resources.patch: Add patch to replace the usages of pkg_resources with importlib.resources. - Thanks Vladimir Petko for the patch. - - - - - 7fadeead by Emmanuel Arias at 2025-01-22T19:47:40-03:00 d/t/control: disable cram autopkgtests. detection_bam* tests are already disabled due to the missing data, version.t test fails due to the different usage formatting in python 3.13 (Closes: #1092749). * d/t/control: disable cram autopkgtests. detection_bam* tests are already disabled due to the missing data, version.t test fails due to the different usage formatting in python 3.13 (Closes: #1092749). - Thanks Vladimir Petko for the patch. - - - - - 6f9b2e0c by Emmanuel Arias at 2025-01-22T19:47:56-03:00 prepare for upload - - - - - 4 changed files: - debian/changelog - + debian/patches/remove-pkg-resources.patch - debian/patches/series - debian/tests/control Changes: ===================================== debian/changelog ===================================== @@ -1,3 +1,16 @@ +kineticstools (0.6.1+git20220223.1326a4d+dfsg-5) unstable; urgency=medium + + * Team upload. + * d/patches/remove-pkg-resources.patch: Add patch to replace the usages of + pkg_resources with importlib.resources. + - Thanks Vladimir Petko for the patch. + * d/t/control: disable cram autopkgtests. detection_bam* tests are already + disabled due to the missing data, version.t test fails due to the + different usage formatting in python 3.13 (Closes: #1092749). + - Thanks Vladimir Petko for the patch. + + -- Emmanuel Arias <[email protected]> Wed, 22 Jan 2025 18:39:57 -0300 + kineticstools (0.6.1+git20220223.1326a4d+dfsg-4) unstable; urgency=medium * Team upload. ===================================== debian/patches/remove-pkg-resources.patch ===================================== @@ -0,0 +1,58 @@ +Description: Remove usages of pkg_resources + pkg_resources are no longer available in Python 3.12 due to setuptools + removal from the default installation. This patch replaces the usages of + pkg_resources with importlib.resources. +Author: Vladimir Petko <[email protected]> +Bug: https://github.com/PacificBiosciences/kineticsTools/pull/105 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/kineticstools/+bug/2095050 +Last-Update: 2025-01-16 + +--- a/kineticsTools/ipdModel.py ++++ b/kineticsTools/ipdModel.py +@@ -1,4 +1,4 @@ +-from pkg_resources import Requirement, resource_filename ++from importlib import resources + import logging + import gzip + import os.path as op +@@ -47,9 +47,11 @@ + + + def _getAbsPath(fname): +- return resource_filename(Requirement.parse( +- 'kineticsTools'), 'kineticsTools/%s' % fname) +- ++ try: ++ with resources.as_file(resources.files('kineticsTools') / fname) as path: ++ return str(path) ++ except: ++ return os.path.join(os.path.dirname(__file__), path) + + class GbmContextModel(object): + +--- a/kineticsTools/ipdSummary.py ++++ b/kineticsTools/ipdSummary.py +@@ -20,7 +20,7 @@ + import numpy as np + import queue + import traceback +-from pkg_resources import Requirement, resource_filename ++from importlib import resources + + from pbcommand.common_options import add_debug_option + from pbcommand.cli import get_default_argparser_with_base_opts, pacbio_args_runner +@@ -43,9 +43,11 @@ + + + def _getResourcePathSpec(): +- default_dir = resource_filename(Requirement.parse( +- 'kineticsTools'), 'kineticsTools/resources') +- return loader.getResourcePathSpec(default_dir) ++ try: ++ with resources.as_file(resources.files('kineticTools') / 'resources') as path: ++ return loader.getResourcePathSpec(path) ++ except: ++ return loader.getResourcePathSpec(os.path.join(os.path.dirname(__file__), 'resources')) + + + def _validateResource(func, p): ===================================== debian/patches/series ===================================== @@ -7,3 +7,4 @@ spelling.patch #ignore_h5py_deprecation_warnings_in_test.patch tests2to3.patch man-align-cols.patch +remove-pkg-resources.patch ===================================== debian/tests/control ===================================== @@ -2,11 +2,12 @@ Test-Command: cp -r Makefile test $AUTOPKGTEST_TMP/ && cd $AUTOPKGTEST_TMP && ln -s /usr/share/kineticstools kineticsTools - && make -k py-tests cram-tests -Depends: - make, - @, - python3-cram, - python3-pytest, - hdf5-tools, + && make -k py-tests +Depends: hdf5-tools, + make, + python3-cram, + python3-pytest, + python3-pytest-cov, + python3-pytest-xdist, + @, Restrictions: allow-stderr, View it on GitLab: https://salsa.debian.org/med-team/kineticstools/-/compare/8153139da559c0748d8815aff8ad44b255a469cd...6f9b2e0c8f4b78455451cf33c2cd4b6e82fb8f37 -- View it on GitLab: https://salsa.debian.org/med-team/kineticstools/-/compare/8153139da559c0748d8815aff8ad44b255a469cd...6f9b2e0c8f4b78455451cf33c2cd4b6e82fb8f37 You're receiving this email because of your account on salsa.debian.org.
_______________________________________________ debian-med-commit mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-commit
