Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
btalb committed Jun 6, 2022
2 parents 2cb4db3 + ad44dbc commit fe30b3d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .github/build-manylinux-wheels
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ sed -i 's/ \(find_package(Python3\)/#\1/' "$root/gtsam/cmake/HandlePython.cmake"

# Build each of our wheels
pushd /io/
GLOBIGNORE="*cp311"
for PYROOT in /opt/python/cp*; do
export Python3_EXECUTABLE="$PYROOT/bin/python"
export Python3_INCLUDE_DIR="$(find "$PYROOT/include/" \
-mindepth 1 -maxdepth 1 -type d)"
"$Python3_EXECUTABLE" -m build
done
unset GLOBIGNORE

# Bundle shared libraries (aka Boost) into each of our wheels to make them
# manylinux compatible
Expand Down
23 changes: 16 additions & 7 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,25 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/setup-python@v2
with:
python-version: "3.x"
- run: |
- name: Make manylinux wheels
env:
target: manylinux2014_x86_64
run: |
docker run -e PLAT=${{ env.target }} \
-v ${{ github.workspace }}:/io \
quay.io/pypa/${{ env.target }} \
/io/.github/build-manylinux-wheels
- name: Install wheel publishing deps
run: |
python -m pip install --upgrade pip
pip install --upgrade build setuptools wheel twine
pip install --upgrade twine
- env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m build
ls ./dist/
python -m twine upload ./dist/*
python -m twine upload ./dist/*manylinux* ./dist/*.tar.gz
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,17 @@ You can see a list of our Conda dependencies in [the feedstock recipe for GTSAM

### Pip

TODO: actually add package to PyPI

First, install the system dependencies mentioned above have been installed. Then pre-built Python modules for both GTSAM Quadrics and GTSAM can be installed via:
Pre-built Python modules for both GTSAM Quadrics and GTSAM can be installed via:

```
pip install gtsam_quadrics
```

We provide pre-built Python wheels, which have libraries like an appropriate version of Boost built-in. You shouldn't need to install system dependencies when installing via Pip, unless you are installing on an unsupported platform.

### From source

Installing from source is very similar to the `pip` method above, accept we install from a local copy. Ensure the system dependencies described above are installed.
Installing from source is very similar to the `pip` method above, accept we install from a local copy. This means it's important to ensure the system dependencies described above are installed.

Then clone the repository, and initialise the `gtsam` submodule:

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def build_cmake(self, exts):
long_description = f.read()

setup(name='gtsam_quadrics',
version='0.1.3',
version='0.2.0',
author='Lachlan Nicholson',
author_email='[email protected]',
maintainer='Ben Talbot',
Expand Down

0 comments on commit fe30b3d

Please sign in to comment.