Skip to content

Commit

Permalink
abpoa: 1.5.1 -> 1.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
natsukium committed Jul 27, 2024
1 parent f79422e commit a414c8b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions pkgs/by-name/ab/abpoa/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@

stdenv.mkDerivation (finalAttrs: {
pname = "${lib.optionalString enablePython "py"}abpoa";
version = "1.5.1";
version = "1.5.2";

src = fetchFromGitHub {
owner = "yangao07";
repo = "abPOA";
rev = "refs/tags/v${finalAttrs.version}";
hash = "sha256-nPMzkWkjUI+vZExNEvJa24KrR0pWGk89Mvp7TCyka/w=";
hash = "sha256-gS0PO7K4hN+3k2NF8enri1FzM80H2I+a3MNaKsm74xM=";
};

patches = [ ./simd-arch.patch ];
Expand All @@ -34,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = lib.optionals enablePython (
with python3Packages;
[
cython
cython_0
pypaBuildHook
pypaInstallHook
pythonImportsCheckHook
Expand Down
16 changes: 8 additions & 8 deletions pkgs/by-name/ab/abpoa/simd-arch.patch
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
diff --git a/setup.py b/setup.py
index 52c0e7e..f88ec08 100644
index c6fc019..49fb3c8 100644
--- a/setup.py
+++ b/setup.py
@@ -11,11 +11,12 @@ simde = ['-DUSE_SIMDE', '-DSIMDE_ENABLE_NATIVE_ALIASES']
@@ -14,11 +14,12 @@ machine_arch = os.popen("uname -m").readlines()[0].rsplit()[0]

if platform.system() == "Darwin":
if machine_system == "Darwin":
# note: see https://github.com/pypa/wheel/issues/406
- simd_flag = ['-march=native', '-D__AVX2__', '-mmacosx-version-min=10.9']
if platform.machine() in ["aarch64", "arm64"]:
if machine_arch in ["aarch64", "arm64"]:
+ simd_flag = ['-march=armv8-a+simd', '-D__AVX2__', '-mmacosx-version-min=10.9']
os.environ['_PYTHON_HOST_PLATFORM'] = "macosx-10.9-arm64"
os.environ['ARCHFLAGS'] = "-arch arm64"
else:
else: # x86_64
+ simd_flag = ['-msse2', '-mmacosx-version-min=10.9']
os.environ['_PYTHON_HOST_PLATFORM'] = "macosx-10.9-x86_64"
os.environ['ARCHFLAGS'] = "-arch x86_64"
else:
@@ -24,7 +25,7 @@ else:
elif platform.machine() in ["aarch32"]:
@@ -27,7 +28,7 @@ else:
elif machine_arch in ["aarch32"]:
simd_flag = ['-march=armv8-a+simd', '-mfpu=auto -D__AVX2__']
else:
else: # x86_64
- simd_flag=['-march=native']
+ simd_flag=[]
if os.getenv('SSE4', False):
Expand Down

0 comments on commit a414c8b

Please sign in to comment.