Closed abaelhe closed 1 year ago
Update __init__.py to fix an error when build the soxr package:
move 'from .version import version as __version__' to first line,
to prevent circular references as early as possible.
~/python-soxr $ git diff src/soxr/__init__.py
diff --git a/src/soxr/__init__.py b/src/soxr/__init__.py
index afb01c4..63e3118 100644
--- a/src/soxr/__init__.py
+++ b/src/soxr/__init__.py
@@ -3,6 +3,8 @@
# Python-SoXR is a Python wrapper of libsoxr.
# https://github.com/dofuuz/python-soxr
+from .version import version as __version__
+
import warnings
import numpy as np
@@ -12,8 +14,6 @@ from .cysoxr import cysoxr_divide_proc
from .cysoxr import cysoxr_oneshot
from .cysoxr import QQ, LQ, MQ, HQ, VHQ
-from .version import version as __version__
-
# libsoxr locates memory per each channel.
# Too much channels will cause memory error.
~/python-soxr $ git add src/soxr/__init__.py
Follow build instruction here. https://github.com/dofuuz/python-soxr/blob/main/BUILDING.md
Triggering setup.py wouldn't work.
Error log: