online-bridge-hackathon / DDS

An api that returns DDS results for a given deal or partial deal
https://bit.ly/bridge-hackathon
Apache License 2.0
4 stars 7 forks source link

Automated libdds build #57

Closed suokko closed 4 years ago

suokko commented 4 years ago

Use versioned dylib library name on Mac

Updates libdds to a version which drops .so suffix from mac builds. This requires library loading to use correct versioned dylib name on Mac.

Automate build process for libdds submodule

We can have service Makefile to configure and compile libdds when run_local_tests target is triggered. The process is split to smaller steps which include submodule system initialization (first time only), configure the libdds build, update libdds sources and building libdds.

Library is used directly from build directory using platform specific environment variable to add libdds build directory into the library search path.

suokko commented 4 years ago

I will update implementing environment variable in python. I think it would be easier to use than makefile implementation.

tameware commented 4 years ago

The tests work on my Mac. I don't understand why they work, though. Where does dds.py find libdds.2.dylib, and how does it know where to look?

suokko commented 4 years ago

The tests work on my Mac. I don't understand why they work, though. Where does dds.py find libdds.2.dylib, and how does it know where to look?

dds.py has following additions:

LIBDDSPATH = "libdds/.build/src/"
....
        elif platform.system() == "Darwin":
            libname = "libdds.2.dylib"
....
        if os.path.exists(LIBDDSPATH + libname):
            libname = LIBDDSPATH + libname

Those make it use libdds.2.dylib on Mac. Then the libname change to relative path happens if libdds/.build/src/libdds.2.dylib exists. In case relative path doesn't point to a library then it uses the library search path like before.

tameware commented 4 years ago

Got it now - thanks!

I'll test a deploy now, then this should be good to go.

After this is submitted we can streamline the build, test, and deploy docs. Will you take care of that or shall I?

suokko commented 4 years ago

Got it now - thanks!

I'll test a deploy now, then this should be good to go.

After this is submitted we can streamline the build, test, and deploy docs. Will you take care of that or shall I?

I can check README.gcp.md tomorrow.