./devel/py-xopen, Open compressed files transparently

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 2.0.2, Package name: py312-xopen-2.0.2, Maintainer: pkgsrc-users

This small Python module provides an xopen function that works like
the built-in open function, but can also deal with compressed files.
Supported compression formats are gzip, bzip2 and xz. They are
automatically recognized by their file extensions .gz, .bz2 or .xz.


Required to run:
[devel/py-setuptools] [archivers/pigz] [lang/python37]

Required to build:
[pkgtools/cwrappers] [devel/py-setuptools_scm]

Master sites:

Filesize: 31.469 KB

Version history: (Expand)


CVS history: (Expand)


   2025-02-13 14:50:00 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-xopen: updated to 2.0.2

v2.0.2 (2024-06-12)

* Fix a bug that was triggered when reading large compressed files with an \ 
external program.

v2.0.1 (2024-03-28)

* Fixed a bug where reading from stdin and other pipes would discard the first \ 
bytes from the input.
* Zstd files compressed with the --long=31 files can now be opened without \ 
throwing errors.

v2.0.0 (2024-03-26)

* Support for gzip levels has been made more consistent. Levels 0-9 are \ 
supported. Level 11 which was only available when the pigz backend was present \ 
is not supported anymore. Level 0, gzip format without compression, lead to \ 
crashes when the gzip application backend was used as this does not have a -0 \ 
flag. xopen() now defers to other backends in that case.

* xopen() now accepts file-like objects for its filename argument.

* Various refactors for better code size and readability:

PipedCompressionReader/Writer are now combined _PipedCompressionProgram class.
_PipedCompressionProgram is binary-only. For text reading and writing it is \ 
wrapped in an io.TextIOWrapper in the xopen() function.
Classes that derive from PipedCompressionReader/Writer have been removed.

* xopen's classes, variables and functions pertaining to piped reading and \ 
writing are all made private by prefixing them with an underscore. These are not \ 
part of the API and may change between releases.
   2024-11-11 08:29:31 by Thomas Klausner | Files touched by this commit (862)
Log message:
py-*: remove unused tool dependency

py-setuptools includes the py-wheel functionality nowadays
   2024-04-11 01:51:06 by Jason Bacon | Files touched by this commit (1)
Log message:
devel/py-xopen: Release to pkgsrc-users@

xopen is used only by cutadapt, which has been replaced by
fastq-trim in my toolbox
   2024-02-10 14:04:23 by Jason Bacon | Files touched by this commit (4)
Log message:
devel/py-xopen: Update to 1.9.0nb1

Add zstandard support
Simple matter of installing py-zstandard as a runtime dependency
   2024-01-31 12:53:35 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-xopen: updated to 1.9.0

v1.9.0

* The python-isal compression backend is now only used for compression
  levels 1 and 2. Contrary to other backends, python-isal level 0 gave
  compressed rather than uncompressed data in gzip format. Level 3 on
  python-isal did not provide better compression than level 2.
* PipedCompressionReader/Writer now derive from the `io.IOBase
  <https://docs.python.org/3/library/io.html#io.IOBase>`_ abstract class.
* The gzip default compression level is now 1 when no value is provided
  by the calling function. The default used to be determined by the backend.
* xopen now uses zlib-ng when available and applicable.
* Piped ``igzip`` is no longer used as a (de)compression backend as
  python-isal's threaded mode is a better choice in all use cases.
   2023-10-28 21:57:26 by Thomas Klausner | Files touched by this commit (516) | Package updated
Log message:
python/wheel.mk: simplify a lot, and switch to 'installer' for installation

This follows the recommended bootstrap method (flit_core, build, installer).

However, installer installs different files than pip, so update PLISTs
for all packages using wheel.mk and bump their PKGREVISIONs.
   2023-10-21 19:51:45 by Adam Ciarcinski | Files touched by this commit (3) | Package updated
Log message:
py-xopen: updated to 1.8.0

v1.8.0 (2023-11-03)

xopen now defers to the isal.igzip_threaded module rather than piping to \ 
external programs in applicable cases. This makes reading and writing to gzip \ 
files using threads more efficient.
Support for Python 3.7 is dropped and support for Python 3.12 is added.
   2023-06-06 14:42:56 by Taylor R Campbell | Files touched by this commit (1319)
Log message:
Mass-change BUILD_DEPENDS to TOOL_DEPENDS outside mk/.

Almost all uses, if not all of them, are wrong, according to the
semantics of BUILD_DEPENDS (packages built for target available for
use _by_ tools at build-time) and TOOL_DEPEPNDS (packages built for
host available for use _as_ tools at build-time).

No change to BUILD_DEPENDS as used correctly inside buildlink3.

As proposed on tech-pkg:
https://mail-index.netbsd.org/tech-pkg/2023/06/03/msg027632.html