more packaging improvements

master
Hubert Chathi 2023-04-27 17:19:53 -04:00
parent bbdc12c569
commit 5cfe6c3dbd
4 changed files with 28 additions and 6 deletions

View File

@ -8,7 +8,6 @@ RELEASE_OPTIMIZE_FLAGS ?= -O3
DEBUG_OPTIMIZE_FLAGS ?= -g -O0 -U_FORTIFY_SOURCE
JS_OPTIMIZE_FLAGS ?= -O3
FUZZER_OPTIMIZE_FLAGS ?= -O3
CC = gcc
EMCC = emcc
EMAR = emar
AR = ar
@ -31,7 +30,7 @@ JS_ASMJS_TARGET := javascript/olm_legacy.js
WASM_TARGET := $(BUILD_DIR)/wasm/libolm.a
JS_EXPORTED_FUNCTIONS := javascript/exported_functions.json
JS_EXPORTED_RUNTIME_METHODS := [ALLOC_STACK,writeAsciiToMemory,intArrayFromString]
JS_EXPORTED_RUNTIME_METHODS := [ALLOC_STACK,writeAsciiToMemory,intArrayFromString,UTF8ToString,StringToUTF8]
JS_EXTERNS := javascript/externs.js
PUBLIC_HEADERS := include/olm/olm.h include/olm/outbound_group_session.h include/olm/inbound_group_session.h include/olm/pk.h include/olm/sas.h include/olm/error.h include/olm/olm_export.h

View File

@ -203,8 +203,9 @@ endorsed by the Matrix.org Foundation C.I.C.
## Release process
First: bump version numbers in ``common.mk``, ``CMakeLists.txt``,
``javascript/package.json``, ``python/olm/__version__.py``, ``OLMKit.podspec``,
``Package.swift``, and ``android/gradle.properties``.
``javascript/package.json``, ``python/olm/__version__.py``,
``python/pyproject.toml``, ``OLMKit.podspec``, ``Package.swift``, and
``android/gradle.properties``.
Also, ensure the changelog is up to date, and that everything is committed to
git.

View File

@ -12,7 +12,7 @@
+recursive-include libolm/tests *
--- a/olm_build.py
+++ b/olm_build.py
@@ -25,14 +25,23 @@
@@ -25,13 +25,30 @@
DEVELOP = os.environ.get("DEVELOP")
@ -26,6 +26,7 @@
-headers_build = subprocess.Popen("make headers", shell=True)
-headers_build.wait()
+# Try to build with cmake first, fall back to GNU make
+try:
+ subprocess.run(
+ ["cmake", ".", "-Bbuild", "-DBUILD_SHARED_LIBS=NO"],
@ -36,6 +37,13 @@
+ cwd="libolm", check=True,
+ )
+except FileNotFoundError:
+ subprocess.run(["make", "static"], cwd="libolm", check=True)
+ try:
+ # try "gmake" first because some systems have a non-GNU make
+ # installed as "make"
+ subprocess.run(["gmake", "static"], cwd="libolm", check=True)
+ except FileNotFoundError:
+ # some systems have GNU make installed without the leading "g"
+ # so give that a try (though this may fail if it isn't GNU make)
+ subprocess.run(["make", "static"], cwd="libolm", check=True)
ffibuilder.set_source(

14
python/pyproject.toml Normal file
View File

@ -0,0 +1,14 @@
[project]
name = "python-olm"
version = "3.2.14"
description = "python CFFI bindings for the olm cryptographic ratchet library"
authors = [{name = "Damir Jelić", email = "poljar@termina.org.uk"}]
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Topic :: Communications",
]
dependencies = ["cffi>=1.0.0"]
[build-system]
requires = ["setuptools", "cffi>=1.0.0"]
build-backend = "setuptools.build_meta"