[med-svn] [Git][med-team/python-tinyalign][master] 9 commits: routine-update: New upstream version
Lance Lin (@linqigang)
gitlab at salsa.debian.org
Thu Sep 7 16:49:34 BST 2023
Lance Lin pushed to branch master at Debian Med / python-tinyalign
Commits:
d43fbce4 by Lance Lin at 2023-09-07T21:57:32+07:00
routine-update: New upstream version
- - - - -
69795224 by Lance Lin at 2023-09-07T21:57:38+07:00
New upstream version 0.2.2
- - - - -
504467c5 by Lance Lin at 2023-09-07T21:57:39+07:00
Update upstream source from tag 'upstream/0.2.2'
Update to upstream version '0.2.2'
with Debian dir e9ce8906740815787802917685d854ba65e53c18
- - - - -
035dd8f5 by Lance Lin at 2023-09-07T21:57:39+07:00
routine-update: Standards-Version: 4.6.2
- - - - -
754a0b71 by Lance Lin at 2023-09-07T22:00:11+07:00
routine-update: Ready to upload to unstable
- - - - -
1ceb1fe2 by Lance Lin at 2023-09-07T22:26:13+07:00
Update to use supported python versions
- - - - -
d4905fc2 by Lance Lin at 2023-09-07T22:27:01+07:00
Update copyright
- - - - -
76582a1f by Lance Lin at 2023-09-07T22:27:25+07:00
Remove autopkgtest-pkg-python testsuite
- - - - -
61c44551 by Lance Lin at 2023-09-07T22:27:40+07:00
Update changelog
- - - - -
14 changed files:
- .github/workflows/ci.yml
- LICENSE
- − MANIFEST.in
- README.md
- − buildwheels.sh
- debian/changelog
- debian/control
- debian/copyright
- debian/tests/run-unit-test
- pyproject.toml
- setup.py
- + src/tinyalign/_core.pyi
- + src/tinyalign/_version.pyi
- + src/tinyalign/py.typed
Changes:
=====================================
.github/workflows/ci.yml
=====================================
@@ -8,11 +8,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
+ python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- - uses: actions/checkout at v2
+ - uses: actions/checkout at v3
- name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python at v2
+ uses: actions/setup-python at v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
@@ -28,26 +28,19 @@ jobs:
needs: [test]
if: startsWith(github.ref, 'refs/tags')
steps:
- - uses: actions/checkout at v2
+ - uses: actions/checkout at v3
with:
fetch-depth: 0 # required for setuptools_scm
- name: Set up Python
- uses: actions/setup-python at v2
+ uses: actions/setup-python at v4
with:
- python-version: 3.7
+ python-version: "3.11"
- name: Build wheels
- uses: joerick/cibuildwheel at v2.2.2
+ uses: pypa/cibuildwheel at v2.13
with:
output-dir: dist/
env:
- CIBW_BUILD: "cp3*-*"
- CIBW_SKIP: "*-manylinux_i686 *musllinux*"
- # CIBW_MANYLINUX_X86_64_IMAGE: manylinux1
- CIBW_ENVIRONMENT: "CFLAGS=-g0"
- CIBW_TEST_REQUIRES: "pytest"
- CIBW_TEST_COMMAND: |
- cd {project}
- pytest
+ CIBW_BUILD: "cp3*-manylinux_x86_64"
- name: Make sdist
run: |
python -m pip install build
@@ -55,14 +48,14 @@ jobs:
ls -l dist/
- name: Publish dev release to test PyPI
if: contains(github.ref, '.dev')
- uses: pypa/gh-action-pypi-publish at v1.4.2
+ uses: pypa/gh-action-pypi-publish at v1.8.7
with:
user: __token__
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/
- name: Publish to PyPI
if: "!contains(github.ref, '.dev')"
- uses: pypa/gh-action-pypi-publish at v1.4.2
+ uses: pypa/gh-action-pypi-publish at v1.8.7
with:
user: __token__
password: ${{ secrets.pypi_password }}
=====================================
LICENSE
=====================================
@@ -1,4 +1,4 @@
-Copyright (c) 2019-2020 Marcel Martin <marcel.martin at scilifelab.se>
+Copyright (c) 2019 Marcel Martin <marcel.martin at scilifelab.se>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
=====================================
MANIFEST.in deleted
=====================================
@@ -1,4 +0,0 @@
-include README.md
-include LICENSE
-include src/tinyalign/*.c
-include src/tinyalign/_version.py
=====================================
README.md
=====================================
@@ -29,3 +29,10 @@ length of the shortest string, this module is faster.
>>> edit_distance("hello", "world", maxdiff=2)
3
```
+
+
+## Changes
+
+### v0.2.2
+
+* Added type hints
=====================================
buildwheels.sh deleted
=====================================
@@ -1,47 +0,0 @@
-#!/bin/bash
-#
-# Build manylinux wheels. Based on the example at
-# <https://github.com/pypa/python-manylinux-demo>
-#
-# It is best to run this in a fresh clone of the repository!
-#
-# Run this within the repository root:
-# ./buildwheels.sh
-#
-# The wheels will be put into the dist/ subdirectory.
-
-set -xeuo pipefail
-
-manylinux=quay.io/pypa/manylinux2010_x86_64
-
-# For convenience, if this script is called from outside of a docker container,
-# it starts a container and runs itself inside of it.
-if ! grep -q docker /proc/1/cgroup; then
- # We are not inside a container
- docker pull ${manylinux}
- exec docker run --rm -v $(pwd):/io ${manylinux} /io/$0
-fi
-
-if ! test -d /io/dist; then
- mkdir /io/dist
- chown --reference=/io/setup.py /io/dist
-fi
-
-# Strip binaries (copied from multibuild)
-STRIP_FLAGS=${STRIP_FLAGS:-"-Wl,-strip-all"}
-export CFLAGS="${CFLAGS:-$STRIP_FLAGS}"
-export CXXFLAGS="${CXXFLAGS:-$STRIP_FLAGS}"
-
-for PYBIN in /opt/python/cp3[678]-*/bin; do
- ${PYBIN}/pip wheel --no-deps /io/ -w wheelhouse/
-done
-ls wheelhouse/
-
-# Bundle external shared libraries into the wheels
-for whl in wheelhouse/*.whl; do
- auditwheel repair "$whl" --plat manylinux1_x86_64 -w repaired/
-done
-
-# Created files are owned by root, so fix permissions.
-chown -R --reference=/io/setup.py repaired/
-mv repaired/*.whl /io/dist/
=====================================
debian/changelog
=====================================
@@ -1,3 +1,15 @@
+python-tinyalign (0.2.2-1) UNRELEASED; urgency=medium
+
+ * Team upload.
+ * New upstream version
+ * Standards-Version: 4.6.2 (routine-update)
+ * d/tests/run-unit-test: Update to use supported python versions
+ * d/copyright: Remove superfluous file pattern buildwheels.sh and update year
+ to 2023 for debian/* files
+ * d/control: Remove autopkgtest-pkg-python testsuite
+
+ -- Lance Lin <lq27267 at gmail.com> Thu, 07 Sep 2023 22:00:11 +0700
+
python-tinyalign (0.2.1-1) unstable; urgency=medium
* Team upload.
=====================================
debian/control
=====================================
@@ -10,11 +10,10 @@ Build-Depends: debhelper-compat (= 13),
python3-setuptools-scm,
python3-all-dev,
python3-pytest
-Standards-Version: 4.6.0
+Standards-Version: 4.6.2
Homepage: https://github.com/marcelm/tinyalign
Vcs-Browser: https://salsa.debian.org/med-team/python-tinyalign
Vcs-Git: https://salsa.debian.org/med-team/python-tinyalign.git
-Testsuite: autopkgtest-pkg-python
Rules-Requires-Root: no
Package: python3-tinyalign
=====================================
debian/copyright
=====================================
@@ -6,24 +6,9 @@ Files: *
Copyright: 2019-2020 Marcel Martin <marcel.martin at scilifelab.se>
License: MIT
-Files: buildwheels.sh
-Copyright: 2019-2020 Marcel Martin <marcel.martin at scilifelab.se>
-License: MIT
-Comment: This file is derived from build-wheels.sh by Matti Picus
- <mattigit at picus.org.il>, which is released under the CC0. Because
- CC0 is a "no rights reserved" mechanism, Debian assumes that the
- author of tinyalign is free to relicense the derivative work under
- the MIT license.
- .
- Original work:
- https://github.com/pypa/python-manylinux-demo/blob/master/travis/build-wheels.sh
- .
- CC0: https://creativecommons.org/share-your-work/public-domain/cc0/
- .
- CC0 FAQ: https://wiki.creativecommons.org/wiki/CC0_FAQ
-
Files: debian/*
Copyright: 2020 Steffen Moeller <moeller at debian.org>
+ 2023 Lance Lin <lq27267 at gmail.com>
License: MIT
License: MIT
=====================================
debian/tests/run-unit-test
=====================================
@@ -2,7 +2,7 @@
set -e
-for py in $(py3versions -r 2> /dev/null)
+for py in $(py3versions -s)
do
pushd tests
echo "Testing with $py in $(pwd):"
=====================================
pyproject.toml
=====================================
@@ -1,2 +1,37 @@
[build-system]
-requires = ["setuptools", "wheel", "setuptools_scm", "Cython"]
+requires = ["setuptools >= 63", "setuptools_scm[toml] >= 6.2", "Cython >= 0.29.20"]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "tinyalign"
+authors = [
+ {name = "Marcel Martin", email = "marcel.martin at scilifelab.se"}
+]
+description = "Fast banded edit distance"
+readme = "README.md"
+license = {text = "MIT"}
+classifiers = [
+ "Development Status :: 4 - Beta",
+ "Intended Audience :: Science/Research",
+ "License :: OSI Approved :: MIT License",
+ "Natural Language :: English",
+ "Programming Language :: Cython",
+ "Programming Language :: Python :: 3",
+ "Topic :: Scientific/Engineering :: Bio-Informatics",
+]
+requires-python = ">=3.7"
+dynamic = ["version"]
+
+[project.urls]
+"Homepage" = "https://github.com/marcelm/tinyalign/"
+
+[tool.setuptools.exclude-package-data]
+tinyalign = ["*.pyx"]
+
+[tool.setuptools_scm]
+write_to = "src/tinyalign/_version.py"
+
+[tool.cibuildwheel]
+environment = "CFLAGS=-g0"
+test-command = ["cd {project}; pytest"]
+test-requires = "pytest"
=====================================
setup.py
=====================================
@@ -1,82 +1,4 @@
-import sys
-import os.path
-from setuptools import setup, Extension, find_packages
-from distutils.command.sdist import sdist as _sdist
-from distutils.command.build_ext import build_ext as _build_ext
+from setuptools import setup, Extension
+import setuptools_scm # noqa Ensure it’s installed
-
-def no_cythonize(extensions, **_ignore):
- """Change .pyx to .c or .cpp (copied from Cython documentation)"""
- for extension in extensions:
- sources = []
- for sfile in extension.sources:
- path, ext = os.path.splitext(sfile)
- if ext in (".pyx", ".py"):
- if extension.language == "c++":
- ext = ".cpp"
- else:
- ext = ".c"
- sfile = path + ext
- sources.append(sfile)
- extension.sources[:] = sources
-
-
-extensions = [
- Extension("tinyalign._core", sources=["src/tinyalign/_core.pyx"]),
-]
-
-
-class BuildExt(_build_ext):
- def run(self):
- # If we encounter a PKG-INFO file, then this is likely a .tar.gz/.zip
- # file retrieved from PyPI that already includes the pre-cythonized
- # extension modules, and then we do not need to run cythonize().
- if os.path.exists("PKG-INFO"):
- no_cythonize(extensions)
- else:
- # Otherwise, this is a 'developer copy' of the code, and then the
- # only sensible thing is to require Cython to be installed.
- from Cython.Build import cythonize
-
- self.extensions = cythonize(self.extensions)
- super().run()
-
-
-class SDist(_sdist):
- def run(self):
- # Make sure the compiled Cython files in the distribution are up-to-date
- from Cython.Build import cythonize
-
- cythonize(extensions)
- super().run()
-
-
-with open("README.md", encoding="utf-8") as f:
- long_description = f.read()
-
-setup(
- name="tinyalign",
- setup_requires=["setuptools_scm"], # Support pip versions that don't know about pyproject.toml
- use_scm_version={"write_to": "src/tinyalign/_version.py"},
- author="Marcel Martin",
- author_email="marcel.martin at scilifelab.se",
- url="https://github.com/marcelm/tinyalign/",
- description="Fast banded edit distance",
- long_description=long_description,
- long_description_content_type="text/markdown",
- license="MIT",
- packages=find_packages("src"),
- package_dir={"": "src"},
- ext_modules=extensions,
- cmdclass={"build_ext": BuildExt, "sdist": SDist},
- python_requires='>=3.6',
- classifiers=[
- "Development Status :: 3 - Alpha",
- "Intended Audience :: Science/Research",
- "License :: OSI Approved :: MIT License",
- "Natural Language :: English",
- "Programming Language :: Cython",
- "Programming Language :: Python :: 3",
- "Topic :: Scientific/Engineering :: Bio-Informatics",
- ],
-)
+setup(ext_modules=[Extension("tinyalign._core", sources=["src/tinyalign/_core.pyx"])])
=====================================
src/tinyalign/_core.pyi
=====================================
@@ -0,0 +1,2 @@
+def edit_distance(s: str, t: str, maxdiff: int = ...) -> int: ...
+def hamming_distance(s: str, t: str) -> int: ...
=====================================
src/tinyalign/_version.pyi
=====================================
@@ -0,0 +1,4 @@
+# The _version.py file is generated on installation. By including this stub,
+# we can run mypy without having to install the package.
+
+version: str
=====================================
src/tinyalign/py.typed
=====================================
View it on GitLab: https://salsa.debian.org/med-team/python-tinyalign/-/compare/706c24ba71803be772b87185ad9096b1b8ea5a69...61c445519522cd69c3ecf6ba32695cad7bdf7225
--
View it on GitLab: https://salsa.debian.org/med-team/python-tinyalign/-/compare/706c24ba71803be772b87185ad9096b1b8ea5a69...61c445519522cd69c3ecf6ba32695cad7bdf7225
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/20230907/e907bcaf/attachment-0001.htm>
More information about the debian-med-commit
mailing list