Navigation Menu

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

Fix: allow arbitrary template structure #8641

Merged

Conversation

SSE4
Copy link
Contributor

@SSE4 SSE4 commented Mar 12, 2021

trying to make template according to the https://docs.conan.io/en/latest/extending/template_system/command_new.html#template-command-new
getting the error: ERROR: Template is missing a recipe file: C:\Users\SSE4\.conan\templates\command\new\cci
for the command: conan new luple/1.2 --template=cci

the structure is:

C:\Users\SSE4\.conan\templates\command                                                                                                                                                                                                                                                                                                                   C:\Users\SSE4\.conan\templates\command\new                                                                                                                                                                                                                                                                                                               C:\Users\SSE4\.conan\templates\command\new\cci                                                                                                                                                                                                                                                                                                           C:\Users\SSE4\.conan\templates\command\new\cci\{{name}}                                                                                                                                                                                                                                                                                                  C:\Users\SSE4\.conan\templates\command\new\cci\{{name}}\all                                                                                                                                                                                                                                                                                              C:\Users\SSE4\.conan\templates\command\new\cci\{{name}}\config.yml                                                                                                                                                                                                                                                                                       C:\Users\SSE4\.conan\templates\command\new\cci\{{name}}\all\conandata.yml                                                                                                                                                                                                                                                                                C:\Users\SSE4\.conan\templates\command\new\cci\{{name}}\all\conanfile.py                                                                                                                                                                                                                                                                                 C:\Users\SSE4\.conan\templates\command\new\cci\{{name}}\all\test_package                                                                                                                                                                                                                                                                                 C:\Users\SSE4\.conan\templates\command\new\cci\{{name}}\all\test_package\CMakeLists.txt                                                                                                                                                                                                                                                                  C:\Users\SSE4\.conan\templates\command\new\cci\{{name}}\all\test_package\conanfile.py                                                                                                                                                                                                                                                                    C:\Users\SSE4\.conan\templates\command\new\cci\{{name}}\all\test_package\test_package.cpp  

according to the doc it should work:

Conan will process all the files found in that folder using Jinja2 engine and the paths to those files too. Thus the following template directory (which match the conventions for conan-center-index recipes):
conan-center/{{name}}/config.yml
            /{{name}}/all/conanfile.py
            /{{name}}/all/conandata.yml
            /{{name}}/all/test_package/conanfile.py
            /{{name}}/all/test_package/CMakeLists.txt
            /{{name}}/all/test_package/main.cpp
will be translated to:
conan-center/mypackage/config.yml
            /mypackage/all/conanfile.py
            /mypackage/all/conandata.yml
            /mypackage/all/test_package/conanfile.py
            /mypackage/all/test_package/CMakeLists.txt
            /mypackage/all/test_package/main.cpp

Changelog: Fix: Allow arbitrary template structure.
Docs: omit

  • Refer to the issue that supports this Pull Request.
  • If the issue has missing info, explain the purpose/use case/pain/need that covers this Pull Request.
  • I've read the Contributing guide.
  • I've followed the PEP8 style guides for Python code.
  • I've opened another PR in the Conan docs repo to the develop branch, documenting this one.

Note: By default this PR will skip the slower tests and will use a limited set of python versions. Check here how to increase the testing level by writing some tags in the current PR body text.

Signed-off-by: SSE4 <tomskside@gmail.com>
@SSE4 SSE4 closed this Mar 17, 2021
@SSE4 SSE4 reopened this Mar 17, 2021
@memsharded memsharded added this to the 1.35 milestone Mar 18, 2021
@memsharded memsharded merged commit 2c9bbc8 into conan-io:develop Mar 18, 2021
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.

None yet

2 participants