aboutsummaryrefslogtreecommitdiff
path: root/setup.py
AgeCommit message (Collapse)AuthorFilesLines
2023-09-07setup.py: add long_description (#1073)Cosimo Lupo1-0/+5
twine (the tool we use to upload packages to PyPI) is currently failing if the long_description (used to render a project's page on PyPI website) is not set. Somehow it complains that it is not well formatted reStructuredText, but it's simply empty... This looks like a bug, or bad interaction between twince and setuptools, because the field is technically optional. Also see https://github.com/pypa/twine/issues/960 and https://github.com/pypa/twine/issues/908. This issue is currently preventing the upload of newly built Brotli v1.1.0 Python wheels to PyPI: https://github.com/google/brotli-wheels/issues/18#issuecomment-1706910190 Anyway, we may well set the long_description to the content of the README.md file, as it's customary for python projects.
2023-07-30simplify CMake buildEvgenii Kliuchnikov1-92/+95
PiperOrigin-RevId: 552238545
2022-12-29Python: use a new output buffer code (#902)Ma Lin1-32/+24
Currently, the output buffer is a std::vector<uint8_t>. When the buffer grows, resizing will cause unnecessary memcpy(). This change uses a list of bytes object to represent output buffer, can avoid the extra overhead of resizing. In addition, C++ code can be removed, it's a pure C extension.
2021-08-04Merge-in SharedDictionary feature (#916)Eugene Kliuchnikov1-0/+4
Co-authored-by: Eugene Kliuchnikov <eustas@chromium.org>
2020-08-26Update (#826)Eugene Kliuchnikov1-0/+5
* IMPORTANT: decoder: fix potential overflow when input chunk is >2GiB * simplify max Huffman table size calculation * eliminate symbol duplicates (static arrays in .h files) * minor combing in research/ code
2019-08-16Fix license in setup.py (#769)James Hilliard1-2/+2
2018-07-09Fix missing header files (#695)William A. Kennington III1-0/+2
Our dist tarball is missing hash_rolling_inc.h and hash_composite_inc.h, which causes subsequent autotools builds to fail. Fix this by adding it to the sources list. Signed-off-by: William A. Kennington III <william@wkennington.com>
2018-03-20Update (#651)Eugene Kliuchnikov1-0/+1
* fix `bazel` build (ignore switch case fall-through) * add `NPOSTFIX` / `NDIRECT` encoder parameters * fix source file lists (add `params.h`) * fix bug in `durchschlag` * print clarifying messages wheb CLI argument parsing fails
2018-02-26New feature: "Large Window Brotli" (#640)Eugene Kliuchnikov1-5/+6
* New feature: "Large Window Brotli" By setting special encoder/decoder flag it is now possible to extend LZ-window up to 30 bits; though produced stream will not be RFC7932 compliant. Added new dictionary generator - "DSH". It combines speed of "Sieve" and quality of "DM". Plus utilities to prepare train corpora (remove unique strings). Improved compression ratio: now two sub-blocks could be stitched: the last copy command could be extended to span the next sub-block. Fixed compression ineffectiveness caused by floating numbers rounding and wrong cost heuristic. Other C changes: - combined / moved `context.h` to `common` - moved transforms to `common` - unified some aspects of code formatting - added an abstraction for encoder (static) dictionary - moved default allocator/deallocator functions to `common` brotli CLI: - window size is auto-adjusted if not specified explicitly Java: - added "eager" decoding both to JNI wrapper and pure decoder - huge speed-up of `DictionaryData` initialization * Add dictionaryless compressed dictionary * Fix `sources.lst` * Fix `sources.lst` and add a note that `libtool` is also required. * Update setup.py * Fix `EagerStreamTest` * Fix BUILD file * Add missing `libdivsufsort` dependency * Fix "unused parameter" warning.
2017-08-23disable buidling/deployment of python wheels (#583)Cosimo Lupo1-1/+18
* [appveyor] remove 'deploy' stage; only test python 2.7 and 3.6 all the other python versions are being built and tested on https://github.com/google/brotli-wheels/blob/d571d63/appveyor.yml * remove terrify submodule as not needed any more * [travis] just test py2.7 and 3.6 on linux; remove extra osx python builds All the other python versions for OSX are being built/tested on: https://github.com/google/brotli-wheels/blob/d571d63/.travis.yml Also, there's no need to build and deploy wheels here, as that's done in the separate repository. * [setup.py] only rebuild if dependency are newer; fix typo in list of 'depends' https://github.com/python/cpython/blob/v3.6.2/Lib/distutils/command/build_ext.py#L485-L500 * [ci] only run 'python setup.py test' if we run 'python setup.py built test', the setuptools 'test' command will forcibly re-run the build_ext subcommand because it wants to pass the --inplace option (it ignores whether it's up to date, just re-runs it all the time). with this we go from running built_ext twice, to running it only once per build * [Makefile] run 'build_ext --inplace' instead of 'develop' as default target The 'develop' command is like 'install' in the sense that it modifies the user's python environment. The default make target should be less intrusive, i.e. just building the extension module in-place without modify anything in the user's environment. We don't need to tell make about the dependency between 'test' and 'build' target as that is baked in the `python setup.py test` command. * [Makefile] add 'develop' target; remove unnecessary 'tests' target `make test` is good enough * [Makefile] `setup.py test` requires setuptools; run `python -m unittest` This will work even if setuptools is not installed, which is unlikely nowadays but still our `setup.py` works with plain distutils, so we may well have our tests work without setuptools. * [python/README.md] add ref to 'develop' target; remove 'tests', just 'make test' * [setup.py] import modules as per nicksay's comment https://github.com/google/brotli/pull/583#discussion_r131981049 * [Makefile] add 'develop' to .PHONY targets remove 'tests' from .PHONY * [appveyor] remove unused setup scripts We don't need to install custom python versions, we are using the pre-installed ones on Appveyor. * [appveyor] remove unneeded setup code
2017-04-23Move files & update paths (#541)Eugene Kliuchnikov1-73/+74
* Move files & update paths * Rename build to scripts. * Fix paths * Fix script.
2017-03-06Update common, decoder, encoder, java (#520)Eugene Kliuchnikov1-0/+1
Common: * wrap dictionary data into `BrotliDictionary` structure * replace public constant with getter `BrotliGetDictionary` * reformat dictionary data Decoder: * adopt common changes * clarify acceptable instance usage patterns * hold reference to dictionary in state Encoder: * adopt common changes * eliminate PIC spots in `CreateBackwardReferences` * add per-chunk ratio guards for q0 and q1 * precompute relative distances to avoid repeated calculations * prostpone hasher allocation/initialization * refactor Hashers to be class-like structure * further improvements for 1MiB+ inputs * added new hasher type; made hashers more configurable Java: * Pull byte->int magic to `IntReader` from `BitReader`
2017-02-06Update encoder (#504)Eugene Kliuchnikov1-0/+4
* pull `BROTLI_MAX_BACKWARD_LIMIT` to constants * split generic and Zopfli backward references code * pull hashers init and stitch invocation to encoder * make `dictionary_hash` a compilation unit * add `size hint` parameter * add new hasher * use `size hint` to pick new hasher for q4 * modernize clz guard (fix #495) * move `hash to binary tree` to separate file * add `Initialize` and `Cleanup` to all hashers * do not raise OOM if malloc(0) == NULL (fix #500)
2016-12-20Python: Simplify test suite generation by using unittest discovery (#485)Alex Nicksay1-26/+9
2016-10-17Python: Create native brotli module and move extension to _brotliAlex Nicksay1-2/+8
2016-10-12Python: Clean up setup.py fileAlex Nicksay1-145/+177
2016-08-23Add includedir to setup.pyEugene Kliuchnikov1-3/+3
2016-08-23Move "public" to "include/brotli"Eugene Kliuchnikov1-3/+3
2016-08-22Fix setup.py regexpEugene Kliuchnikov1-1/+1
2016-08-22Use version from common/version.hEugene Kliuchnikov1-5/+9
2016-08-22Fix setup.pyEugene Kliuchnikov1-3/+3
2016-06-13Fix CI build.Eugene Kliuchnikov1-16/+25
2016-06-03Update setup.pyEugene Kliuchnikov1-18/+18
2016-02-16Remove obsolete compilation uniteustas1-1/+0
2016-01-11Add the new source files to setup.pyZoltan Szabadka1-0/+5
2015-12-08setup.py: don't enable c++0x for gccCosimo Lupo1-6/+2
2015-10-06[setup.py] add PyPI trove classifiersCosimo Lupo1-0/+25
2015-10-05[setup.py] remove monkey-patch for distutils.msvc9compiler; try to import ↵Cosimo Lupo1-13/+4
setuptools required by "Microsoft Visual C++ Compiler for Python 2.7" Cf. http://aka.ms/vcpython27
2015-10-02Add tools/version.h that conatins the brotli version.Zoltan Szabadka1-2/+2
This can be reused by all of the tools. Set the version to the next git release tag.
2015-10-01Move literal cost computation to where it's used.Zoltan Szabadka1-0/+2
Move utf8 heuristics functions to their own file.
2015-10-01Make the brotli encoder C++98 compatible.Zoltan Szabadka1-0/+1
2015-09-24Update brotli decoder with latest improvements.Zoltan Szabadka1-0/+1
2015-08-14[setup.py] pass extra compiler flags on OS X to enable support for C++11: ↵Cosimo Lupo1-0/+2
-stdlib=libc++ -mmacosx-version-min=10.7
2015-08-11[setup.py] retrieve version string from brotlimodule.cc so we don't need to ↵Cosimo Lupo1-4/+18
modify it more than once
2015-08-11[setup.py] support MINGW32 compiler: fix clashing 'hypot' definition; ↵Cosimo Lupo1-0/+9
statically link libgcc and libstdc++
2015-08-11[setup.py] use MSVC 10.0 when compiling for Windows Python 2.7Cosimo Lupo1-0/+15
Python 2.7 for Windows is compiled using MS Visaul C++ 9.0 (Visual Studio 2008). However the latter does not support many modern C++ features which are required to compile the Brotli encoder. So we monkey-patch distutils to always look for MSVC version 10.0 instead of 9.0.
2015-08-10Use a single lookup table for insert/copy offsets and extra bits.Zoltan Szabadka1-2/+0
Remove safe_malloc.c since all the bounds checking is done inside decode.c now.
2015-06-12Use a static hash table to look up dictionary words and transforms.Zoltan Szabadka1-0/+2
This is used for quality 11, for qualities <= 9 we already have a simpler hash table. The static data size is 252 kB, and this removes the need to initialize a huge hash map at startup, which was the reason why transforms had to be disabled by default. In comparison, the static dictionary itself is 120 kB. This supports every transform, except the kOmitFirstN.
2015-05-07Speed and memory usage improvements for the decoder.Zoltan Szabadka1-0/+1
* Change order of members of bit reader state structure. * Remove unused includes for assert. Add BROTLI_DCHECK macros and use it instead of assert. * Do not calculate nbits in common case of ReadSymbol. * Introduce and use PREDICT_TRUE / PREDICT_FALSE macros. * Allocate less memory in the brotli decoder if it knows the result size beforehand. Before this, the decoder would always allocate 16MB if the encoder annotated the window size as 22 bit (which is the default), even if the file is only a few KB uncompressed. Now, it'll only allocate a ringbuffer as large as needed for the result file. But only if it can know the filesize, it's not possible to know that if there are multiple metablocks or too large uncompressed metablock.
2015-04-23Add dictionary_hash.h to setup.py.Zoltan Szabadka1-0/+1
2015-04-23Add the streams.* files to Makefile and setup.pyZoltan Szabadka1-0/+2
2015-03-31[python] moved setup.py to the root of repositoryCosimo Lupo1-0/+163