diff --git a/pyfastani/_sequtils/sequtils.cpp b/pyfastani/_sequtils/sequtils.cpp index 1946c0c..30d3439 100644 --- a/pyfastani/_sequtils/sequtils.cpp +++ b/pyfastani/_sequtils/sequtils.cpp @@ -14,11 +14,6 @@ static const X86Features features = GetX86Info().features; using namespace cpu_features; static const ArmFeatures features = GetArmInfo().features; #endif -#ifdef __aarch64__ -#include "cpuinfo_aarch64.h" -using namespace cpu_features; -static const Aarch64Features features = GetAarch64Info().features; -#endif extern "C" { // --- Fast copy with uppercase -------------------------------------------- @@ -49,17 +44,20 @@ extern "C" { #endif #ifdef __aarch64__ #ifdef NEON_BUILD_SUPPORTED - if (features.neon) - return neon_copy_upper(dst, src, len); - else + return neon_copy_upper(dst, src, len); #endif #endif - #if defined(__x86__) || defined(__x86_64__) + #ifdef __x86__ #ifdef SSE2_BUILD_SUPPORTED if (features.sse2) - return sse2_copy_upper(dst, src, len); // fast copying plus upper. + return sse2_copy_upper(dst, src, len); else #endif + #endif + #ifdef __x86_64__ + #ifdef SSE2_BUILD_SUPPORTED + return sse2_copy_upper(dst, src, len); + #endif #endif return default_copy_upper(dst, src, len); } diff --git a/setup.cfg b/setup.cfg index 2754d6b..8d6d22b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -28,12 +28,14 @@ classifier = Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 Programming Language :: Python :: Implementation :: CPython Programming Language :: Python :: Implementation :: PyPy Topic :: Scientific/Engineering :: Bio-Informatics Topic :: Scientific/Engineering :: Medical Science Apps. Typing :: Typed project_urls = + Documentation = https://pyfastani.readthedocs.io/en/stable/ Bug Tracker = https://github.com/althonos/pyfastani/issues Changelog = https://github.com/althonos/pyfastani/blob/master/CHANGELOG.md Coverage = https://codecov.io/gh/althonos/pyfastani/ diff --git a/setup.py b/setup.py index 2e1226d..ac09f7a 100644 --- a/setup.py +++ b/setup.py @@ -351,7 +351,6 @@ def _check_getid(self): flags = ["-Werror=implicit-function-declaration"] try: - self.mkpath(self.build_temp) objects = self.compiler.compile([testfile], extra_postargs=flags) except CompileError: _eprint("no") @@ -426,6 +425,11 @@ def build_extensions(self): # remove universal compilation flags for OSX if PLATFORM_SYSTEM == "Darwin": _patch_osx_compiler(self.compiler) + + # check if `PyInterpreterState_GetID` is available + if self._check_getid(): + self.compiler.define_macro("HAS_PYINTERPRETERSTATE_GETID", 1) + # build the extensions as normal _build_ext.build_extensions(self) @@ -443,10 +447,6 @@ def build_extension(self, ext): else: ext.define_macros.append(("CYTHON_WITHOUT_ASSERTIONS", 1)) - # check if `PyInterpreterState_GetID` is available - if self._check_getid(): - ext.define_macros.append(("HAS_PYINTERPRETERSTATE_GETID", 1)) - # C++ OS-specific options if ext.language == "c++": # make sure to build with C++11