Skip to content

Add the optional compression libs to extras_require #2123

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

Merged
merged 3 commits into from
Nov 15, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@ def run(cls):
version=__version__,

tests_require=test_require,
extras_require={"crc32c": ["crc32c"]},
extras_require={
"crc32c": ["crc32c"],
"lz4": ["lz4"],
"snappy": ["python-snappy"],
Copy link
Contributor Author

@jeffwidman jeffwidman Sep 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure if we should take the "snappy" namespace or use "python-snappy" so as to disambiguate between different implementations if we later have support for a pure-python vs c-based lib... this applies to the "zstd" entry as well...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dpkp @tvoinarovskyi any opinion?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think dropping the python- prefix is fine here.

"zstd": ["python-zstandard"],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this actually correct? It looks like the PyPI package is just zstandard. When testing installing only this package locally, I get an error:

$ pip install python-zstandard
ERROR: Could not find a version that satisfies the requirement python-zstandard (from versions: none)
ERROR: No matching distribution found for python-zstandard

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seeing the same error after cloning repository and trying to install with the extra locally.

$ pip install -e .[zstd]
Obtaining file:///Users/anton/projects/kafka-python
  Preparing metadata (setup.py) ... done
ERROR: Could not find a version that satisfies the requirement python-zstandard; extra == "zstd" (from kafka-python[zstd]) (from versions: none)
ERROR: No matching distribution found for python-zstandard; extra == "zstd"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'd be better off opening a new issue, as comments on old PR's tend to get lost.

},
cmdclass={"test": Tox},
packages=find_packages(exclude=['test']),
author="Dana Powers",
Expand Down