@@ -156,6 +156,7 @@ def _build_uv_ffi(install_dir=None):
156156 sources = ["src/omnipkg/isolation/atomic_ops.c" ],
157157 extra_compile_args = _c_args ,
158158 optional = True ,
159+ py_limited_api = True , # ← add this
159160 )
160161
161162 class OptionalBuildExt (build_ext ):
@@ -168,6 +169,40 @@ def build_extension(self, ext):
168169 print (f"Reason: { e } " )
169170 print (f"Installing successfully with Python-speed fallback." )
170171 print (f"{ '!' * 60 } \n " )
172+ finally :
173+ _print_exotic_platform_hint ()
174+
175+ def _print_exotic_platform_hint ():
176+ import platform , sys
177+ machine = platform .machine ().lower ()
178+ if machine not in ("armv7l" , "armv7" , "s390x" , "riscv64" ):
179+ return
180+ # Detect musl
181+ is_musl = False
182+ try :
183+ with open ("/proc/self/maps" ) as f :
184+ is_musl = "musl" in f .read ()
185+ except Exception :
186+ pass
187+ if not is_musl :
188+ return
189+ print ()
190+ print ("=" * 60 )
191+ print (f" EXOTIC PLATFORM DETECTED: { platform .machine ()} / musl" )
192+ print ()
193+ print (" Some dependencies (cryptography, psutil) have no" )
194+ print (" prebuilt wheels for this platform on PyPI and will" )
195+ print (" attempt to compile from source, which requires Rust" )
196+ print (" and can take 20-40 minutes or fail entirely." )
197+ print ()
198+ print (" Pre-built wheels available at:" )
199+ print (" https://1minds3t.github.io/exotic-wheels/" )
200+ print ()
201+ print (" For a faster install run:" )
202+ print (f" pip install omnipkg \\ " )
203+ print (f" --extra-index-url https://1minds3t.github.io/exotic-wheels/" )
204+ print ("=" * 60 )
205+ print ()
171206
172207 ext_modules = [atomic_extension ]
173208 cmdclass = {'build_ext' : OptionalBuildExt }
0 commit comments