Skip to content

Commit 10b6352

Browse files
committed
use imports function, remove debug prints, update readme
1 parent c4ea8b7 commit 10b6352

File tree

3 files changed

+7
-17
lines changed

3 files changed

+7
-17
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
## Basic setup
99

10-
$ conan install . prometheus-cpp/0.7.0@steakhal/stable
10+
$ conan install . prometheus-cpp/0.7.0@steakhal/stable -o prometheus-cpp:mode=pull
1111

1212
## Project setup
1313

@@ -28,7 +28,7 @@ If you handle multiple dependencies in your project is better to add a *conanfil
2828

2929
Complete the installation of requirements for your project running:
3030

31-
conan install . -o prometheus-cpp:mode=pull
31+
conan install .
3232

3333
Project setup installs the library (and all his dependencies) and generates the files *conanbuildinfo.cmake* with all the
3434
paths and variables that you need to link with your dependencies.

conanfile.py

+4
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ def package(self):
130130
self.copy('LICENSE', dst='licenses', src=self._source_subfolder)
131131
self.copy('LICENSE.md', dst='licenses')
132132

133+
def imports(self):
134+
self.copy("*.dll", dst="bin", src="bin")
135+
self.copy("*.dylib", dst="bin", src="lib")
136+
self.copy("*.so", dst="bin", src="lib")
133137

134138
def package_info(self):
135139
if self.options.mode == 'pull':

test_package/conanfile.py

+1-15
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,7 @@ def test(self):
2525
if tools.cross_building(self.settings):
2626
self.output.warn('Cross Building: Skipping Test Package')
2727
return
28-
29-
libs = []
30-
libs.append(glob.glob(os.path.join(prometheus_path, 'bin', '*.dll')))
31-
libs.append(glob.glob(os.path.join(prometheus_path, 'lib', '*.so')))
32-
libs.append(glob.glob(os.path.join(prometheus_path, 'lib', '*.dylib')))
33-
dest_path = os.path.join(os.getcwd(), 'bin')
34-
self.output.info('Preparing to run test application:')
35-
36-
self.output.info(os.getcwd())
37-
self.output.info(os.listdir(os.getcwd()))
38-
39-
for lib in [item for sublist in libs for item in sublist]:
40-
self.output.info('Copy %s to %s' % (lib, dest_path))
41-
shutil.copy(src=lib, dst='bin')
42-
28+
4329
if self.options['prometheus-cpp'].mode == 'pull':
4430
sample_server_path = os.path.join('bin', 'sample_server')
4531
sample_server = subprocess.Popen([sample_server_path])

0 commit comments

Comments
 (0)