THIRD-PARTY SOFTWARE NOTICES
============================

k-ctds wheel packages may bundle compiled copies of the following
third-party libraries. These libraries are not part of k-ctds itself
and are distributed under their own license terms.

All bundled libraries are DYNAMICALLY LINKED as shared objects
(.so on Linux, .dylib on macOS, .dll on Windows). They are copied
into the wheel by auditwheel (Linux) or delocate (macOS) and can
be located alongside the _tds extension module inside the installed
package. This means users can replace any bundled library with a
compatible version of their choosing, as described below.


FreeTDS
-------
License: GNU Library General Public License (LGPL) version 2.0 or later
SPDX:    LGPL-2.0-or-later
Website: https://www.freetds.org/
Source:  https://github.com/FreeTDS/freetds

k-ctds dynamically links against FreeTDS (libsybdb) for SQL Server
connectivity. When distributed as a pre-built wheel, the FreeTDS
shared library is bundled inside the wheel.

Because FreeTDS is dynamically linked (not statically linked), the
LGPL's requirements are satisfied: users retain the ability to replace
the bundled FreeTDS shared library with a different or modified version.

Bundled version and modifications: wheels bundle the FreeTDS release
named by FREETDS_VERSION in pyproject.toml, built from the official
release tarball (https://www.freetds.org/files/stable/) with one
modification applied at build time. The patch
freetds/fedauth-<version>.patch, shipped in the k-ctds source
distribution, adds federated (Microsoft Entra ID) SecurityToken
authentication for TDS 7.4; each modified source file carries a notice
of the change, and the modified library remains under the LGPL. The
complete modified source is available as the release tarball plus that
patch, or as tag v1.5.21-kctds.1 of https://github.com/koddachad/freetds
(source archive:
https://github.com/koddachad/freetds/archive/refs/tags/v1.5.21-kctds.1.tar.gz).

To use your own FreeTDS instead of the bundled copy, install k-ctds
from source:

    pip install k-ctds --no-binary k-ctds

Set the following environment variables to point to your FreeTDS
installation:

    CTDS_INCLUDE_DIRS=/path/to/freetds/include
    CTDS_LIBRARY_DIRS=/path/to/freetds/lib
    CTDS_RUNTIME_LIBRARY_DIRS=/path/to/freetds/lib

See LICENSE.FreeTDS for the license notice and the full text of the
GNU Library General Public License version 2.


OpenSSL
-------
License: Apache License 2.0 (OpenSSL 3.x)
SPDX:    Apache-2.0
Website: https://www.openssl.org/
Source:  https://github.com/openssl/openssl

FreeTDS is compiled with TLS support via OpenSSL. Pre-built wheels
include the OpenSSL shared libraries (libssl, libcrypto) as transitive
dependencies of FreeTDS — they are bundled automatically by auditwheel
(Linux), delocate (macOS) or delvewheel (Windows).

All pre-built wheels bundle OpenSSL 3.x, which is licensed under the
Apache License 2.0. On Linux and macOS, the release named by
OPENSSL_VERSION in pyproject.toml is built from source during the wheel
build (the manylinux build image only provides OpenSSL 1.1.1, which is
not used). On Windows it comes from the OpenSSL 3 installation on the
build machine. Older OpenSSL
versions (1.1.1 and earlier) used a different dual-license (the
OpenSSL License + SSLeay License) and are NOT bundled in wheels.

See LICENSE.OpenSSL for the full license text.


win-iconv (Windows only)
------------------------
License: Public Domain
Website: https://github.com/win-iconv/win-iconv

On Windows, FreeTDS requires iconv for character set conversion.
win-iconv is statically linked into the FreeTDS build on Windows.
win-iconv is released into the public domain by its author.

