Closed psobot closed 6 days ago
Thanks for catching this! Unfortunately I have not looked at this code in a very long time so it's not surprising something broke.
If I remember correctly, the only reason I needed that specific class was to make sure that I included the math library for those using the MSVC compiler since it didn't add it automatically at compile time. I'll have to see if there's a new way to detect that and/or if it's still needed with the newer versions of MSVC.
@psobot:
Well, I got it compiling on Windows 11, VS 2022, Python 3.12.5, setuptools 74.0.0 by modifying the imports in the setup.py
file:
from setuptools import setup, find_packages, Extension
from setuptools._distutils.ccompiler import new_compiler
from setuptools._distutils._msvccompiler import MSVCCompiler
However, after scouring the setuptools issues log on GitHub it appears that they don't particularly like anyone using that due to how they are slowly merging distutils functionality into the main module. So far, there isn't a real good replacement/migration for the new_compiler
function and the MSVCCompiler
class. See https://github.com/pypa/setuptools/issues/2806
I'm going to look to see if there's a better way to detect MSVC to avoid this mess altogether before I update the code with the above hack.
@psobot:
After lots of cleanup and refactoring the GitHub automation, I released 0.1.1 which should fix the issue. I'm basically forcing the _USE_MATH_DEFINE
macro on all compilers for now since all the other compilers besides MSVC ignore it. Not particularly happy with it, but it's what works until setuptools reimplements compiler detection functions from distutils.
I'll leave this open for a few more days in case you have any other suggestions/concerns. Otherwise, I'll go ahead and close it then.
Fixed with version 0.1.1.
Thank you @jodhus! Looks great to me and I appreciate the quick response. 🙌🏻
Thanks for this great package, @jodhus!
Unfortunately, the
setup.py
in this project doesn't seem to be compatible with newer versions of Setuptools; failing at installation time with:Downgrading Setuptools works, but is not compatible with PEP 517 build isolation and causes installation to fail with newer tools like
uv
.