Skip to content

Commit

Permalink
fix: add warning to setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
crwilcox committed Mar 18, 2020
1 parent d6e6df3 commit fc91055
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion setup.py
Expand Up @@ -18,7 +18,7 @@

import setuptools
import setuptools.command.build_ext

import warnings

_EXTRA_DLL = "extra-dll"
_DLL_FILENAME = "crc32c.dll"
Expand Down Expand Up @@ -90,11 +90,16 @@ def main(build_cffi=True):


if __name__ == "__main__":
import sys
try:
main()
except KeyboardInterrupt:
raise
except SystemExit:
# If installation fails, it is likely a compilation error with CFFI
# Try to install again.
warnings.warn(
"Compiling the CFFI Extension crc32c has failed. Only a pure "
"python implementation will be usable."
)
main(build_cffi=False)

0 comments on commit fc91055

Please sign in to comment.