-
-
Notifications
You must be signed in to change notification settings - Fork 23
feat: add Linux binary wheels #325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,30 @@ | ||
| { | ||
| "$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
| "extends": ["github>WeblateOrg/meta:renovate"] | ||
| "extends": ["github>WeblateOrg/meta:renovate"], | ||
| "customManagers": [ | ||
| { | ||
| "customType": "regex", | ||
| "managerFilePatterns": [ | ||
| "/^\\.github/scripts/build-gammu-wheel\\.sh$/" | ||
| ], | ||
| "matchStrings": [ | ||
| "# renovate: datasource=github-release-attachments depName=gammu/gammu versioning=loose\\nreadonly GAMMU_VERSION=\"(?<currentValue>[^\"]+)\"\\nreadonly GAMMU_SHA256=\"(?<currentDigest>[a-f0-9]{64})\"" | ||
| ], | ||
| "datasourceTemplate": "github-release-attachments", | ||
| "depNameTemplate": "gammu/gammu", | ||
| "versioningTemplate": "loose", | ||
| "autoReplaceStringTemplate": "# renovate: datasource=github-release-attachments depName=gammu/gammu versioning=loose\nreadonly GAMMU_VERSION=\"{{{newValue}}}\"\nreadonly GAMMU_SHA256=\"{{{newDigest}}}\"" | ||
| }, | ||
| { | ||
| "customType": "regex", | ||
| "managerFilePatterns": ["/^README\\.rst$/"], | ||
| "matchStrings": [ | ||
| "\\.\\. renovate: datasource=github-release-attachments depName=gammu/gammu versioning=loose\\n\\nThe bundled Gammu (?<currentValue>[^\\s]+) library is licensed under GPL-2\\.0-or-later\\. The\\ncorresponding source archive is available from:\\n\\nhttps://github\\.com/gammu/gammu/releases/download/[^/\\s]+/Gammu-[^/\\s]+\\.tar\\.gz" | ||
| ], | ||
| "datasourceTemplate": "github-release-attachments", | ||
| "depNameTemplate": "gammu/gammu", | ||
| "versioningTemplate": "loose", | ||
| "autoReplaceStringTemplate": ".. renovate: datasource=github-release-attachments depName=gammu/gammu versioning=loose\n\nThe bundled Gammu {{{newValue}}} library is licensed under GPL-2.0-or-later. The\ncorresponding source archive is available from:\n\nhttps://github.com/gammu/gammu/releases/download/{{{newValue}}}/Gammu-{{{newValue}}}.tar.gz" | ||
| } | ||
| ] | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| #!/usr/bin/env bash | ||
| # | ||
| # Build the deliberately minimal Gammu libraries used by Linux wheels. | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| # renovate: datasource=github-release-attachments depName=gammu/gammu versioning=loose | ||
| readonly GAMMU_VERSION="1.43.3" | ||
| readonly GAMMU_SHA256="a340b8347f5b30c84aa2a48fc497560fdc0d613618baa14b1bad94b3f316c7ff" | ||
| readonly GAMMU_PREFIX="${GAMMU_WHEEL_PREFIX:-/opt/python-gammu-gammu}" | ||
| readonly GAMMU_ARCHIVE="Gammu-${GAMMU_VERSION}.tar.gz" | ||
| readonly GAMMU_URL="https://github.com/gammu/gammu/releases/download/${GAMMU_VERSION}/${GAMMU_ARCHIVE}" | ||
|
|
||
| if ! command -v cmake >/dev/null 2>&1; then | ||
| dnf install -y cmake | ||
| fi | ||
|
|
||
| build_root="$(mktemp -d /tmp/python-gammu-wheel.XXXXXX)" | ||
| trap 'rm -rf "$build_root"' EXIT | ||
|
|
||
| curl --fail --location --silent --show-error \ | ||
| --output "${build_root}/${GAMMU_ARCHIVE}" \ | ||
| "$GAMMU_URL" | ||
| printf "%s %s\n" "$GAMMU_SHA256" "${build_root}/${GAMMU_ARCHIVE}" \ | ||
| | sha256sum --check - | ||
| tar --extract --file "${build_root}/${GAMMU_ARCHIVE}" --directory "$build_root" | ||
|
|
||
| cmake \ | ||
| -S "${build_root}/Gammu-${GAMMU_VERSION}" \ | ||
| -B "${build_root}/build" \ | ||
| -DCMAKE_BUILD_TYPE=Release \ | ||
| -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ | ||
| -DBUILD_SHARED_LIBS=OFF \ | ||
| -DWITH_BLUETOOTH=OFF \ | ||
| -DWITH_USB=OFF \ | ||
| -DWITH_IRDA=OFF \ | ||
| -DWITH_MySQL=OFF \ | ||
| -DWITH_ODBC=OFF \ | ||
| -DWITH_Postgres=OFF \ | ||
| -DWITH_LibDBI=OFF \ | ||
| -DWITH_CURL=OFF \ | ||
| -DWITH_Glib=OFF \ | ||
| -DWITH_GObject=OFF \ | ||
| -DWITH_SystemD=OFF \ | ||
| -DWITH_Libintl=OFF \ | ||
| -DWITH_Iconv=OFF \ | ||
| -DWITH_Gettext=OFF \ | ||
| -DWITH_Doxygen=OFF \ | ||
| -DWITH_BashCompletion=OFF | ||
| cmake --build "${build_root}/build" \ | ||
| --parallel \ | ||
| --target libGammu gsmsd | ||
|
|
||
| install -d "${GAMMU_PREFIX}/include/gammu" "${GAMMU_PREFIX}/lib" | ||
| install -m 0644 "${build_root}/build/include/"*.h \ | ||
| "${GAMMU_PREFIX}/include/gammu/" | ||
|
Comment on lines
+55
to
+56
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
During every cibuildwheel build, this copies only CMake's binary-tree generated headers, while Gammu's public headers such as Useful? React with 👍 / 👎. |
||
| install -m 0644 "${build_root}/build/libgammu/libGammu.a" \ | ||
| "${build_root}/build/smsd/libgsmsd.a" \ | ||
| "${GAMMU_PREFIX}/lib/" | ||
Uh oh!
There was an error while loading. Please reload this page.