conan export

$ conan export [-h] [-k] path reference

Copies the recipe (conanfile.py & associated files) to your local cache. Use the ‘reference’ param to specify a user and channel where to export it. Once the recipe is in the local cache it can be shared, reused and to any remote with the ‘conan upload’ command.

positional arguments:
  path                  Path to a folder containing a conanfile.py or to a
                        recipe file e.g., my_folder/conanfile.py
  reference             user/channel, or Pkg/version@user/channel (if name and
                        version are not declared in the conanfile.py

optional arguments:
  -h, --help            show this help message and exit
  -k, -ks, --keep-source
                        Do not remove the source folder in local cache. Use
                        this for testing purposes only

The export command will run a linting of the package recipe, looking for possible inconsistencies, bugs and py2-3 incompatibilities. It is possible to customize the rules for this linting, as well as totally disabling it. Look at the recipe_linter and pylintrc variables in conan.conf and the PYLINTRC environment variable.

Examples

  • Export a recipe using a full reference. Only valid if name and version are not declared in the recipe:

    $ conan export . mylib/1.0@myuser/channel
    
  • Export a recipe from any folder directory, under the myuser/stable user and channel:

    $ conan export ./folder_name myuser/stable
    
  • Export a recipe without removing the source folder in the local cache:

    $ conan export . fenix/stable -k