conan: export_sources cannot cope with "../"
The following project structure:
– cpp/ – cpp/file.cpp – include/ – include/file.h – projects/ – projects/conanfile.py
In conanfile.py:
Example 1:
exports_sources = "../cpp/*", "../include/*"
Example 2:
exports_sources = "../*.foo", "cpp/*", "include/*"
After calling conan export user
Result of example 1:
nothing but the conanfile was exported
Result of example 2: cpp/file.cpp & include/file.h + conanfile were exported
It seems that conan interpret ../ ,temporary changes to that folder and reads the rest of the relative paths from there.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 15 (11 by maintainers)
Hi @coffeeaddict19
Referencing parent directories with
exports_sourcesattribute isn’t recommended in 1.X either, and theexport_source()method was introduced to be able to better handle these cases. That will work in 2.0 too.