Moved handling of the sources to the generate function

When running `conan source .` on ubuntu the `.git` folder
was removed, happens with cona 1.47 ... 1.49
This seems to be a bug in Conan, I will try to reproduce
it and create an issue in their repo.

Contributes to CURA-9365
This commit is contained in:
j.spijker@ultimaker.com 2022-06-13 17:03:41 +02:00 committed by Jelle Spijker
parent 3a8a04669b
commit 9ec39a9c7e

View file

@ -100,7 +100,7 @@ class CuraConan(ConanFile):
for req in self.conan_data[self.version]["conan"].values(): for req in self.conan_data[self.version]["conan"].values():
self.requires(req) self.requires(req)
def source(self): def generate(self):
for source in self.conan_data[self.version]["sources"].values(): for source in self.conan_data[self.version]["sources"].values():
src_path = Path(self.source_folder, source["root"], source["src"]) src_path = Path(self.source_folder, source["root"], source["src"])
if not src_path.exists(): if not src_path.exists():
@ -120,7 +120,6 @@ class CuraConan(ConanFile):
else: else:
shutil.copytree(src_path, dst_root_path) shutil.copytree(src_path, dst_root_path)
def generate(self):
with open(Path(self.source_folder, "cura", "CuraVersion.py.jinja"), "r") as f: with open(Path(self.source_folder, "cura", "CuraVersion.py.jinja"), "r") as f:
cura_version_py = Template(f.read()) cura_version_py = Template(f.read())