Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@ MANIFEST
env*
build/
dist/
demo.py
venv/
verify/
__pycache__
*.egg-info
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
include README.rst
include fastlz/fastlz.c
include fastlz/fastlz.h
include fastlz/fastlz.h
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
all:
python3 setup.py sdist

clean:
rm -rf build dist *.egg-info
5 changes: 3 additions & 2 deletions fastlz.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include "fastlz/fastlz.h"

Expand All @@ -16,7 +17,7 @@ compress(PyObject *self, PyObject *args, PyObject *kwargs)
PyObject *result;
const char *input;
char *output;
int input_len, output_len;
Py_ssize_t input_len, output_len;

static char *arglist[] = {"string", NULL};
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|i", arglist, &input,
Expand Down Expand Up @@ -50,7 +51,7 @@ decompress(PyObject *self, PyObject *args)
{
PyObject *result;
const char *input;
int input_len;
Py_ssize_t input_len;
char *output;
uint32_t output_len, decompressed_len;

Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
21 changes: 21 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[metadata]
name = fastlz
version = 0.5.0
description = Python wrapper for FastLZ, a lightning-fast lossless compression library.
author = Valdemar M. T. Landberg
author_email = valdemar.landberg@live.dk
url = https://github.com/valdemarmtl/python-fastlz
license = BSD License,
classifiers =
Development Status :: 4 - Beta
Intended Audience :: Developers
License :: OSI Approved :: BSD License
Operating System :: POSIX
Programming Language :: C
Programming Language :: Python
Topic :: Software Development :: Libraries
Topic :: System :: Archiving :: Compression
Topic :: Utilities

[bdist_wheel]
universal = 1
22 changes: 2 additions & 20 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,11 @@
from distutils.core import setup, Extension

from setuptools import Extension, setup

setup(
name='fastlz',
version='0.5.0',
description='Python wrapper for FastLZ, a lightning-fast lossless '
'compression library.',
author='Remus M. Prunescu',
author_email='remusmp@gmail.com',
url='https://github.com/remusmp/python-fastlz',
license='BSD License',
classifiers = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: POSIX',
'Programming Language :: C',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries',
'Topic :: System :: Archiving :: Compression',
'Topic :: Utilities'
],
ext_modules = [
Extension(
'fastlz',
name='fastlz',
sources=['fastlz.c', 'fastlz/fastlz.c'],
include_dirs=['fastlz']
)
Expand Down