aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Kliuchnikov <eustas@google.com>2016-10-18 10:28:28 +0200
committerGitHub <noreply@github.com>2016-10-18 10:28:28 +0200
commit606a70b77926a47769fd885584800a33a079861a (patch)
tree90abbfb15c11ffd05f644d30863d49c45679b66a
parent81962c389268d35ca217837dfc02377df86e3d38 (diff)
parentb04f4ea185a399369edb484e46a3626cb4c8c4e0 (diff)
downloadbrotli-606a70b77926a47769fd885584800a33a079861a.zip
brotli-606a70b77926a47769fd885584800a33a079861a.tar.gz
brotli-606a70b77926a47769fd885584800a33a079861a.tar.bz2
Merge pull request #447 from nicksay/py-yapf
Python: Update README with information about code formatting
-rw-r--r--README.md4
-rw-r--r--python/README.md39
-rw-r--r--setup.cfg2
3 files changed, 41 insertions, 4 deletions
diff --git a/README.md b/README.md
index 1e7225d..30ccda6 100644
--- a/README.md
+++ b/README.md
@@ -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)
diff --git a/python/README.md b/python/README.md
index e787228..5b962d0 100644
--- a/python/README.md
+++ b/python/README.md
@@ -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
diff --git a/setup.cfg b/setup.cfg
index baeaba5..990b9e1 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,3 +1,5 @@
[build]
build-base=bin
+[yapf]
+based_on_style=google