mirror of
https://github.com/google/brotli.git
synced 2024-11-21 19:20:09 +00:00
Python: Update README with information about code formatting
Also, add a `yapf` section to `setup.cfg` to ensure YAPF runs format code with the Google style.
This commit is contained in:
parent
d60aa23116
commit
b04f4ea185
@ -50,11 +50,13 @@ See [Premake5](https://premake.github.io/)
|
||||
|
||||
#### Python
|
||||
|
||||
The basic commands to build, test and install the Python binding are:
|
||||
The basic commands to build, test, and install the Python module are:
|
||||
|
||||
$ python setup.py build_ext test
|
||||
$ python setup.py install
|
||||
|
||||
See the [Python readme](python/README.md) for more details.
|
||||
|
||||
### Benchmarks
|
||||
* [Squash Compression Benchmark](https://quixdb.github.io/squash-benchmark/) / [Unstable Squash Compression Benchmark](https://quixdb.github.io/squash-benchmark/unstable/)
|
||||
* [Large Text Compression Benchmark](http://mattmahoney.net/dc/text.html)
|
||||
|
@ -1,5 +1,38 @@
|
||||
This directory contains Python brotli wrapper module and roundtrip tests.
|
||||
This directory contains the code for the Python `brotli` module,
|
||||
`bro.py` tool, and roundtrip tests.
|
||||
|
||||
To build module execute `python setup.py build_ext` from root project directory.
|
||||
|
||||
To test module run `python setup.py test`.
|
||||
### Development
|
||||
|
||||
To build the module, execute the following from the root project
|
||||
directory:
|
||||
|
||||
$ python setup.py build_ext
|
||||
|
||||
To test the module, execute the following from the root project
|
||||
directory:
|
||||
|
||||
$ python setup.py test
|
||||
|
||||
|
||||
### Code Style
|
||||
|
||||
Brotli's code follows the [Google Python Style Guide][]. To
|
||||
automatically format your code, install [YAPF][]:
|
||||
|
||||
$ pip install yapf
|
||||
|
||||
Then, either format a single file:
|
||||
|
||||
$ yapf --in-place FILE
|
||||
|
||||
Or, format all files in a directory:
|
||||
|
||||
$ yapf --in-place --recursive DIR
|
||||
|
||||
See the [YAPF usage][] documentation for more information.
|
||||
|
||||
|
||||
[Google Python Style Guide]: https://google.github.io/styleguide/pyguide.html
|
||||
[YAPF]: https://github.com/google/yapf
|
||||
[YAPF usage]: https://github.com/google/yapf#usage
|
||||
|
Loading…
Reference in New Issue
Block a user