Augment Assimp and Conan - Augment/assimp GitHub Wiki

Conan overview

Our fork of Assimp is hosted in a conan repository belonging to Augment over at conan-augment. It contains all versions of Assimp we've developed. This allows us to simply add a conanfile to our code repository to handle our dependencies, and in the case of Assimp, include it in our projects with the following line e.g.:

Assimp/4.0.1-4@augment/testing    (1)
  ^      ^        ^       ^
 lib  version   user  channel

Testing a new version

In order to test a new version, it first must be built and packaged by Conan. The first step is making sure the conanfile.py is up-to-date with the new version number, and that the source code checkout is up-to-date (with the right git tag for example). I.e., we must make sure that the following lines in the conanfile.py are up-to-date:

class AssimpConan(ConanFile):
    name = "Assimp"
    version = "4.1.0-4"
                  ^
       Change this version number

and:

def source(self):
    self.run("git clone https://github.com/Augment/assimp.git")
    self.run("cd %s && git fetch && git fetch --tags && git checkout r4.1.0-4" % self.source_subfolder)
                                                                         ^
                                                                  Change this tag

Once the conanfile.py is up-to-date, we can tell Conan to build and package our library. This can be done from the root of the folder/repository that contains our conanfile.py with the following command:

conan create . augment/testing

We specify the current directory as where to find the conanfile.py that contains all the required elements to build and package the library, as well as owner/channel. Conan will start running the build and packaging script , and if it succeeds, a new package with the version/owner/channel specified will have been created locally in the conan cache. This package can be used for testing right away in a project by specifying the new version number as in (1).

Uploading to the Conan remote

Once a package has been created locally, it can be exported to a Conan remote. Before anything else, the remote must have been added to the list of remotes, with the following:

conan remote add <remote-local-name> https://api.bintray.com/conan/augment/conan-augment

and your user credentials entered with the following:

conan user -p <apikey> -r <remote-local-name> <username>

Once the remote is available — this can be checked by running conan remote list — the new package can be exported to this remote by running the following:

conan upload Assimp/4.0.1-5@augment/testing -r <remote-local-name> --all

You must specify the name associated with the Augment conan repository after -r. The --all flag is used to also export the build result to the repository so that for identical configurations — os, compiler, etc. — there's only the need to download the pre-built package and no actual build steps are required.

Overwriting an existing version

It seems that upon uploading a second, different package for an existing version number, Conan would send back the latest package when requesting that version, but that can mess up with caches and doesn't seem reliable. If a version needs to be overwritten, it is therefore preferable to remove the files first so that after uploading a package for this version, it ends up being the only available package.

⚠️ **GitHub.com Fallback** ⚠️