Skip to content

WIP #133

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

WIP #133

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/cross_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: cross-build
on:
push:
branches:
- improve-and-fix-workflow
- embedded-lib-cross-build
# pull_request:
# types: [closed]
# branches:
Expand All @@ -18,7 +18,7 @@ jobs:
run: "echo 'Waiting for other workflow to complete...'"

build:
if: github.event.pull_request.merged == true
# if: github.event.pull_request.merged == true
name: Build C release for ${{ matrix.os.name }}
strategy:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Cargo.lock
*.egg-info/
*.egg
.eggs/
*.so
#*.so
/build/
# -----------------------------------
# server tests
Expand Down
4 changes: 3 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
recursive-include surrealdb *.so
recursive-include surrealdb *.txt
recursive-include surrealdb *.dll
recursive-include surrealdb *.dylib
recursive-include surrealdb *.txt
Binary file added libsrc/libsurrealdb_c.so
Binary file not shown.
Binary file added libsrc/surrealdb_c.dll
Binary file not shown.
11 changes: 5 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import pathlib

from setuptools import setup
from setuptools_rust import Binding, RustExtension


with open("README.md", "r") as fh:
Expand All @@ -14,18 +13,18 @@


setup(
name="surrealdb-beta",
author="Maxwell Flitton",
name="surrealdb",
author="SurrealDB",
author_email="maxwell@gmail.com",
description="SurrealDB python client.",
long_description=long_description,
long_description_content_type="text/markdown",
version=version,
rust_extensions=[RustExtension("surrealdb.rust_surrealdb", binding=Binding.PyO3)],
# package_dir={"surrealdb": "surrealdb"},
packages=[
"surrealdb",
"surrealdb.execution_mixins",
"surrealdb.async_execution_mixins"
"surrealdb.data",
"surrealdb.data.types",
],
package_data={
"surrealdb": ["binaries/*"],
Expand Down
2 changes: 1 addition & 1 deletion surrealdb/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION='0.1.0'
VERSION='0.4.3'
8 changes: 4 additions & 4 deletions surrealdb/connection_clib.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@

def get_lib_path() -> str:
if platform.system() == "Linux":
lib_extension = ".so"
lib_file = "libsurrealdb_c.so"
elif platform.system() == "Darwin":
lib_extension = ".dylib"
lib_file = "libsurrealdb_c.dylib"
elif platform.system() == "Windows":
lib_extension = ".dll"
lib_file = "surrealdb_c.dll"
else:
raise SurrealDbConnectionError("Unsupported operating system")

lib_path = os.path.join(CLIB_FOLDER_PATH, f"libsurrealdb_c{lib_extension}")
lib_path = os.path.join(CLIB_FOLDER_PATH, f"{lib_file}")
if os.path.isfile(lib_path) is not True:
raise Exception(f"{lib_path} is missing")

Expand Down
Loading