[med-svn] [Git][med-team/python-parasail][upstream] New upstream version 1.3.3

Andreas Tille (@tille) gitlab at salsa.debian.org
Mon Dec 5 17:13:08 GMT 2022



Andreas Tille pushed to branch upstream at Debian Med / python-parasail


Commits:
354e1d98 by Andreas Tille at 2022-12-05T18:07:43+01:00
New upstream version 1.3.3
- - - - -


7 changed files:

- CHANGELOG.rst
- MANIFEST.in
- README.rst
- parasail/__init__.py
- parasail/bindings_v2.py
- setup.py
- tools/ctypesgen2.py


Changes:

=====================================
CHANGELOG.rst
=====================================
@@ -10,9 +10,33 @@ Unreleased_
 -----------
 The Unreleased section will be empty for tagged releases. Unreleased functionality appears in the develop branch.
 
-------------------
-1.2.4 - 2021-02-06
-------------------
+-------------------
+1.3.3_ - 2022-08-26
+-------------------
+- CI improvements
+  - build all wheel targets in parallel 
+  - run tests as part of build
+- fix win_amd64 wheel builds
+
+-------------------
+1.3.2_ - 2022-08-25
+-------------------
+- Version bump to force rebuilding of wheels
+
+-------------------
+1.3.1_ - 2022-08-24
+-------------------
+- Fix macos wheel build
+- Add C parasail headers into wheels, add get_include() and get_library()
+
+-----------------
+1.3_ - 2022-08-22
+-----------------
+- Add bindings for sg_qb_db and sg_qe_de
+
+-------------------
+1.2.4_ - 2021-02-06
+-------------------
 - Fix #60 Missing wheels on PyPI
 
 -------------------
@@ -163,7 +187,11 @@ The Unreleased section will be empty for tagged releases. Unreleased functionali
 -------------------
 First tagged release. The 'master' branch always represents the latest stable code. Tagged releases correspond to pypi releases.
 
-.. _Unreleased: https://github.com/jeffdaily/parasail-python/compare/v1.2.3...master
+.. _Unreleased: https://github.com/jeffdaily/parasail-python/compare/v1.3.3...master
+.. _1.3.3:   https://github.com/jeffdaily/parasail-python/compare/v1.3.2...v1.3.3
+.. _1.3.2:   https://github.com/jeffdaily/parasail-python/compare/v1.3.1...v1.3.2
+.. _1.3.1:   https://github.com/jeffdaily/parasail-python/compare/v1.3...v1.3.1
+.. _1.3:     https://github.com/jeffdaily/parasail-python/compare/v1.2.4...v1.3
 .. _1.2.4:   https://github.com/jeffdaily/parasail-python/compare/v1.2.3...v1.2.4
 .. _1.2.3:   https://github.com/jeffdaily/parasail-python/compare/v1.2.2...v1.2.3
 .. _1.2.2:   https://github.com/jeffdaily/parasail-python/compare/v1.2.1...v1.2.2


=====================================
MANIFEST.in
=====================================
@@ -9,6 +9,7 @@ include parasail/bindings_v2.py
 exclude parasail/libparasail.so
 exclude parasail/libparasail.dylib
 exclude parasail/parasail.dll
+recursive-exclude parasail/include *.h
 include setup.cfg
 include setup.py
 include tests/test_basic.py


=====================================
README.rst
=====================================
@@ -117,21 +117,23 @@ Standard Function Naming Convention
 There are many functions within the parasail library, but most are variations of the familiar main
 algorithms.  The following table describes the main algorithms and the shorthand name used for the function.
 
-=================================================================================== =============
-Algorithm                                                                           Function Name
-=================================================================================== =============
-Smith-Waterman local alignment                                                      sw
-Needleman-Wunsch global alignment                                                   nw
-Semi-Global, do not penalize gaps at beginning of s1/query                          sg_qb
-Semi-Global, do not penalize gaps at end of s1/query                                sg_qe
-Semi-Global, do not penalize gaps at beginning and end of s1/query                  sg_qx
-Semi-Global, do not penalize gaps at beginning of s2/database                       sg_db
-Semi-Global, do not penalize gaps at end of s2/database                             sg_de
-Semi-Global, do not penalize gaps at beginning and end of s2/database               sg_dx
-Semi-Global, do not penalize gaps at beginning of s1/query and end of s2/database   sg_qb_de
-Semi-Global, do not penalize gaps at beginning of s2/database and end of s1/query   sg_qe_db
-Semi-Global, do not penalize gaps at beginning and end of both sequences            sg
-=================================================================================== =============
+========================================================================================= =============
+Algorithm                                                                                 Function Name
+========================================================================================= =============
+Smith-Waterman local alignment                                                            sw
+Needleman-Wunsch global alignment                                                         nw
+Semi-Global, do not penalize gaps at beginning of s1/query                                sg_qb
+Semi-Global, do not penalize gaps at end of s1/query                                      sg_qe
+Semi-Global, do not penalize gaps at beginning and end of s1/query                        sg_qx
+Semi-Global, do not penalize gaps at beginning of s2/database                             sg_db
+Semi-Global, do not penalize gaps at end of s2/database                                   sg_de
+Semi-Global, do not penalize gaps at beginning and end of s2/database                     sg_dx
+Semi-Global, do not penalize gaps at beginning of s1/query and end of s2/database         sg_qb_de
+Semi-Global, do not penalize gaps at beginning of s2/database and end of s1/query         sg_qe_db
+Semi-Global, do not penalize gaps at beginning of s1/query and beginning of s2/database   sg_qb_db
+Semi-Global, do not penalize gaps at end of s2/database and end of s1/query               sg_qe_de
+Semi-Global, do not penalize gaps at beginning and end of both sequences                  sg
+========================================================================================= =============
 
 A good summary of the various alignment algorithms can be found courtesy of Dr. Dannie Durand's course on
 computational genomics `here <http://www.cs.cmu.edu/~durand/03-711/2015/Lectures/PW_sequence_alignment_2015.pdf>`_.
@@ -145,13 +147,13 @@ To make it easier to find the function you're looking for, the function names fo
   - Optional return alignment statistics.
   - Optional return DP table or last row/col.
   - Optional use a prefix scan implementation.
-  - ``parasail. {nw,sg,sg_qb,sg_qe,sg_qx,sg_db,sg_de,sg_dx,sg_qb_de,sg_qe_db,sw} [_stats] [{_table,_rowcol}] [_scan]``
+  - ``parasail. {nw,sg,sg_qb,sg_qe,sg_qx,sg_db,sg_de,sg_dx,sg_qb_de,sg_qe_db,sg_qb_db,sg_qe_de,sw} [_stats] [{_table,_rowcol}] [_scan]``
 
 - Non-vectorized, traceback-capable reference implementations.
 
   - Required, select algorithm from table above.
   - Optional use a prefix scan implementation.
-  - ``parasail. {nw,sg,sg_qb,sg_qe,sg_qx,sg_db,sg_de,sg_dx,sg_qb_de,sg_qe_db,sw} _trace [_scan]``
+  - ``parasail. {nw,sg,sg_qb,sg_qe,sg_qx,sg_db,sg_de,sg_dx,sg_qb_de,sg_qe_db,sg_qb_db,sg_qe_de,sw} _trace [_scan]``
 
 - Vectorized.
 
@@ -160,14 +162,14 @@ To make it easier to find the function you're looking for, the function names fo
   - Optional return DP table or last row/col.
   - Required, select vectorization strategy -- striped is a good place to start, but scan is often faster for global alignment.
   - Required, select solution width. 'sat' will attempt 8-bit solution but if overflow is detected it will then perform the 16-bit operation. Can be faster in some cases, though 16-bit is often sufficient.
-  - ``parasail. {nw,sg,sg_qb,sg_qe,sg_qx,sg_db,sg_de,sg_dx,sg_qb_de,sg_qe_db,sw} [_stats] [{_table,_rowcol}] {_striped,_scan,_diag} {_8,_16,_32,_64,_sat}``
+  - ``parasail. {nw,sg,sg_qb,sg_qe,sg_qx,sg_db,sg_de,sg_dx,sg_qb_de,sg_qe_db,sg_qb_db,sg_qe_de,sw} [_stats] [{_table,_rowcol}] {_striped,_scan,_diag} {_8,_16,_32,_64,_sat}``
 
 - Vectorized, traceback-capable.
 
   - Required, select algorithm from table above.
   - Required, select vectorization strategy -- striped is a good place to start, but scan is often faster for global alignment.
   - Required, select solution width. 'sat' will attempt 8-bit solution but if overflow is detected it will then perform the 16-bit operation. Can be faster in some cases, though 16-bit is often sufficient.
-  - ``parasail. {nw,sg,sg_qb,sg_qe,sg_qx,sg_db,sg_de,sg_dx,sg_qb_de,sg_qe_db,sw} _trace {_striped,_scan,_diag} {_8,_16,_32,_64,_sat}``
+  - ``parasail. {nw,sg,sg_qb,sg_qe,sg_qx,sg_db,sg_de,sg_dx,sg_qb_de,sg_qe_db,sg_qb_db,sg_qe_de,sw} _trace {_striped,_scan,_diag} {_8,_16,_32,_64,_sat}``
 
 Profile Function Naming Convention
 ----------------------------------
@@ -191,14 +193,14 @@ It has been noted in literature that some performance can be gained by reusing t
     - Optional return DP table or last row/col.
     - Required, select vectorization strategy -- striped is a good place to start, but scan is often faster for global alignment.
     - Required, select solution width. 'sat' will attempt 8-bit solution but if overflow is detected it will then perform the 16-bit operation. Can be faster in some cases, though 16-bit is often sufficient.
-    - ``parasail. {nw,sg,sg_qb,sg_qe,sg_qx,sg_db,sg_de,sg_dx,sg_qb_de,sg_qe_db,sw} [_stats] [{_table,_rowcol}] {_striped,_scan} _profile {_8,_16,_32,_64,_sat}``
+    - ``parasail. {nw,sg,sg_qb,sg_qe,sg_qx,sg_db,sg_de,sg_dx,sg_qb_de,sg_qe_db,sg_qb_db,sg_qe_de,sw} [_stats] [{_table,_rowcol}] {_striped,_scan} _profile {_8,_16,_32,_64,_sat}``
 
   - Vectorized, traceback-capable.
 
     - Required, select algorithm from table above.
     - Required, select vectorization strategy -- striped is a good place to start, but scan is often faster for global alignment.
     - Required, select solution width. 'sat' will attempt 8-bit solution but if overflow is detected it will then perform the 16-bit operation. Can be faster in some cases, though 16-bit is often sufficient.
-    - ``parasail. {nw,sg,sg_qb,sg_qe,sg_qx,sg_db,sg_de,sg_dx,sg_qb_de,sg_qe_db,sw} _trace {_striped,_scan} _profile {_8,_16,_32,_64,_sat}``
+    - ``parasail. {nw,sg,sg_qb,sg_qe,sg_qx,sg_db,sg_de,sg_dx,sg_qb_de,sg_qe_db,sg_qb_db,sg_qe_de,sw} _trace {_striped,_scan} _profile {_8,_16,_32,_64,_sat}``
 
 Please note that the bit size you select for creating the profile *must* match the bit size of the function you call. The example below uses a 16-bit profile and a 16-bit function.
 


=====================================
parasail/__init__.py
=====================================
@@ -6,7 +6,7 @@ import sys
 
 import numpy
 
-__version__ = "1.2.4"
+__version__ = "1.3.3"
 __title__ = "parasail"
 __description__ = "pairwise sequence alignment library"
 __uri__ = "https://github.com/jeffdaily/parasail-python"
@@ -23,6 +23,7 @@ if platform.system() == 'Darwin':
 elif platform.system() == 'Windows':
     _libname = "parasail.dll"
 _libpath = os.path.join(os.path.dirname(__file__), _libname)
+_includepath = os.path.join(os.path.dirname(__file__), "include")
 
 _verbose = os.environ.get("PARASAIL_VERBOSE", False)
 
@@ -92,3 +93,12 @@ if major == 1:
 else:
     from parasail.bindings_v2 import *
 
+def get_include():
+    """ Returns the path of the Parasail C library include files.
+    """
+    return _includepath
+
+def get_library():
+    """ Returns the path of the Parasail C library shared object file.
+    """
+    return _libpath


=====================================
parasail/bindings_v2.py
=====================================
The diff for this file was not included because it is too large.

=====================================
setup.py
=====================================
@@ -13,6 +13,7 @@ except ImportError:
 import tarfile
 import zipfile
 
+from distutils.dir_util import copy_tree
 from distutils.util import get_platform
 from setuptools import setup
 from setuptools.command.install import install as install_
@@ -55,8 +56,8 @@ HERE = os.path.abspath(os.path.dirname(__file__))
 
 
 def is_python_64bit():
-    import struct
-    return struct.calcsize('P')*8 == 64
+    import sys
+    return sys.maxsize > 2**32
 
 def read(*parts):
     """
@@ -93,6 +94,11 @@ def get_libname():
         libname = "parasail.dll"
     return libname
 
+def get_includes():
+    return ["include/*.h",
+            "include/parasail/*.h",
+            "include/parasail/matrices/*.h"]
+
 def unzip(archive, destdir):
     thefile=zipfile.ZipFile(archive)
     thefile.extractall(destdir)
@@ -364,6 +370,16 @@ def build_parasail(libname):
     print("copying {} to {}".format(src,dst))
     shutil.copy(src,dst)
 
+    # copy headers into the parasail directory, so they can be added to the wheel
+    parasail_headers = os.path.join(parasail_root, "parasail")
+    dst = os.path.join("parasail", "include", "parasail")
+    print("copying {} to {}".format(parasail_headers, dst))
+    copy_tree(parasail_headers, dst)
+    parasail_h = os.path.join(parasail_root, "parasail.h")
+    dst = os.path.join("parasail", "include")
+    print("copying {} to {}".format(parasail_h, dst))
+    shutil.copy(parasail_h, dst)
+
 def github_api_json(address):
     import json
     import sys
@@ -421,9 +437,9 @@ def download_windows_dll():
     else:
         # we failed all the attempts - deal with the consequences.
         raise RuntimeError("All attempts to download asset URL have failed")
-    destdir = archive.rsplit('.',1)[0]
+    unzipped_archive_destination = archive.rsplit('.',1)[0]
     print("Unzipping {}".format(archive))
-    unzip(archive, destdir)
+    unzip(archive, unzipped_archive_destination)
     print("Locating {}".format(libname))
     root = find_file(libname)
     src = os.path.join(root, libname)
@@ -431,6 +447,15 @@ def download_windows_dll():
     print("copying {} to {}".format(src,dst))
     shutil.copy(src,dst)
 
+    # copy headers into the parasail directory, so they can be added to the wheel
+    headers_src = os.path.join(root, "..", "include")
+    dst = os.path.join("parasail", "include")
+    print("copying {} to {}".format(headers_src, dst))
+    copy_tree(headers_src, dst)
+
+    # clean up downloaded asset
+    shutil.rmtree(unzipped_archive_destination)
+
 def prepare_shared_lib():
     libname = get_libname()
     libpath = os.path.join("parasail", libname)
@@ -443,6 +468,8 @@ def prepare_shared_lib():
             download_windows_dll()
         else:
             build_parasail(libname)
+    else:
+        print("{} found, skipping build".format(libpath))
     if not os.path.exists(libpath):
         raise RuntimeError("Unable to find shared library {}.".format(libname))
 
@@ -470,6 +497,16 @@ if __name__ == "__main__":
     except ImportError:
         cmdclass = {'install': install}
 
+    # cibuildwheel for windows wasn't properly cleaning up after each build
+    # it is necessary to fully remove the build directory once at the beginning
+    # prior to building.
+    if platform.system() == "Windows":
+        if os.path.exists("build"):
+            print("Removing old build directory")
+            shutil.rmtree("build")
+        else:
+            print("No previous build directory detected")
+
     long_description = ""
     try:
         long_description = open("README.rst", encoding="utf8").read()
@@ -488,7 +525,7 @@ if __name__ == "__main__":
         maintainer_email=find_meta("email"),
         keywords=KEYWORDS,
         packages=PACKAGES,
-        package_data={"parasail": [get_libname()]},
+        package_data={"parasail": [get_libname()] + get_includes()},
         cmdclass=cmdclass,
         zip_safe=False,
         classifiers=CLASSIFIERS,


=====================================
tools/ctypesgen2.py
=====================================
@@ -1068,7 +1068,7 @@ _argtypes = [ctypes.c_char_p, ctypes.c_int, ctypes.c_char_p, ctypes.c_int, ctype
 """)
 
 # serial reference implementations
-alg = ["nw", "sg", "sw", "sg_qb", "sg_qe", "sg_qx", "sg_db", "sg_de", "sg_dx", "sg_qb_de", "sg_qe_db"]
+alg = ["nw", "sg", "sw", "sg_qb", "sg_qe", "sg_qx", "sg_db", "sg_de", "sg_dx", "sg_qb_de", "sg_qe_db", "sg_qb_db", "sg_qe_de"]
 stats = ["", "_stats"]
 table = ["", "_table", "_rowcol", "_trace"]
 for a in alg:
@@ -1087,7 +1087,7 @@ for a in alg:
                 myprint(" "*8+"len(s1), len(s2))")
 
 ## serial scan reference implementations
-alg = ["nw", "sg", "sw", "sg_qb", "sg_qe", "sg_qx", "sg_db", "sg_de", "sg_dx", "sg_qb_de", "sg_qe_db"]
+alg = ["nw", "sg", "sw", "sg_qb", "sg_qe", "sg_qx", "sg_db", "sg_de", "sg_dx", "sg_qb_de", "sg_qe_db", "sg_qb_db", "sg_qe_de"]
 stats = ["", "_stats"]
 table = ["", "_table", "_rowcol", "_trace"]
 for a in alg:
@@ -1106,7 +1106,7 @@ for a in alg:
                 myprint(" "*8+"len(s1), len(s2))")
 
 # vectorized implementations
-alg = ["nw", "sg", "sw", "sg_qb", "sg_qe", "sg_qx", "sg_db", "sg_de", "sg_dx", "sg_qb_de", "sg_qe_db"]
+alg = ["nw", "sg", "sw", "sg_qb", "sg_qe", "sg_qx", "sg_db", "sg_de", "sg_dx", "sg_qb_de", "sg_qe_db", "sg_qb_db", "sg_qe_de"]
 stats = ["", "_stats"]
 table = ["", "_table", "_rowcol", "_trace"]
 par = ["_scan", "_striped", "_diag"]
@@ -1133,7 +1133,7 @@ _argtypes = [c_profile_p, ctypes.c_char_p, ctypes.c_int, ctypes.c_int, ctypes.c_
 """)
 
 # vectorized profile implementations
-alg = ["nw", "sg", "sw", "sg_qb", "sg_qe", "sg_qx", "sg_db", "sg_de", "sg_dx", "sg_qb_de", "sg_qe_db"]
+alg = ["nw", "sg", "sw", "sg_qb", "sg_qe", "sg_qx", "sg_db", "sg_de", "sg_dx", "sg_qb_de", "sg_qe_db", "sg_qb_db", "sg_qe_de"]
 stats = ["", "_stats"]
 table = ["", "_table", "_rowcol", "_trace"]
 par = ["_scan_profile", "_striped_profile"]



View it on GitLab: https://salsa.debian.org/med-team/python-parasail/-/commit/354e1d980e6d60b9a20036f81b4a6d5c7e4658e2

-- 
View it on GitLab: https://salsa.debian.org/med-team/python-parasail/-/commit/354e1d980e6d60b9a20036f81b4a6d5c7e4658e2
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/20221205/7ee18533/attachment-0001.htm>


More information about the debian-med-commit mailing list