8000 Fixups by jonathanunderwood · Pull Request #266 · python-lz4/python-lz4 · GitHub
[go: up one dir, main page]

Skip to content

Fixups #266

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 8 commits into from
Dec 30, 2022
Merged
Prev Previous commit
Next Next commit
Add env var to control building against system LZ4
  • Loading branch information
jonathanunderwood committed Dec 30, 2022
commit acd7557dd837966961e02c3a958d04f700e3d8b8
8 changes: 7 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,13 @@ def pkgconfig_installed_check(lib, required_version, default):
'lz4/stream/_stream.c'
]

if liblz4_found is True:
use_system_liblz4_env = os.environ.get("PYLZ4_USE_SYSTEM_LZ4", "True")
if use_system_liblz4_env.upper() in ("1", "TRUE"):
use_system_liblz4 = True
else:
use_system_liblz4 = False

if liblz4_found is True and use_system_liblz4 is True:
extension_kwargs['libraries'] = ['lz4']
else:
extension_kwargs['include_dirs'] = ['lz4libs']
Expand Down
0