Skip to content
Snippets Groups Projects
Commit 91f50865 authored by YOKOTA Hiroshi's avatar YOKOTA Hiroshi
Browse files

New upstream version 1.1.1+ds

parent 31947fa4
No related branches found
No related tags found
No related merge requests found
Pipeline #787589 failed
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
ref-names: $Format:%D$
\ No newline at end of file
when:
- event: push
branch: [main, releases/*]
- event: pull_request
clone:
git:
image: woodpeckerci/plugin-git
settings:
partial: false
depth: 1
lfs: false
tags: true
steps:
check:
image: python:${TAG}-bullseye
commands:
- python -m pip install --upgrade pip
- python -m pip install tox setuptools setuptools_scm[toml]
- python -m tox -e py
matrix:
TAG:
- 3.8
- 3.9
- 3.10
- 3.11
- 3.12
- 3.13-rc
......@@ -36,7 +36,7 @@ if (WIN32)
set(BUILD_EXT_PYTHON ${VENV_PATH}/Scripts/python_d.exe)
else()
set(BUILD_EXT_PYTHON ${VENV_PATH}/bin/python.exe)
endif()
endif()
set(BUILD_EXT_OPTION -g)
else()
set(BUILD_EXT_PYTHON ${VENV_PATH}/bin/python)
......
......@@ -7,6 +7,18 @@ All notable changes to this project will be documented in this file.
`Unreleased`_
=============
v1.1.1_
=======
Added
-----
* Add Python 3.13 support
Changed
-------
* Minimum required python to be 3.9
`v1.1.0`_
=========
......@@ -103,7 +115,8 @@ Added
.. History links
.. _Unreleased: https://codeberg.org/miurahr/pyppmd/compare/v1.1.0...HEAD
.. _Unreleased: https://codeberg.org/miurahr/pyppmd/compare/v1.1.1...HEAD
.. _v1.1.1: https://codeberg.org/miurahr/pyppmd/compare/v1.0.0...v1.1.1
.. _v1.1.0: https://codeberg.org/miurahr/pyppmd/compare/v1.0.0...v1.1.0
.. _v1.0.0: https://codeberg.org/miurahr/pyppmd/compare/v0.18.3...v1.0.0
.. _v0.18.3: https://codeberg.org/miurahr/pyppmd/compare/v0.18.2...v0.18.3
......
Metadata-Version: 2.1
Name: pyppmd
Version: 1.1.0
Version: 1.1.1
Summary: PPMd compression/decompression library
Author-email: Hiroshi Miura <miurahr@linux.com>
License: LGPL-2.1-or-later
......@@ -17,17 +17,16 @@ Classifier: Operating System :: POSIX
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Requires-Python: >=3.9
Description-Content-Type: text/x-rst
License-File: LICENSE
Provides-Extra: test
......@@ -38,17 +37,15 @@ Requires-Dist: pytest-timeout; extra == "test"
Requires-Dist: hypothesis; extra == "test"
Requires-Dist: coverage[toml]>=5.2; extra == "test"
Provides-Extra: check
Requires-Dist: mypy>=0.812; extra == "check"
Requires-Dist: mypy_extensions>=0.4.3; extra == "check"
Requires-Dist: mypy>=1.10.0; extra == "check"
Requires-Dist: check-manifest; extra == "check"
Requires-Dist: flake8<5; extra == "check"
Requires-Dist: flake8; extra == "check"
Requires-Dist: flake8-isort; extra == "check"
Requires-Dist: flake8-black; extra == "check"
Requires-Dist: readme-renderer; extra == "check"
Requires-Dist: pygments; extra == "check"
Requires-Dist: isort>=5.0.3; extra == "check"
Provides-Extra: docs
Requires-Dist: sphinx>=2.3; extra == "docs"
Requires-Dist: sphinx; extra == "docs"
Requires-Dist: sphinx_rtd_theme; extra == "docs"
Provides-Extra: fuzzer
Requires-Dist: atheris; extra == "fuzzer"
......
[project]
name = "pyppmd"
requires-python = ">=3.8"
requires-python = ">=3.9"
description = "PPMd compression/decompression library"
readme = "README.rst"
license = {text = "LGPL-2.1-or-later"}
......@@ -16,12 +16,11 @@ classifiers = [
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
......@@ -39,18 +38,16 @@ test = [
"coverage[toml]>=5.2",
]
check = [
"mypy>=0.812",
"mypy_extensions>=0.4.3",
"mypy>=1.10.0",
"check-manifest",
"flake8<5",
"flake8",
"flake8-isort",
"flake8-black",
"readme-renderer",
"pygments",
"isort>=5.0.3",
"pygments"
]
docs = [
"sphinx>=2.3",
"sphinx",
"sphinx_rtd_theme",
]
fuzzer = [
......@@ -77,7 +74,7 @@ pyppmd = ["py.typed"]
[tool.black]
line-length = 125
target-version = ['py310']
target-version = ['py312']
[tool.coverage.paths]
source = ["src", "**/site-packages"]
......@@ -139,7 +136,7 @@ archs = ["x86_64", "universal2", "arm64"]
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = check, py{38,39,310,311,312}, pypy{38,39}, docs
envlist = check, py{39,310,311,312,313}, pypy39, docs
[testenv]
passenv =
......@@ -149,14 +146,11 @@ extras = test
commands =
python -m pytest -vv -s
[testenv:pypy38]
basepython = pypy3.8
[testenv:pypy39]
basepython = pypy3.9
[testenv:check]
basepython = python3.10
basepython = python3.12
extras = check
ignore_errors=true
commands =
......@@ -164,8 +158,8 @@ commands =
flake8 src tests setup.py
[testenv:docs]
basepython = python3.10
basepython = python3.12
extras = docs
commands =
sphinx-build {posargs:-E} -b html docs build/html
"""
\ No newline at end of file
"""
......@@ -853,7 +853,7 @@ Ppmd7Encoder_flush(Ppmd7Encoder *self, PyObject *args, PyObject *kwargs)
PyObject *ret;
CPpmd7z_RangeEnc *rc = self->rangeEnc;
OutBuffer out;
BlocksOutputBuffer buffer;
BlocksOutputBuffer buffer = {};
BufferWriter writer;
static char *kwlist[] = {"endmark", NULL};
Bool endmark = False;
......@@ -1578,7 +1578,7 @@ Ppmd8Encoder_flush(Ppmd8Encoder *self, PyObject *args, PyObject *kwargs)
{
PyObject *ret;
OutBuffer out;
BlocksOutputBuffer buffer;
BlocksOutputBuffer buffer = {};
BufferWriter writer;
static char *kwlist[] = {"endmark", NULL};
Bool endmark = True;
......
......@@ -4,7 +4,7 @@
#include "ThreadDecoder.h"
#include "Buffer.h"
#ifdef __MACH__
#ifdef __APPLE__
#include <mach/clock.h>
#include <mach/mach.h>
#endif
......@@ -13,7 +13,7 @@
int ppmd_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, unsigned long nsec) {
//https://gist.github.com/jbenet/1087739
struct timespec abstime;
#ifdef __MACH__ // OS X does not have clock_gettime, use clock_get_time
#ifdef __APPLE__ // OS X does not have clock_gettime, use clock_get_time
clock_serv_t cclock;
mach_timespec_t mts;
host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
......@@ -279,4 +279,4 @@ void Ppmd8T_Free(CPpmd8 *cPpmd8, ppmd_info *threadInfo, IAllocPtr allocator) {
}
IAlloc_Free(allocator, tc);
Ppmd8_Free(cPpmd8, allocator);
}
\ No newline at end of file
}
......@@ -7,43 +7,24 @@
#define PPMD_ARCH_H
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
typedef unsigned char Byte;
typedef short Int16;
typedef unsigned short UInt16;
typedef int Int32;
typedef unsigned int UInt32;
typedef uint8_t Byte;
typedef int16_t Int16;
typedef uint16_t UInt16;
typedef int32_t Int32;
typedef uint32_t UInt32;
typedef int64_t Int64;
typedef uint64_t UInt64;
#define UINT64_CONST(n) UINT64_C(n)
#if defined(_MSC_VER) || defined(__BORLANDC__)
typedef __int64 Int64;
typedef unsigned __int64 UInt64;
#define UINT64_CONST(n) n
#else
typedef long long int Int64;
typedef unsigned long long int UInt64;
#define UINT64_CONST(n) n ## ULL
#endif
typedef int Bool;
#define True 1
#define False 0
typedef _Bool Bool;
#define True true
#define False false
#if defined(_M_IX86) \
|| defined(__i386__) \
|| defined(_M_ARM) \
|| defined(_M_ARM_NT) \
|| defined(_M_ARMT) \
|| defined(__arm__) \
|| defined(__thumb__) \
|| defined(__ARMEL__) \
|| defined(__ARMEB__) \
|| defined(__THUMBEL__) \
|| defined(__THUMBEB__) \
|| defined(__mips__) \
|| defined(__ppc__) \
|| defined(__powerpc__) \
|| defined(__sparc__)
#if INTPTR_WIDTH == 32
#define PPMD_32BIT
#endif
#endif // PPMD_ARCH_H
\ No newline at end of file
#endif // PPMD_ARCH_H
import cpuinfo
def pytest_benchmark_update_json(config, benchmarks, output_json):
"""Calculate compression/decompression speed and add as extra_info"""
......@@ -10,6 +8,8 @@ def pytest_benchmark_update_json(config, benchmarks, output_json):
def pytest_benchmark_update_machine_info(config, machine_info):
cpuinfo = pytest.importorskip("cpuinfo")
cpu_info = cpuinfo.get_cpu_info()
brand = cpu_info.get("brand_raw", None)
if brand is None:
......
......@@ -17,6 +17,8 @@ targets = [("PPMd H", 7, 6, 16 << 20), ("PPMd I", 8, 8, 8 << 20)]
@pytest.mark.benchmark(group="compress")
@pytest.mark.parametrize("name, var, max_order, mem_size", targets)
def test_benchmark_text_compress(tmp_path, benchmark, name, var, max_order, mem_size):
cpuinfo = pytest.importorskip("cpuinfo")
def encode(var, max_order, mem_size):
if var == 7:
encoder = pyppmd.Ppmd7Encoder(max_order=max_order, mem_size=mem_size)
......@@ -37,6 +39,8 @@ def test_benchmark_text_compress(tmp_path, benchmark, name, var, max_order, mem_
@pytest.mark.benchmark(group="decompress")
@pytest.mark.parametrize("name, var, max_order, mem_size", targets)
def test_benchmark_text_decompress(tmp_path, benchmark, name, var, max_order, mem_size):
cpuinfo = pytest.importorskip("cpuinfo")
def decode(var, max_order, mem_size):
if var == 7:
decoder = pyppmd.Ppmd7Decoder(max_order=max_order, mem_size=mem_size)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment