Skip to content

Commit 32b2bba

Browse files
committed
cli: Fix conanfile.py referring to missing setup.py
1 parent 6c85cc5 commit 32b2bba

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

cli/conanfile.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
from pathlib import Path
55

6+
import toml
67
from conan import ConanFile
78
from conan.tools import files, scm, env
89

@@ -48,9 +49,5 @@ class CloeLaunchProfile(ConanFile):
4849
channel = "develop"
4950

5051
def set_version(self):
51-
for line in files.load(self, "setup.py").split("\n"):
52-
if not line.strip().startswith("version="):
53-
continue
54-
self.version = line.strip().split("=")[1].strip('",')
55-
return
56-
raise Exception("cannot find cloe-launch version")
52+
pyproject = toml.loads(files.load(self, "pyproject.toml"))
53+
self.version = pyproject["project"]["version"]

0 commit comments

Comments
 (0)