From 5990c09dd5c1156ddff988c629dd2eeeb351c6dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Van=C4=9Bk?= Date: Fri, 2 Dec 2022 15:52:21 +0100 Subject: [PATCH] Autodetect availability of C extension This improves default behavior of setup.py in sense that py version of frozendict is used for python versions which do not have C extension available yet. This would probably reduce amount of issues similar to [1-4] in future. [1] https://github.com/Marco-Sulla/python-frozendict/issues/68 [2] https://github.com/Marco-Sulla/python-frozendict/issues/67 [3] https://github.com/Marco-Sulla/python-frozendict/issues/65 [4] https://github.com/Marco-Sulla/python-frozendict/issues/58 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e11f1b7..f06c0a1 100755 --- a/setup.py +++ b/setup.py @@ -164,7 +164,7 @@ impl = python_implementation() if custom_arg == None: - if impl == "PyPy": + if impl == "PyPy" or not src_path.exists(): custom_arg = "py" else: custom_arg = "c"