Changelog¶
Release history for cslug. Breaking changes are highlighted in red text.
v0.7.0¶
Fix macOS wheel tag when building an
arm64
only wheel.Fix macOS wheel tags when building from a
universal2
build 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.stdlib
expose 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.dll
whichcslug
used 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 inmsvcrt
but 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.5.2¶
Fix a regression (since
v0.5.1
) in findinglibc
on 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.platform
tocygwin
instead 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_ARCHITECTURE
environment 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_wheel
to 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_wheel
for details.Support Android running Termux.
Drop the
mblen()
function fromcslug.stdlib
due 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
CC
environment variable.Custom compiler options may now be provided either with the new flags option to
cslug.CSlug
or with theCC_FLAGS
environment variable. See Add compiler flags.Control of the minimum support macOS version has moved from the previously undocumented
MIN_OSX
environment variable to the more standard (albeit wordier)MACOS_DEPLOYMENT_TARGET
environment 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
-O3
instead of-Ofast
. The latter breaks handling ofNaN
andINF
amongst other things.-Ofast
may 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
,ppc64le
ands390x
architectures 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
-Ofast
on clang.Prevent
.h
files 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
int
for arguments, none for return types and structure fields broke.
v0.1.1¶
Fix docstring type annotations to use
or
instead ofUnion[...]
.Add C type
ptrdiff_t
as an alias forssize_t
.
v0.1.0¶
Initial release on PyPI.