Skip to content

Commit 4877f5b

Browse files
authored
Rename package to 'brotlicffi'
1 parent 89044fc commit 4877f5b

15 files changed

Lines changed: 86 additions & 89 deletions

README.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
brotlipy
2-
========
1+
BrotliCFFI
2+
==========
33

4-
This library contains Python bindings for the reference Brotli encoder/decoder,
4+
This library contains Python CFFI bindings for the reference Brotli encoder/decoder,
55
`available here`_. This allows Python software to use the Brotli compression
66
algorithm directly from Python code.
77

88
To use it simply, try this:
99

1010
.. code-block:: python
1111
12-
import brotli
13-
data = brotli.decompress(compressed_data)
12+
import brotlicffi
13+
data = brotlicffi.decompress(compressed_data)
1414
1515
More information can be found `in the documentation`_.
1616

@@ -20,11 +20,12 @@ More information can be found `in the documentation`_.
2020
License
2121
-------
2222

23-
The source code of brotlipy is available under the MIT license. Brotli itself
23+
The source code of BrotliCFFI is available under the MIT license. Brotli itself
2424
is made available under the Version 2.0 of the Apache Software License. See the
2525
LICENSE and libbrotli/LICENSE files for more information.
2626

2727
Authors
2828
-------
2929

30-
brotlipy is maintained by Cory Benfield.
30+
BrotliCFFI/brotlipy was authored by Cory Benfield and
31+
is currently maintained by Seth Michael Larson.

docs/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ qthelp:
8787
@echo
8888
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
8989
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
90-
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/brotlipy.qhcp"
90+
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/brotlicffi.qhcp"
9191
@echo "To view the help file:"
92-
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/brotlipy.qhc"
92+
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/brotlicffi.qhc"
9393

9494
applehelp:
9595
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
@@ -104,8 +104,8 @@ devhelp:
104104
@echo
105105
@echo "Build finished."
106106
@echo "To view the help file:"
107-
@echo "# mkdir -p $$HOME/.local/share/devhelp/brotlipy"
108-
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/brotlipy"
107+
@echo "# mkdir -p $$HOME/.local/share/devhelp/brotlicffi"
108+
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/brotlicffi"
109109
@echo "# devhelp"
110110

111111
epub:

docs/make.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ if "%1" == "qthelp" (
127127
echo.
128128
echo.Build finished; now you can run "qcollectiongenerator" with the ^
129129
.qhcp project file in %BUILDDIR%/qthelp, like this:
130-
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\brotlipy.qhcp
130+
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\brotlicffi.qhcp
131131
echo.To view the help file:
132-
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\brotlipy.ghc
132+
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\brotlicffi.ghc
133133
goto end
134134
)
135135

docs/source/api.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
API Documentation
22
=================
33

4-
.. module:: brotli
4+
.. module:: brotlicffi
55

6-
This section of the documentation covers the API of brotlipy.
6+
This section of the documentation covers the API of BrotliCFFI.
77

88
Decompression
99
-------------
1010

11-
.. automethod:: brotli.decompress
11+
.. automethod:: brotlicffi.decompress
1212

13-
.. autoclass:: brotli.Decompressor
13+
.. autoclass:: brotlicffi.Decompressor
1414
:inherited-members:
1515

1616
Compression
1717
-----------
1818

19-
.. automethod:: brotli.compress
19+
.. automethod:: brotlicffi.compress
2020

21-
.. autoclass:: brotli.Compressor
21+
.. autoclass:: brotlicffi.Compressor
2222
:members:
2323

24-
.. autoclass:: brotli.BrotliEncoderMode
24+
.. autoclass:: brotlicffi.BrotliEncoderMode
2525
:members:
2626

27-
.. autodata:: brotli.BROTLI_DEFAULT_MODE
27+
.. autodata:: brotlicffi.BROTLI_DEFAULT_MODE
2828

2929
Errors
3030
------
3131

32-
.. autoclass:: brotli.Error
32+
.. autoclass:: brotlicffi.Error
3333

34-
.. autodata:: brotli.error
34+
.. autodata:: brotlicffi.error

docs/source/conf.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# brotlipy documentation build configuration file, created by
3+
# BrotliCFFI documentation build configuration file, created by
44
# sphinx-quickstart on Sat Oct 3 16:51:16 2015.
55
#
66
# This file is execfile()d with the current directory set to its
@@ -12,6 +12,7 @@
1212
# All configuration values have a default; values that are commented out
1313
# serve to show the default.
1414

15+
import datetime
1516
import sys
1617
import os
1718
import shlex
@@ -49,8 +50,8 @@
4950
master_doc = 'index'
5051

5152
# General information about the project.
52-
project = u'brotlipy'
53-
copyright = u'2015, Cory Benfield'
53+
project = u'brotlicffi'
54+
copyright = u'%d, Cory Benfield' % (datetime.date.today().year,)
5455
author = u'Cory Benfield'
5556

5657
# The version info for the project you're documenting, acts as replacement for
@@ -203,7 +204,7 @@
203204
#html_search_scorer = 'scorer.js'
204205

205206
# Output file base name for HTML help builder.
206-
htmlhelp_basename = 'brotlipydoc'
207+
htmlhelp_basename = 'BrotliCFFIdoc'
207208

208209
# -- Options for LaTeX output ---------------------------------------------
209210

@@ -225,7 +226,7 @@
225226
# (source start file, target name, title,
226227
# author, documentclass [howto, manual, or own class]).
227228
latex_documents = [
228-
(master_doc, 'brotlipy.tex', u'brotlipy Documentation',
229+
(master_doc, 'BrotliCFFI.tex', u'BrotliCFFI Documentation',
229230
u'Cory Benfield', 'manual'),
230231
]
231232

@@ -255,7 +256,7 @@
255256
# One entry per manual page. List of tuples
256257
# (source start file, name, description, authors, manual section).
257258
man_pages = [
258-
(master_doc, 'brotlipy', u'brotlipy Documentation',
259+
(master_doc, 'BrotliCFFI', u'BrotliCFFI Documentation',
259260
[author], 1)
260261
]
261262

@@ -269,8 +270,8 @@
269270
# (source start file, target name, title, author,
270271
# dir menu entry, description, category)
271272
texinfo_documents = [
272-
(master_doc, 'brotlipy', u'brotlipy Documentation',
273-
author, 'brotlipy', 'One line description of project.',
273+
(master_doc, 'BrotliCFFI', u'BrotliCFFI Documentation',
274+
author, 'BrotliCFFI', 'One line description of project.',
274275
'Miscellaneous'),
275276
]
276277

docs/source/index.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
Brotlipy: Python Bindings to the Brotli Compression Algorithm
2-
=============================================================
1+
BrotliCFFI: Python CFFI Bindings to the Brotli Compression Algorithm
2+
====================================================================
33

4-
Brotlipy is a collection of `CFFI-based`_ bindings to the `Brotli`_ compression
4+
BrotliCFFI is a collection of `CFFI-based`_ bindings to the `Brotli`_ compression
55
reference implementation as written by Google. This enables Python software to
66
easily and quickly work with the Brotli compression algorithm, regardless of
77
what interpreter is being used.
88

9-
Brotlipy has a very similar interface to the standard library's ``zlib``
10-
module:
9+
BrotliCFFI has an identical API to Google's Python C bindings
10+
for the `Brotli`_ library.
1111

1212
.. code-block:: python
1313
14-
import brotli
14+
import brotlicffi
1515
1616
# Decompress a Brotli-compressed payload in one go.
17-
decompressed_data = brotli.decompress(compressed_data)
17+
decompressed_data = brotlicffi.decompress(compressed_data)
1818
1919
# Alternatively, you can do incremental decompression.
20-
d = brotli.Decompressor()
20+
d = brotlicffi.Decompressor()
2121
for chunk in chunks_of_compressed_data:
2222
some_uncompressed_data = d.decompress(chunk)
2323
2424
remaining_data = d.flush()
2525
2626
# You can compress data too.
27-
compressed = brotli.compress(uncompressed_data)
27+
compressed = brotlicffi.compress(uncompressed_data)
2828
2929
For more details on the API, see :doc:`api`.
3030

@@ -45,5 +45,5 @@ Documentation
4545
License
4646
-------
4747

48-
Brotlipy's source code is made available under the MIT license. Brotli itself
48+
BrotliCFFI's source code is made available under the MIT license. Brotli itself
4949
is licensed under Version 2.0 of the Apache Software License.

docs/source/installation.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
Installation
22
============
33

4-
Installing Brotlipy couldn't be easier:
4+
Installing BrotliCFFI couldn't be easier:
55

66
.. code-block:: bash
77
8-
$ pip install brotlipy
8+
$ python -m pip install brotlicffi
99
1010
On OS X and Windows this should succeed without difficulty. On Linux, the above
1111
command has a few dependencies: mostly, you need a C compiler, the Python

setup.py

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def run(self):
3333
"include_dirs": [
3434
"libbrotli/include",
3535
"libbrotli/",
36-
"src/brotli"
36+
"src/brotlicffi"
3737
],
3838
"sources": [
3939
'libbrotli/common/dictionary.c',
@@ -76,12 +76,12 @@ def finalize_options(self):
7676
cmdclass['bdist_wheel'] = BDistWheel
7777

7878
setup(
79-
name="brotlipy",
79+
name="brotlicffi",
8080
version="0.7.0",
8181

82-
description="Python binding to the Brotli library",
82+
description="Python CFFI bindings to the Brotli library",
8383
long_description=long_description,
84-
url="https://github.com/python-hyper/brotlipy/",
84+
url="https://github.com/python-hyper/brotlicffi",
8585
license="MIT",
8686

8787
author="Cory Benfield",
@@ -93,17 +93,10 @@ def finalize_options(self):
9393
install_requires=[
9494
"cffi>=1.0.0",
9595
],
96-
extras_require={
97-
':python_version == "2.7" or python_version == "3.3"': ['enum34>=1.0.4, <2'],
98-
},
99-
100-
cffi_modules=["src/brotli/build.py:ffi"],
101-
96+
cffi_modules=["src/brotlicffi/_build.py:ffi"],
10297
packages=find_packages('src'),
10398
package_dir={'': 'src'},
104-
105-
ext_package="brotli",
106-
99+
ext_package="brotlicffi",
107100
libraries=libraries,
108101

109102
zip_safe=False,
@@ -120,5 +113,8 @@ def finalize_options(self):
120113
"Programming Language :: Python :: 3.4",
121114
"Programming Language :: Python :: 3.5",
122115
"Programming Language :: Python :: 3.6",
116+
"Programming Language :: Python :: 3.7",
117+
"Programming Language :: Python :: 3.8",
118+
"Programming Language :: Python :: 3.9",
123119
]
124120
)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# flake8: noqa
3-
from .brotli import (
3+
from ._api import (
44
decompress, Decompressor, compress, BrotliEncoderMode, DEFAULT_MODE,
55
Compressor, MODE_GENERIC, MODE_TEXT, MODE_FONT, error, Error
66
)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import math
33
import enum
44

5-
from ._brotli import ffi, lib
5+
from ._brotlicffi import ffi, lib
66

77

88
class Error(Exception):

0 commit comments

Comments
 (0)