Re: [libgpiod][PATCH v9 1/1] bindings: python: optionally include module in sdist

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 25, 2023 at 10:27 AM Phil Howard <phil@xxxxxxxxxxxxx> wrote:
>
> Optionally vendor libgpiod source into sdist so that the Python module can
> be built from source, even with a missing or mismatched system libgpiod.
>
> Add two new environment variables "LINK_SYSTEM_LIBGPIOD" and
> "LIBGPIOD_VERSION" to control what kind of package setup.py will build.
>
> In order to build an sdist or wheel package with a vendored libgpiod a
> version must be specified via the "LIBGPIOD_VERSION" environment variable.
>
> This will instruct setup.py to verify the given version against the list
> in sha256sums.asc and ensure it meets or exceeds a LIBGPIOD_MINIMUM_VERSION
> required for compatibility with the bindings.
>
> It will then fetch the tarball matching the requested version from
> mirrors.edge.kernel.org, verify the sha256 signature, unpack it, and copy
> the lib and include directories into the package root so they can be
> included in sdist or used to build a binary wheel.
>
> eg: LIBGPIOD_VERSION=2.1.0 python3 setup.py sdist
>
> Will build a source distribution with gpiod version 2.1.0 source included.
>
> It will also save the gpiod version into "libgpiod-version.txt" so that it
> can be passed to the build when the sdist is built by pip.
>
> Requiring an explicit version ensures that the Python bindings - which
> can be changed and versions independent of libgpiod - are built against a
> stable libgpiod release.
>
> In order to force a package with vendored gpiod source to link the system
> libgpiod, the "LINK_SYSTEM_LIBGPIOD" environment variable can be used:
>
> eg: LINK_SYSTEM_LIBGPIOD=1 pip install libgpiod
>
> Signed-off-by: Phil Howard <phil@xxxxxxxxxxxxx>
> ---

This now looks good to me. I'll leave it here until Friday and if
there are no objections (Kent, would you mind reviewing this one?),
I'll apply it to the master branch, do the v2.1 release of libgpiod,
then create the v2.1.0 release of python bindings (with sdist
packaging libgpiod v2.1) and upload it to gpiod @ pypi. Hopefully this
will work correctly.

Bart




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux