Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cura 9575 automake conan v2 #5

Open
wants to merge 565 commits into
base: cura-dev
Choose a base branch
from

Conversation

jellespijker
Copy link
Member

@jellespijker jellespijker commented Sep 8, 2022

See PR in CCI conan-io#12898

This PR and recipe is purely for use in the Ultimaker Cura workflow, and will be used until the above PR is merged into CCI

Fixes: CURA-9575
Contributes to: CURA-9574, CURA-9595, CURA-9578, CURA-9587, CURA-9571
Is depend on: CURA-9573

Copy link

@casperlamboo casperlamboo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Midway through the review I noticed that this PR is for automake.

The description of this PR states this Fixes: CURA-9595, should this be Fixes: CURA-9575 instead?

recipes/automake/all/conanfile.py Show resolved Hide resolved
recipes/automake/all/conanfile.py Show resolved Hide resolved
@jellespijker
Copy link
Member Author

jellespijker commented Sep 12, 2022

Midway through the review I noticed that this PR is for automake.

The description of this PR states this Fixes: CURA-9595, should this be Fixes: CURA-9575 instead?

Copy paste error I think.

Please see: https://github.com/conan-io/conan-center-index/tree/master/docs%2Fpackage_templates%2Fautotools_package
On which this recipe is based

Also so previous review comment made on an earlier PR against CCI. To get a sense of their style and requirements.
conan-io#12834

Comment on lines +35 to +42
try:
del self.settings.compiler.libcxx # for plain C projects only
except ValueError:
pass
try:
del self.settings.compiler.cppstd # for plain C projects only
except ValueError:
pass
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
try:
del self.settings.compiler.libcxx # for plain C projects only
except ValueError:
pass
try:
del self.settings.compiler.cppstd # for plain C projects only
except ValueError:
pass
try:
del self.settings.compiler.libcxx # for plain C projects only
del self.settings.compiler.cppstd # for plain C projects only
except ValueError:
pass

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then the second won't be deleted if the first fails. That would mess with the hash for the package.

Comment on lines +52 to +63
try:
del self.info.settings.arch
except ValueError:
pass
try:
del self.info.settings.compiler
except ValueError:
pass
try:
del self.info.settings.build_type
except ValueError:
pass
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
try:
del self.info.settings.arch
except ValueError:
pass
try:
del self.info.settings.compiler
except ValueError:
pass
try:
del self.info.settings.build_type
except ValueError:
pass
try:
del self.info.settings.arch
del self.info.settings.compiler
del self.info.settings.build_type
except ValueError:
pass

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above

import os
import shutil

required_conan_version = ">=1.45.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also bump to 1.51.x for consistency?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically this recipe could be used with an older Conan version, in reality it won't. Because there is such a tight coupling. I will update it. But I have a suspicion that the versions between recipe and test_package will start to drift when ever the recipe is updated again for new functionality

@@ -0,0 +1,90 @@
from conan import ConanFile
from conans import AutoToolsBuildEnvironment, tools
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So all the changes above where for the (pre)upgrade to v2. But this file seems to be written in the old style (like what it was before).

References to AutoToolsBuildEnvironment instead of the other Auto- things, etc. even the same 'DONT COPY' comment for 'extra.m4'.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hence the test_v1_package folder. Which is to ensure that Conan V1 isn't broken for other people

])

if is_msvc(self):
build = "{}-{}-{}".format(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the mix of .format and string interpolation. This code is really clear.

if not tools.cross_building(self):
self.run(os.path.join(".", "script_test"), run_environment=True)
if self._settings_build.os == "Windows" and not self.conf.get("tools.microsoft.bash:path", default=False, check_type=bool):
return # autoconf needs a bash if there isn't a bash no need to build

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this case is a configuration issue and not an issue with the recipe but I still think it would be good to output something here. It might save someone some searching in the future. 

Suggested change
return # autoconf needs a bash if there isn't a bash no need to build
self.output.warn("You must have a bash path configured to run this test")
return # autoconf needs a bash if there isn't a bash no need to build

if not tools.cross_building(self):
self.run(os.path.join(".", "script_test"), run_environment=True)
if self._settings_build.os == "Windows" and not self.conf.get("tools.microsoft.bash:path", default=False, check_type=bool):
return # autoconf needs a bash if there isn't a bash no need to build

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this case is a configuration issue and not an issue with the recipe but I still think it would be good to output something here. It might save someone some searching in the future. 

Suggested change
return # autoconf needs a bash if there isn't a bash no need to build
self.output.warn("You must have bash configured to run this test")
return # autoconf needs a bash if there isn't a bash no need to build

from conan.tools.layout import basic_layout
from conan.tools.microsoft import unix_path

required_conan_version = ">=1.50.0"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
required_conan_version = ">=1.50.0"
required_conan_version = ">=1.51.3"

I saw your comment about the test_package and the package versions drifting apart over time anyway. Just thought I would post this anyway in case.

toge and others added 26 commits October 5, 2022 17:25
Generated and committed by [Conan Center Bot](https://github.com/qchateau/conan-center-bot)
Find more updatable recipes in the [GitHub Pages](https://qchateau.github.io/conan-center-bot/)

Co-authored-by: Quentin Chateau via Conan Center Bot <[email protected]>
* Update flatbuffers to 2.0.8

* Fix version variables

* Change CMake file names to lowercase

* Add CMake build requirement

Co-authored-by: chausner <[email protected]>
Generated and committed by [Conan Center Bot](https://github.com/qchateau/conan-center-bot)
Find more updatable recipes in the [GitHub Pages](https://qchateau.github.io/conan-center-bot/)

Co-authored-by: Quentin Chateau via Conan Center Bot <[email protected]>
* [pixman] apply patch for clang-16

* [pixman] modernize

* [pixman] use meson toolchain

* [pixman] update test package

* [pixman] fix windows build

* [pixman] patch meson build for 0.38.4

* [pixman] document patch sources

* [pixman] use virtual run environment in test package

* [pixman] some modernization fixes

* [pixman] add v1 test package

* [pixman] update test packages

* [pixman] conan targets disabled in test package

* Revert "[pixman] conan targets disabled in test package"

This reverts commit 8c7576c.

* [pixman] use multi-config generator in v1 package

* Revert "[pixman] use multi-config generator in v1 package"

This reverts commit e49dcac.

* Revert "Revert "[pixman] use multi-config generator in v1 package""

This reverts commit acdf1ab.

* [pixman] fix unformatted python string
* libmodbus: add version 3.1.8 (TODO: check if patches are still needed)

* Add new MVSC patch (remove my_CFLAGS that contains only warning some of which are not valid)

* Disable --without-documentation flag for 3.1.8 onwards

* Update MSVC patch for 3.1.8

* rename patches for consistency
Generated and committed by [Conan Center Bot](https://github.com/qchateau/conan-center-bot)
Find more updatable recipes in the [GitHub Pages](https://qchateau.github.io/conan-center-bot/)

Co-authored-by: Quentin Chateau via Conan Center Bot <[email protected]>
* Add KB-H072 and KB-H073 to docs

Signed-off-by: Uilian Ries <[email protected]>

* Update docs/error_knowledge_base.md

Co-authored-by: Jordan Williams <[email protected]>

* Update docs/error_knowledge_base.md

Co-authored-by: Jordan Williams <[email protected]>

* Update docs/error_knowledge_base.md

Co-authored-by: Chris Mc <[email protected]>

* Update docs/error_knowledge_base.md

Co-authored-by: Jordan Williams <[email protected]>

Signed-off-by: Uilian Ries <[email protected]>
Co-authored-by: Jordan Williams <[email protected]>
Co-authored-by: Chris Mc <[email protected]>
…lates

* Apply python black

Signed-off-by: Uilian Ries <[email protected]>

* Update to 120 chars

Signed-off-by: Uilian Ries <[email protected]>

* Update to 120 chars

Signed-off-by: Uilian Ries <[email protected]>

Signed-off-by: Uilian Ries <[email protected]>
…to cmake

* add version 1.4.2

* add with_mimalloc option

* add validate method

* add cmake as build requrements

* use minmalloc from conan

* use minmalloc from conan

* use tbb from conan

* don't use cmake as requirement for old mold

* hotfix

* add cmake_find_package generator

* add CMakeDeps

* don't use old conans import

* Update recipes/mold/1.4.x/conanfile.py

Co-authored-by: Chris Mc <[email protected]>

* package licenses

* make artifacts match settings

* correct package method for mold 1.3.1

* package mold binary differently for gcc and clang

* exclude windows builds

* delete unneeded CMakeLists

* Apply suggestions from code review

Co-authored-by: Uilian Ries <[email protected]>

* import VirtualBuildEnv

* add a newline

* Apply suggestions from code review

Co-authored-by: Uilian Ries <[email protected]>

* delete package id also for 1.3.1 version

* use build_requirements instead of requirements in test

* Apply suggestions from code review

Co-authored-by: Uilian Ries <[email protected]>

* Update recipes/mold/1.4.x/test_package/conanfile.py

Co-authored-by: Chris Mc <[email protected]>

* make mold test recipe work again

* add version 1.5.1

* rename folder

* add test_v1_package

Co-authored-by: Chris Mc <[email protected]>
Co-authored-by: Uilian Ries <[email protected]>
* docs: Document working locally + Conan 2.0 commands

I also snuck in some format and link fixes

* Apply suggestions from code review

Co-authored-by: Uilian Ries <[email protected]>

* Update docs/README.md

* Update docs/developing_recipes_locally.md

* Apply suggestions from code review

Co-authored-by: Jordan Williams <[email protected]>

* Update CONTRIBUTING.md

Co-authored-by: Uilian Ries <[email protected]>

* merge linters into dev locally

* links and touch ups

* fix links

* Apply suggestions from code review

Co-authored-by: Jordan Williams <[email protected]>

Co-authored-by: Uilian Ries <[email protected]>
Co-authored-by: Jordan Williams <[email protected]>
* Modernize opengv recipe

* Bump pybind11 version

* Fix license

* Modernize test package

* Copy license file to the correct folder

* Disable clang-12 builds since they fail on Conan CI

* Add test package for conan V1.x

* Include and use the VirtualRunEnv generator on the Conan v2 test package

* Extract souurces into src subfolder and be explicit about the destination on get

* Ditch collect_libs in favor of the explicit list

* Do not import collect_libs, we're not longer using it

* Remove duplicated, unused file

* Replace replace_in_file calls with patches

* Remove unused import

* Update minimum conan version

Co-authored-by: Chris Mc <[email protected]>

* Include patch descriptions

Co-authored-by: Chris Mc <[email protected]>

* Fix indentation

Co-authored-by: Chris Mc <[email protected]>
* - [glib] use MesonToolchain

Signed-off-by: SSE4 <[email protected]>

* Update conanfile.py

* - tempory workaround to get rid of bad framework paths...

Signed-off-by: SSE4 <[email protected]>

* - set up an Apple SDK path

Signed-off-by: SSE4 <[email protected]>

* - configure SDK only for Apple

Signed-off-by: SSE4 <[email protected]>

* - fix signature

Signed-off-by: SSE4 <[email protected]>

* - apply_conandata_patches

Signed-off-by: SSE4 <[email protected]>

* - remove *.pdb from bin

Signed-off-by: SSE4 <[email protected]>

* - base_path isn't needed

Signed-off-by: SSE4 <[email protected]>

* - not needed (aready patched above)

Signed-off-by: SSE4 <[email protected]>

* - adjust imports for 2.0 compat

Signed-off-by: SSE4 <[email protected]>

* - resolve duplicated imports

Signed-off-by: SSE4 <[email protected]>

* - fix linter

Signed-off-by: SSE4 <[email protected]>

* - remove libexec (contains only .desktop files)

Signed-off-by: SSE4 <[email protected]>

* - remove unneeded lines from rebase

Signed-off-by: SSE4 <[email protected]>

* Update recipes/glib/all/conanfile.py

Co-authored-by: Uilian Ries <[email protected]>

* Update recipes/glib/all/conanfile.py

Co-authored-by: Uilian Ries <[email protected]>

* Update recipes/glib/all/conanfile.py

Co-authored-by: Uilian Ries <[email protected]>

* Update recipes/glib/all/conanfile.py

* Update recipes/glib/all/conanfile.py

* Update recipes/glib/all/conanfile.py

* Update recipes/glib/all/conanfile.py

* Update recipes/glib/all/conanfile.py

* Update recipes/glib/all/conanfile.py

* Update recipes/glib/all/conanfile.py

* Update recipes/glib/all/conanfile.py

* Update recipes/glib/all/conanfile.py

* Update recipes/glib/all/conanfile.py

Co-authored-by: Javier G. Sogo <[email protected]>

* Update recipes/glib/all/conanfile.py

* Update recipes/glib/all/conanfile.py

* Update recipes/glib/all/conanfile.py

* Update recipes/glib/all/conanfile.py

* Update recipes/glib/all/conanfile.py

* Update recipes/glib/all/conanfile.py

* Update recipes/glib/all/conanfile.py

* Update conanfile.py

* Update conandata.yml

* Update recipes/glib/all/conanfile.py

Co-authored-by: Uilian Ries <[email protected]>

* Update recipes/glib/all/conanfile.py

Co-authored-by: Uilian Ries <[email protected]>

* Update recipes/glib/all/conanfile.py

Co-authored-by: Uilian Ries <[email protected]>

* Update recipes/glib/all/conanfile.py

Co-authored-by: Chris Mc <[email protected]>

* Update recipes/glib/all/conanfile.py

Co-authored-by: Chris Mc <[email protected]>

Signed-off-by: SSE4 <[email protected]>
Co-authored-by: Uilian Ries <[email protected]>
Co-authored-by: Javier G. Sogo <[email protected]>
Co-authored-by: Chris Mc <[email protected]>
* protopuf: add version

* update compilers minimum version

* update gcc minimum version

* update clang minimum version

* downgrade required_conan_version

Co-authored-by: Uilian Ries <[email protected]>

* remove unused functions

Co-authored-by: Uilian Ries <[email protected]>

* drop support of apple-clang

* include array header

* update conan version to 1.50.0

Co-authored-by: Jordan Williams <[email protected]>

* fix error message

Co-authored-by: Jordan Williams <[email protected]>

* remove CMakeUserPresets.json

Co-authored-by: Uilian Ries <[email protected]>
Co-authored-by: Jordan Williams <[email protected]>
* [conan 2] Migrate box2d 2.4.x recipe

* remove base path for patch

* fix shared builds

* fix patch

* linter

* delete pdb files

* Update recipes/box2d/2.4.x/conanfile.py

Co-authored-by: Uilian Ries <[email protected]>

* Update recipes/box2d/2.4.x/conanfile.py

Co-authored-by: Uilian Ries <[email protected]>

* Update recipes/box2d/2.4.x/conanfile.py

Co-authored-by: Uilian Ries <[email protected]>

* Update recipes/box2d/2.4.x/conanfile.py

Co-authored-by: Uilian Ries <[email protected]>

* Update recipes/box2d/2.4.x/conanfile.py

Co-authored-by: Uilian Ries <[email protected]>

* Update recipes/box2d/2.4.x/conanfile.py

Co-authored-by: Uilian Ries <[email protected]>

* Update recipes/box2d/2.4.x/test_package/conanfile.py

Co-authored-by: Uilian Ries <[email protected]>

* Update recipes/box2d/2.4.x/conanfile.py

Co-authored-by: Uilian Ries <[email protected]>

* review

Co-authored-by: Uilian Ries <[email protected]>
* fmtlog: add recipe

* add "export all symbols"

* fix license name

Co-authored-by: Uilian Ries <[email protected]>

* remove comment of template

Co-authored-by: Uilian Ries <[email protected]>

* use `self.info.settings`

Co-authored-by: Uilian Ries <[email protected]>

* use `self.info.settings` part 2

Co-authored-by: Uilian Ries <[email protected]>

* use self.settings instead of self.info.settings (workaround)

Co-authored-by: Uilian Ries <[email protected]>

* remove VirtualBuildENv

Co-authored-by: Uilian Ries <[email protected]>

* remove VirtualBuildEnv(2)

Co-authored-by: Uilian Ries <[email protected]>

* first return if header_only

Co-authored-by: Uilian Ries <[email protected]>

Co-authored-by: Uilian Ries <[email protected]>
…ct jpeg provider instead of binary switch

* add transitive libjpeg dependency switching between libjpeg and libjpeg-turbo as used in other projects like opencv

* reorder parameters to fit layout of other reciepes
toge and others added 30 commits October 21, 2022 12:04
* aws-crt-cpp: add version 0.18.8 and support conan v2

* modify mqtt, event-stream version
* libaec - upgrade for conan v2

* Fix licence copy

* Fix test_v1_package - use common file

* Fix static/shared a better way

* Update recipes/libaec/all/conanfile.py

Co-authored-by: Uilian Ries <[email protected]>

* Update recipes/libaec/all/conanfile.py

Co-authored-by: Uilian Ries <[email protected]>

Co-authored-by: Uilian Ries <[email protected]>
Generated and committed by [Conan Center Bot](https://github.com/qchateau/conan-center-bot)
Find more updatable recipes in the [GitHub Pages](https://qchateau.github.io/conan-center-bot/)

Co-authored-by: Quentin Chateau via Conan Center Bot <[email protected]>
* improve support for conan 2.x client

* put ndk in bin folder instead of root folder

* move update of bindirs after 2 profiles protection

* use relative paths in bindirs

* add a comment about sysroot

* define tools.build:sysroot

* cleanup
* Add version 0.6.24

* Update to Conan 2.0

* Use compile wrappers for msvc env

* Use direct msvc tool names

* Replaces slashes

* Do not autoreconfigure (fails on Windows)

* Use tool requires

* Set pkg_config_name

* Convert DESTDIR to unix path

* Handle msvc and Visual Studio compilers

Co-authored-by: Jordan Williams <[email protected]>

Co-authored-by: Jordan Williams <[email protected]>
… fix for conan v2 client

* do not require ninja if user set another meson backend

* fix for conan v2 client

* bump ninja

Co-authored-by: Jordan Williams <[email protected]>

Co-authored-by: Jordan Williams <[email protected]>
* improve autotools template

- handle windows as build machine
- handle `tools.gnu:pkg_config` config
- handle msvc
- fix install_name of shared libs on macOS
- call VirtualBuildEnv & VirtualRunEnv first in generate to avoid side effects

* typo
* xkbcommon: Use PkgConfigDeps build context for wayland

* xkbcommon: finer grain requirements

* Place build context pkg-config files in a separate directory

* Move comment to a better spot

* Fix Apple shared install name and pkg-config conf

Co-authored-by: ericLemanissier <[email protected]>
- handle self.info in validate()
- transitive headers of direct dependencies
- remove build_requirements
* pcre2: bump zlib

* no pylint skip for pcre2's test package
* conan v2 support

* cast to str for cache_variables
* sophus: add version 22.10

* Removed pylint skip-file to fix CI
* conan v2 support

* bump cpuinfo
* conan v2 support

* declarations for gcc & clang only
* [libcurl/xxx] Conan v2 migration

* Use VirtualRunEnv

* Bump wolfssl and libnghttp2

* Fix linter issues

* Use cmake_layout conditionaly

* Add test_type and tested_reference_str

* Fix test_package

* Add basic_layout

* Delete compiler in package_id

* Fix basic_layout

* Update cacert.pem sha256

* Use old syntax for bin path

* Revert "Use old syntax for bin path"

This reverts commit 3d5aec8.

* Use old syntax for test_v1_package bin path

* Remove conans.tools.get_env

* Use export_conandata_patches

* Update recipes/libcurl/all/conanfile.py

Co-authored-by: Uilian Ries <[email protected]>

* Use info.options/settings

* Apply suggestions from code review

Co-authored-by: Uilian Ries <[email protected]>
Co-authored-by: Jordan Williams <[email protected]>

* Fix indentation

* Add pkgconf conditionnaly

Co-authored-by: Uilian Ries <[email protected]>

* Fix if condition

Co-authored-by: Uilian Ries <[email protected]>
Co-authored-by: Jordan Williams <[email protected]>
* orcania: add orcania/2.3.1 recipe

* orcania: use .variables attribute instead

* Create Orcania::Orcania(-static) targets

* Prepare for next orcania release that will ship CMake config files

* fix name of Orcania config

* No m

* fix typo

* Fix conan v1 support

* Fix target for conan v1

* no orcania in topics

* Fixes for yder

* Address feedback

* Update recipes/orcania/all/conanfile.py

* Apply suggestions from code review

* Think conan 2.0

Co-authored-by: Uilian Ries <[email protected]>

* orcania: fix mingw@Linux build

Co-authored-by: Uilian Ries <[email protected]>
….txt

* Simplify test_v1_package cmake

Signed-off-by: Uilian Ries <[email protected]>

* Update docs/package_templates/cmake_package/all/test_v1_package/CMakeLists.txt

Signed-off-by: Uilian Ries <[email protected]>
Generated and committed by [Conan Center Bot](https://github.com/qchateau/conan-center-bot)
Find more updatable recipes in the [GitHub Pages](https://qchateau.github.io/conan-center-bot/)

Co-authored-by: Quentin Chateau via Conan Center Bot <[email protected]>
Generated and committed by [Conan Center Bot](https://github.com/qchateau/conan-center-bot)
Find more updatable recipes in the [GitHub Pages](https://qchateau.github.io/conan-center-bot/)

Co-authored-by: Quentin Chateau via Conan Center Bot <[email protected]>
* asio-grpc: Add 2.2.0

* asio-grpc: Revert to required_conan_version 1.50.0
* restbed: add restbed/4.8 recipe

* restbed: add old-school test package

* restbed: allow static Windows build + address feedback

* restbed: require at least gcc 5

* restbed: fix conan v2 warning

* restbed: use self.info in validate

* restbed: set CMAKE_CXX_STANDARD if not already set

* Apply suggestions from code review

* Add 'm' tot system libraries

* Update recipes/restbed/all/conanfile.py

Co-authored-by: Uilian Ries <[email protected]>

* Address feedback

* Address feedback

* restbed: expand minimum compiler conformance testing

* Use LicenseRef- prefix for license file

Co-authored-by: Uilian Ries <[email protected]>
Generated and committed by [Conan Center Bot](https://github.com/qchateau/conan-center-bot)
Find more updatable recipes in the [GitHub Pages](https://qchateau.github.io/conan-center-bot/)

Co-authored-by: Quentin Chateau via Conan Center Bot <[email protected]>
As described in conan-io#13490

Added a fixme note to the user_info entries, I also kept
these conf_info, Such that downstream projects which relied
on the `user_info` can migrate to `conf_info`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.