Skip to content

Latest commit

 

History

History
117 lines (76 loc) · 2.73 KB

README.md

File metadata and controls

117 lines (76 loc) · 2.73 KB

libsettings

Open source SwiftNav settings API library.

libsettings aims to provide a standardized settings framework for projects accessing Piksi settings.

Bindings

This repository includes python bindings. For rust bindings see libsettings-rs.

Building

Unix

Output

  • .so can be found under build/src/
  • Python distribution package can be found under dist/

Prerequisities

  • Python
  • pip
  • CMake
  • conda environment or virtualenv (via pip install virtualenv)

You can do without 'virtualenv' but beaware that in this case contents of requirements-dev.txt shall be installed to your Python environment. You can specify the Python version while calling 'cmake' otherwise the default one is used.

Commands

To build the native (C) code:

mkdir build
cd build
cmake .. # If you want to specify python version: 'cmake -D PYTHON=python3 ..'
make
cd ..

Source distribution package creation (Python)

Run

pip install build
python -m build --sdist

Windows

Architecture (32/64-bit) is determined by conda installation.

Output

  • .dll and .lib can be found under build/src/Release/
  • Python distribution package can be found under dist/

Prerequisities for Python 3.7.x and above

Commands for Python 3.7.x and above

python -m build --wheel

Prebuilt wheels creation

We use https://cibuildwheel.readthedocs.io/en/stable to create wheels.

Releasing

To release, do the following:

  • Update setup.py for the new version number: sed s/0.1.12/0.1.13/g setup.py
  • Commit the version update: git commit -a -m "release: version 0.1.13"
  • Push the release to GitHub: git push origin 0.1.13 master

Then, visit the "Wheels" CI build output to download for the tag and download the "artifact" zip file:

This will contain all of the build wheels:

Unzip this archive and use Twine to upload to PyPI:

mkdir libsettings-0.1.13
cd libsettings-0.1.13
unzip ~/Downloads/artifact.zip
twine upload -u $PYPI_USERNAME -p PYPI_PASSWORD

Sanity check

To test your build you should search for the built distribution package under dist directory. Install it using ´pip´ and then:

python python/settings_client.py --tcp -p 192.168.0.222:55555

Installing from package managers

Some bindings are available on package managers:

  • [python]: available on PyPI: pip install libsettings
  • [rust]: available on cargo: cargo add install libsettings