File tree 4 files changed +54
-4
lines changed
4 files changed +54
-4
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,9 @@ deploy-cli:
76
76
$(call print_header, "Deploying cloe-launch binary with pip...")
77
77
${MAKE} -C cli install
78
78
79
+ export-cli :
80
+ ${MAKE} -C cli conan-profile
81
+
79
82
docker-test :
80
83
$(call print_header, "Building ubuntu-18.04 Docker image...")
81
84
${MAKE} -C dist/docker ubuntu-18.04
@@ -98,7 +101,7 @@ doxygen:
98
101
mkdir -p ${BUILD_DIR} /doxygen
99
102
doxygen Doxyfile
100
103
101
- smoketest-deps : smoketest-deps-select
104
+ smoketest-deps : | export-cli smoketest-deps-select
102
105
# Call this target with WITH_VTD=1 to include VTD binding tests.
103
106
104
107
smoketest : smoketest-select
Original file line number Diff line number Diff line change 22
22
echo " install to install cloe-launch locally"
23
23
echo " editable to install cloe-launch locally in editable mode"
24
24
25
- .PHONY : install editable
26
- install :
25
+ .PHONY : install editable conan-profile
26
+ install : conan-profile
27
27
command -v ${PIP} > /dev/null 2>&1
28
28
mv pyproject.toml pyproject.toml.bak
29
29
${PIP} install ${PIP_INSTALL_ARGS} . || ( \
@@ -32,11 +32,14 @@ install:
32
32
)
33
33
mv pyproject.toml.bak pyproject.toml
34
34
35
- editable :
35
+ editable : conan-profile
36
36
command -v ${PIP} > /dev/null 2>&1
37
37
mv pyproject.toml pyproject.toml.bak
38
38
${PIP} install -e ${PIP_INSTALL_ARGS} . || ( \
39
39
mv pyproject.toml.bak pyproject.toml; \
40
40
exit 1; \
41
41
)
42
42
mv pyproject.toml.bak pyproject.toml
43
+
44
+ conan-profile :
45
+ conan export .
Original file line number Diff line number Diff line change @@ -421,6 +421,9 @@ def _read_conan_env(self) -> Environment:
421
421
self .runtime_dir / "activate_run.sh" ,
422
422
self .runtime_dir / "activate.sh" ,
423
423
]
424
+ cloe_launch_env = self .runtime_dir / "cloe_launch_env.sh"
425
+ if cloe_launch_env .exists ():
426
+ env_paths .insert (0 , cloe_launch_env )
424
427
preserve = None if not self .preserve_env else list (os .environ .keys ())
425
428
return Environment (env_paths , preserve = preserve )
426
429
Original file line number Diff line number Diff line change
1
+ from conans import ConanFile , tools
2
+ from conan .tools .env import Environment
3
+ from pathlib import Path
4
+
5
+ class Base (object ):
6
+ settings = "os" , "compiler" , "build_type" , "arch"
7
+ generators = "virtualenv" , "virtualrunenv"
8
+
9
+ def generate (self ):
10
+ if "cloe_launch_env" not in dir (self ):
11
+ return
12
+
13
+ env = Environment ()
14
+ for k , v in self .cloe_launch_env .items ():
15
+ env .define (k , str (v ))
16
+ env .vars (self ).save_script ("cloe_launch_env" )
17
+
18
+ def project_version (self , version_path ):
19
+ if version_path :
20
+ version_file = Path (self .recipe_folder ) / version_path
21
+ if version_file .exists ():
22
+ return tools .load (version_file ).strip ()
23
+ git = tools .Git (folder = self .recipe_folder )
24
+ return git .run ("describe --dirty=-dirty" )[1 :]
25
+
26
+
27
+ class CloeLaunchProfile (ConanFile ):
28
+ name = "cloe-launch-profile"
29
+ license = "Apache-2.0"
30
+ url = "https://github.com/eclipse/cloe"
31
+ description = "Provides base class for cloe-launch profiles"
32
+ user = "cloe"
33
+ channel = "develop"
34
+
35
+ def set_version (self ):
36
+ for line in tools .load ("setup.py" ).split ("\n " ):
37
+ if not line .strip ().startswith ("version=" ):
38
+ continue
39
+ self .version = line .strip ().split ("=" )[1 ].strip ('",' )
40
+ return
41
+ raise Exception ("cannot find cloe-launch version" )
You can’t perform that action at this time.
0 commit comments