-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add brotli to PyPI repository #72
Comments
We probably need a release of some kind to by able to identify which version have been uploaded? |
@szabadka would you be ready to tag a release? |
There will be some more improvements to the encoder in the coming weeks and I would prefer cutting a release after that. |
Ok, fair enough. Looking forward to those. |
I have one quick question about the tests in the python subdirectory. Is there any easy way to run them on Linux in a self-contained manner, i.e. without needing to install anything outside the root directory in the repository. Ideally the following would work: $ python setup.py build_ext The first command succeeds, but when I run the second, I get 'ImportError: No module named brotli', which suggests to me that it is looking for brotli in a system-wide lib and not in the created build/ directory. |
you're right, it shouldn't do that. |
Thanks, I confirmed that it works on Linux. |
Good! I can confirm it works on OSX and Windows too. |
Before the release we would need also to make sure the Python module exposes all features of the brotli library (like the new encoder params). |
I'm not one to really judge here, but if you guys are deciding on a versioning scheme, take a look at Semantic Versioning! This project would benefit from it over other versioning schemes because it makes it easy to determine when breaking changes have been made to the API, which is obviously a concern considering the last comment that @khaledhosny made in this thread. |
Yes, we should add the encoder's newly introduced What other feature would you like to expose in the Python module? |
I think the parameters would be enough, unless we can come up with a compelling use case where Python users would benefit from the granularity of the API. |
do you think brotli is now ready to be uploaded to the Python Package Index (PyPI)? |
We just pushed a new version of the encoder and decoder, which is ready to be uploaded to PyPI after we fix the issue you pointed out. There is one more thing that could be changed in the python interface. In the latest version of the encoder, the advanced fields in BrotliParams were deprecated and are ignored (these are enable_dictionary, enable_transforms, greedy_block_split, enable_context_modeling). |
@szabadka very good! I have a question: those fields are not exposed in the command line script ( |
Yes, I meant the brotlimodule.cc |
do we also need to bump the Python module's |
Actually, we are planning to tag the current version of brotli as v0.1.0 |
Ok, that's fine. |
Sure, let me know when the python part is ready. |
I configured the Travis deployment in PR #147. @anthrotype Is this all we need to do? Will every release automatically uploaded to PyPI now? |
sorry for the late reply, I was on vacation. You have set up automatic "Github Releases" deployment for Travis. The OSX compiled wheels will now be uploaded to GitHub every time you push a new tag (e.g. see v0.2.0). This is cool, thanks for that! (By the way, Travis currently builds for OS X only; it would be nice to similarly configure AppVeyor with "Github Releases", so that the Windows wheels are also uploaded to GitHub...). However, the Github Releases and PyPI are two different things which need to be configured separately. Travis has some built-in support for automatic PyPI deployment -- see help docs: For AppVeyor, you can define a custom I'd say, let's first have both OSX and Windows wheels auto uploaded to GitHub upon tagging. Then we could see how to have them uploaded to PyPI as well. In the meantime, we could just upload them to PyPI manually. |
I just read news about this. I think it's great (better than zopfli). It'd be better to use it from pypi. |
FWIW, my CFFI-based Python wrapper for Brotli is available from PyPI, but I very deliberately did not register the name |
Any news on this? |
+1 for this. Great to know that @Lukasa has published a wrapper but it would probably be better to have the "legit" module on PyPI. |
what is the status of this? Is there something I could do to help speeding this up? Basically, all is left to do is register with the PyPI server and upload the binary wheels from 0.3.0 release, along with the source distribution (i'd say both .tar.gz and .zip formats, as in Setting up automatic PyPI deployment upon tagging from Travis and Appveyor is a little tricky, but it can be done if you're interested in doing that too. |
WhiteNoise 3.0 now supports serving Brotli-compressed files to browsers whose `Accept-Encoding` includes `br`. Note: Both Firefox and Chrome only support Brotli over HTTPS. To take advantage of this, the Brotli package just needs to be available when the compression tool (`python -m whitenoise.compress`) is run. See: http://whitenoise.evans.io/en/latest/changelog.html#brotli-compression-support http://whitenoise.evans.io/en/latest/django.html#brotli-compression The WhiteNoise docs say to use an unofficial PyPI package (brotlipy), however this has a dependency on libffi (via cffi) and the official repo now has it's own Python wrapper that does not. As such, this commit instead uses the official Brotli package from GitHub, whilst we wait for the official PyPI release (google/brotli#72). The Brotli install works fine on stage/prod/Heroku/Travis. The Vagrant environment was missing g++, which is now installed during provision.
WhiteNoise 3.0 now supports serving Brotli-compressed files to browsers whose `Accept-Encoding` includes `br`. Note: Both Firefox and Chrome only support Brotli over HTTPS. To take advantage of this, the Brotli package just needs to be available when the compression tool (`python -m whitenoise.compress`) is run. See: http://whitenoise.evans.io/en/latest/changelog.html#brotli-compression-support http://whitenoise.evans.io/en/latest/django.html#brotli-compression The WhiteNoise docs say to use an unofficial PyPI package (brotlipy), however this has a dependency on libffi (via cffi) and the official repo now has it's own Python wrapper that does not. As such, this commit instead uses the official Brotli package from GitHub, whilst we wait for the official PyPI release (google/brotli#72). The Brotli install works fine on stage/prod/Heroku/Travis. The Vagrant environment was missing g++, which is now installed during provision.
WhiteNoise 3.0 now supports serving Brotli-compressed files to browsers whose `Accept-Encoding` includes `br`. Note: Both Firefox and Chrome only support Brotli over HTTPS. To take advantage of this, the Brotli package just needs to be available when the compression tool (`python -m whitenoise.compress`) is run. See: http://whitenoise.evans.io/en/latest/changelog.html#brotli-compression-support http://whitenoise.evans.io/en/latest/django.html#brotli-compression The WhiteNoise docs say to use an unofficial PyPI package (brotlipy), however this has a dependency on libffi (via cffi) and the official repo now has it's own Python wrapper that does not. As such, this commit instead uses the official Brotli package from GitHub, whilst we wait for the official PyPI release (google/brotli#72). The Brotli install works fine on stage/prod/Heroku/Travis. The Vagrant environment was missing g++, which is now installed during provision.
WhiteNoise 3.0 now supports serving Brotli-compressed files to browsers whose `Accept-Encoding` includes `br`. Note: Both Firefox and Chrome only support Brotli over HTTPS. To take advantage of this, the Brotli package just needs to be available when the compression tool (`python -m whitenoise.compress`) is run. See: http://whitenoise.evans.io/en/latest/changelog.html#brotli-compression-support http://whitenoise.evans.io/en/latest/django.html#brotli-compression The WhiteNoise docs say to use an unofficial PyPI package (brotlipy), however this has a dependency on libffi (via cffi) and the official repo now has it's own Python wrapper that does not. As such, this commit instead uses the official Brotli package from GitHub, whilst we wait for the official PyPI release (google/brotli#72). The Brotli install works fine on stage/prod/Heroku/Travis. The Vagrant environment was missing g++, which is now installed during provision.
Hello. Let's revive this effort. What needs to be done to proceed with publishing PyPI module? |
It's all covered in the PyPA Packaging User Guide linked above. You need to create an account on PyPI, make a .pypirc file and use twine to register the new project and upload the built artifacts. |
I can help you with the PyPI thing. Setting up the CI is possible, though I would need the PyPI account credentials to set that up. |
While this is still ongoing, I'll continue to remind people that there is still a CFFI-based wrapper published on PyPI under the name |
@Lukasa thanks for the reminder. I haven't tried it yet, but it would be nice if the two wrappers had the same API so they could be used interchangeably. |
@anthrotype Agreed. I think it'd be better for the core brotli implementation to choose what that API looks like though. =) At that point, I'd consider brotlipy to basically be a wrapper that is primarily useful as a drop-in replacement for people using PyPy. |
So, any news on the PyPI front? At the very least, it would be already something if someone could upload to PyPI the wheels and sdist from the current 0.5.2 release. All it takes is:
I could do that myself, but would be better if the official owners/maintainers register it first. But for now, uploading manually the artifacts that are already published on Github Releases would be good. Thanks. |
@eustas sorry to ping you (I see you are back online). Any plans on pushing the wheels to PyPI? |
Hi. Actually, thanks for pinging! Going to do it now. |
Hey! That happened! Wasn't that scary as I thought =) Yup, making releases automated is a nice idea. But to add you as a maintainer I need to know your username =) |
AWESOME!!! Big thanks! |
On Windows, this fails to load with
|
It would be nice to add Brotli to the official Python Package Index, so that users can download it with a simple
pip install brotli
.We could add just the sdist tarball, or also some pre-compiled wheel packages for Windows and Mac platforms, maybe built automatically via Travis and/or AppVeyor -- like here
/cc @khaledhosny
The text was updated successfully, but these errors were encountered: