Skip to content

Commit

Permalink
Merge pull request #477 from conan-io/release/0.32.0
Browse files Browse the repository at this point in the history
Release/0.32.0
  • Loading branch information
czoido committed Mar 10, 2020
2 parents a12d698 + d3f663e commit c010408
Show file tree
Hide file tree
Showing 15 changed files with 923 additions and 51 deletions.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@ There are also two additional parameters of the ``add_common_builds``:
- **shared_option_name**: If your conanfile.py have an option **shared**, the generated builds will contain automatically the "True/False" combination for that option.
Pass "False" to deactivate it or "lib_name:shared_option_name" to specify a custom option name, e.j: boost:my_shared``
- **dll_with_static_runtime**: Will add also the combination of runtime MT with shared libraries.
- **header_only**: If your conanfile.py have an option **header_only**, the generated builds will contain automatically the "True/False" combination for that option [#454](https://github.com/conan-io/conan-package-tools/issues/454).
- **build_all_options_values**: It includes all possible values for the listed options [#457](https://github.com/conan-io/conan-package-tools/issues/457).

```
from cpt.packager import ConanMultiPackager
Expand Down Expand Up @@ -365,7 +367,19 @@ In case you want to integrate CPT with other tools, for example you want to have

Alternatively you can use the `CPT_SUMMARY_FILE` environment variable to set the summary file path

## Using all values for custom options
Sometimes you want to include more options to your matrix, including all possible combinations, so that, you can use **build_all_options_values**:

from cpt.packager import ConanMultiPackager


if __name__ == "__main__":
builder = ConanMultiPackager(reference="mypackage/0.1.0")
builder.add_common_builds(build_all_options_values=["mypackage:foo", "mypackage:bar"])
builder.run()

Now let's say mypackage's recipe contains the follow options: *shared*, *fPIC*, *foo* and *bar*. Both *foo* and *bar* can accept **True** or **False**.
The method add_common_builds will generate a matrix including both *foo* and *bar* with all possible combinations.

## Using Docker

Expand Down Expand Up @@ -1099,6 +1113,7 @@ Using **CONAN_CLANG_VERSIONS** env variable in Travis ci or Appveyor:
rebuild all packages.
- "all": Build all requirements.
- **test_folder**: Custom test folder consumed by Conan create, e.j .conan/test_package
- **lockfile**: Custom conan lockfile to be used, e.j. conan.lock. Default [None]
- **conanfile**: Custom conanfile consumed by Conan create. e.j. conanfile.py
- **config_url**: Conan config URL be installed before to build e.j https://github.com/bincrafters/conan-config.git
- **config_args**: Conan config arguments used when installing conan config
Expand Down Expand Up @@ -1139,12 +1154,15 @@ The current commit message can contain special messages:

## Complete ConanMultiPackager methods reference:

- **add_common_builds(shared_option_name=None, pure_c=True, dll_with_static_runtime=False)**: Generate a set of package configurations and add them to the
- **add_common_builds(shared_option_name=None, pure_c=True, dll_with_static_runtime=False, reference=None, header_only=True, build_all_options_values=None)**: Generate a set of package configurations and add them to the
list of packages that will be created.

- **shared_option_name**: If given, ConanMultiPackager will add different configurations for -o shared=True and -o shared=False.
- **pure_c**: ConanMultiPackager won't generate different builds for the **libstdc++** c++ standard library, because it is a pure C library.
- **dll_with_static_runtime**: generate also build for "MT" runtime when the library is shared.
- **reference**: Custom package reference
- **header_only**: Generate new builds following header-only options [#454](https://github.com/conan-io/conan-package-tools/issues/454)
- **build_all_options_values**: Include all values for the listed options [#457](https://github.com/conan-io/conan-package-tools/issues/457)

- **login(remote_name)**: Performs a `conan user` command in the specified remote.

Expand Down Expand Up @@ -1205,6 +1223,7 @@ This is especially useful for CI integration.
- **CONAN_ARCHS**: Architectures to build for, comma separated, e.g. "x86,x86_64"
- **CONAN_OPTIONS**: Conan build options, comma separated, e.g. "foobar:with_bar=True,foobar:with_qux=False"
- **CONAN_SHARED_OPTION_NAME**: Set `shared_option_name` by environment variable, e.g. "mypackagename:shared"
- **CONAN_BUILD_ALL_OPTIONS_VALUES**: Set `build_all_options_values` by environment variable, e.g. "mypackagename:foo,mypackagename:bar"
- **CONAN_BUILD_TYPES**: Build types to build for, comma separated, e.g. "Release,Debug"
- **CONAN_CPPSTDS**: List containing values for `compiler.cppstd`. Default None
- **CONAN_VISUAL_VERSIONS**: Visual versions, comma separated, e.g. "12,14"
Expand All @@ -1231,6 +1250,7 @@ This is especially useful for CI integration.
Set it with the bash executable path if it’s not in the PATH or you want to use a different one.
- **CONAN_PIP_USE_SUDO** Use "sudo" when invoking pip, by default it will use sudo when not using Windows and not running docker image "conanio/". "False" to deactivate.
- **CONAN_PIP_COMMAND** Run custom `pip` command when updating Conan. e.g. "/usr/bin/pip2"
- **CONAN_DOCKER_PIP_COMMAND** Run custom `pip` command when updating Conan and CPT in Docker container. e.g. "/usr/bin/pip2"
- **CONAN_DOCKER_USE_SUDO** Use "sudo" when invoking docker, by default it will use sudo when not using Windows. "False" to deactivate.
- **CONAN_ALLOW_GCC_MINORS** Declare this variable if you want to allow gcc >=5 versions with the minor (5.1, 6.3 etc).
- **CONAN_EXCLUDE_VCVARS_PRECOMMAND** For Visual Studio builds, it exclude the vcvars call to set the environment.
Expand All @@ -1246,6 +1266,7 @@ This is especially useful for CI integration.
- **CONAN_BASE_PROFILE**: Apply options, settings, etc. to this profile instead of `default`.
- **CONAN_IGNORE_SKIP_CI**: Ignore `[skip ci]` in commit message.
- **CONAN_CONANFILE**: Custom conanfile consumed by Conan create. e.j. conanfile.py
- **CONAN_LOCKFILE**: Custom conan lockfile to be used, e.j. conan.lock.
- **CPT_TEST_FOLDER**: Custom test_package path, e.j .conan/test_package
- **CONAN_FORCE_SELINUX**: Force docker to relabel file objects on the shared volumes
- **CONAN_SKIP_RECIPE_EXPORT**: If defined, the package recipe will only be exported on the first build.
Expand Down
6 changes: 4 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ environment:
- PYTHON: "C:\\Python27"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
USE_UNSUPPORTED_CONAN_WITH_PYTHON_2: "1"
- PYTHON: "C:\\Python35"
TOXENV: "py27-conan-latest"

- PYTHON: "C:\\Python37"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
USE_UNSUPPORTED_CONAN_WITH_PYTHON_2: "1"
TOXENV: "py37-conan-latest"

build: false
install:
- .ci/appveyor/install.bat
test_script:
- .ci/appveyor/test.bat

5 changes: 3 additions & 2 deletions cpt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

__version__ = '0.31.2'
NEWEST_CONAN_SUPPORTED = "1.22.300"
__version__ = '0.32.0'
NEWEST_CONAN_SUPPORTED = "1.23.000"


def get_client_version():
from conans.model.version import Version
Expand Down
Loading

0 comments on commit c010408

Please sign in to comment.