Changelog
Release history for cslug. Breaking changes are highlighted in red text.
v1.0.0
Support the semi-standardised
CFLAGS,MACOSX_DEPLOYMENT_TARGETandMACOSX_ARCHITECTUREas aliases for the pre-existingCC_FLAGS,MACOS_DEPLOYMENT_TARGETandMACOS_ARCHITECTUREenvironment variables.Fix building wheels with new setuptools+wheel versions.
Remove
cslug.__version__attribute. Useimportlib.metadata.version("cslug")instead.Fix the macOS deployment target not being enforced for targets below 10.12.
Drop end of life Python versions 3.6 and 3.7.
The build command in
BuildErrornow uses shell-like syntax instead of an argument list.
v0.7.0
Fix macOS wheel tag when building an
arm64only wheel.Fix macOS wheel tags when building from a
universal2build of Python.Make clang the default compiler on macOS and FreeBSD. Since these platforms officially use clang as their default compilers, clang is much more likely to be available. gcc is still used as a fallback if clang is not find-able.
Expose all stdlib functions available on the current operating system. The original plan of making
cslug.stdlibexpose only symbols that are universally available on all platforms meant that, as cslug gained new platforms or newer versions of existing platforms deprecated functions (in particularly the dropping of the insecure family of functions that took NULL terminated string inputs), that the pool of functions cslug could expose was constantly shrinking and cslug was essentially having to make breaking changes every time. The new approach is simply to expose anything that's available on the current platform. The documentation (cslug.stdlib) lists which platforms each function can be used on.On Windows versions that support it (11 and, if the relevant update is installed, 10), use the new Universal C Runtime for
cslug.stdlib. Unlikemsvcrt.dllwhichcslugused originally, it receives updates and is officially documented and supported API so it shouldn't disappear at some unknown point in the future! The following functions are inmsvcrtbut not in UCRT: ctime(), fprintf(), fscanf(), gmtime(), localtime(), printf(), scanf(), sprintf(), sscanf(), swprintf(), swscanf(), vfprintf(), vswprintf().Add support for clang on MSYS2.
Add support for OpenBSD and NetBSD.
v0.6.0
Add support for NVIDEA's multicore/GPU friendly PGCC compiler.
v0.5.2
Fix a regression (since
v0.5.1) in findinglibcon musl Linux. This regression is reproducible only if gcc is not installed.
v0.5.1
Fix compatibility with newer Python versions on MSYS2 which, for some reason, have started setting
sys.platformtocygwininstead ofmsys.Redesign the stdlib library selection giving it a generic default implementation which simply assumes POSIX compliance. Untested POSIXs or Linux distributions using alternative implementations of libc should work out the box provided that they follow the POSIX standard and
ctypes.util.find_library()works on said platform. All the officially supported platforms should be unaffected.
v0.5.0
Add a
MACOS_ARCHITECTUREenvironment variable to allow cross-building for macOS's new ARM chips. See Architectures for macOS.Fix compatibility with clang on Windows. Clang/Windows, installed via WinLibs, is now a supported and routinely tested combination.
v0.4.1
Fix
cc_version()when version to parse has additional suffixes.
v0.4.0
Force
setup.py bdist_wheelto runclean --all. Doing so blocks setuptools from dumping files for the wrong platform from the build cache folder into a wheel without any check to see if it is required. Seecslug.building.bdist_wheelfor details.Support Android running Termux.
Drop the
mblen()function fromcslug.stdlibdue to its unavailability on Android.Support Cygwin Python and Cygwin native gcc. Formerly, cslug supported a Cygwin environment but only using a regular MSVC build of Python and gcc cross compile headers for building generic Windows applications.
v0.3.0
Clang is now adopted automatically on macOS and FreeBSD if gcc unavailable. Preference for either compiler can still be overridden using the
CCenvironment variable.Custom compiler options may now be provided either with the new flags option to
cslug.CSlugor with theCC_FLAGSenvironment variable. See Add compiler flags.Control of the minimum support macOS version has moved from the previously undocumented
MIN_OSXenvironment variable to the more standard (albeit wordier)MACOS_DEPLOYMENT_TARGETenvironment variable. See Minimum OSX version. The default value for this variable has changed from 10.5 to 10.6 to match that of minimum supported Python (currently Python 3.6).Compile with
-O3instead of-Ofast. The latter breaks handling ofNaNandINFamongst other things.-Ofastmay be re-enabled through custom compiler flags if desired.Only specify architecture to compiler (using
-m32) if Python is 32bit. This fixes compatibility withaarch64/arm64,ppc64leands390xarchitectures which are now considered supported and part of routine testing using the manylinux wacky-architecture docker images.Fix compatibility with Alpine Linux. Cross-distribution compiling for or from Alpine is not possible but compiling on Alpine for Alpine is now officially supported and routinely tested with the Python Alpine docker images.
v0.2.0
Compile with
-Ofaston clang.Prevent
.hfiles being passed to compiler. TinyCC and certain versions of clang raise an error if passed a header file directly.
v0.1.2
Default unrecognised C types to void pointer. Formally the default was
intfor arguments, none for return types and structure fields broke.
v0.1.1
Fix docstring type annotations to use
orinstead ofUnion[...].Add C type
ptrdiff_tas an alias forssize_t.
v0.1.0
Initial release on PyPI.