Skip to content

Commit

Permalink
Switch to our fork instead of patching
Browse files Browse the repository at this point in the history
  • Loading branch information
ksiazkowicz committed Apr 24, 2020
1 parent ec57c58 commit eee443e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 22 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,14 @@ jobs:
sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'
sudo apt update
# abieos requires GCC8, CMake and boost
sudo apt install -yqq g++8 cmake make libboost-dev libboost-date-time-dev
- name: Patch abieos build files
run: |
sed -i 's/STATIC src\/abi.cpp/STATIC src\/abieos.cpp src\/abi.cpp/' external/abieos/CMakeLists.txt
sudo apt install -yqq g++-8 cmake make libboost-dev libboost-date-time-dev
- name: Build abieos
run: |
cd external/abieos
mkdir build
cd build
CC=gcc-8 CXX=g++-8 cmake ..
make abieos
make
- uses: actions/upload-artifact@v1
with:
name: abieos
Expand Down
3 changes: 2 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "external/abieos"]
path = external/abieos
url = [email protected]:EOSIO/abieos.git
url = [email protected]:ulamlabs/abieos.git
branch = build-patches
15 changes: 1 addition & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ First you need to build abieos library itself:
$ git submodule update --init-recursive
$ mkdir external/abieos/build
$ cd external/abieos/build
$ sed -i 's/STATIC src\/abi.cpp/STATIC src\/abieos.cpp src\/abi.cpp/' ../CMakeLists.txt
$ cmake ..
$ make
```
Expand All @@ -32,19 +31,7 @@ $ python setup.py build --static

### Dynamically linked

If you really want to dynamically link the bindings to the version of abieos installed on your system, you also can. At the time of writing these instructions (24.02.2020), EOSIO does not release a binary packages for any OS nor even supports installing the built library using `make` command.

#### macOS

A small patch to `CMakeLists.txt` has to be applied for the library to build as a `.dylib` instead of `.so`, thus allowing us to link against it.

```shell
$ sed -i 's/abieos_module MODULE/abieos_module SHARED/' ../CMakeLists.txt
```

#### Common

Assuming you've built the library and copied it manually into correct paths, you can simply build the bindings using `setuptools`.
If you really want to dynamically link the bindings to the version of abieos installed on your system, you also can. At the time of writing these instructions (24.02.2020), EOSIO does not release a binary packages for any OS nor even supports installing the built library using `make` command. Assuming you've built the library and copied it manually into correct paths, you can simply build the bindings using `setuptools`.

```shell
$ python setup.py build
Expand Down
2 changes: 1 addition & 1 deletion external/abieos
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

# Hacky but are there really any docs for this?
if '--static' in sys.argv:
extra_objects = ['external/abieos/build/libabieos.a']
extra_objects = ['external/abieos/build/libabieos_static.a']
sys.argv.remove('--static')
else:
libraries.append('abieos')
Expand Down

0 comments on commit eee443e

Please sign in to comment.