From 31b811f6d74156368afa044965bb498e02aaedfd Mon Sep 17 00:00:00 2001 From: Gage Larsen Date: Thu, 10 Mar 2022 13:07:05 -0700 Subject: [PATCH 1/7] add verbose option for build output --- xmsconan/build_helpers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/xmsconan/build_helpers.py b/xmsconan/build_helpers.py index 1cf24ae..a93dc84 100644 --- a/xmsconan/build_helpers.py +++ b/xmsconan/build_helpers.py @@ -31,6 +31,7 @@ def get_builder(library_name): # General Options env_vars.update({ 'XMS_VERSION': xms_version, + 'VERBOSE': 1, 'PYTHON_TARGET_VERSION': python_target_version, 'RELEASE_PYTHON': release_python, 'AQUAPI_USERNAME': aquapi_username, From d2599e62ccee7733b3452924704cacba5d31fb15 Mon Sep 17 00:00:00 2001 From: Gage Larsen Date: Thu, 10 Mar 2022 13:07:21 -0700 Subject: [PATCH 2/7] set options on dependencies --- xmsconan/xms_conan_file.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xmsconan/xms_conan_file.py b/xmsconan/xms_conan_file.py index 0840560..3db487b 100644 --- a/xmsconan/xms_conan_file.py +++ b/xmsconan/xms_conan_file.py @@ -74,6 +74,12 @@ def configure(self): 'Visual Studio') self.options['boost'].wchar_t = self.options.wchar_t + + for dependency in self.xms_dependencies: + dep_name, _, _ = dependency.split('/') + self.options[dep_name].pybind = self.option.pybind + self.options[dep_name].testing = self.option.testing + self.options[dep_name].wchar_t = self.option.wchar_t def build(self): """ From 64a76dc0279c0da08e339344d1eacf2bb687dd64 Mon Sep 17 00:00:00 2001 From: Gage Larsen Date: Thu, 10 Mar 2022 17:33:41 -0700 Subject: [PATCH 3/7] fix typo in options and add extra exports --- setup.py | 2 +- xmsconan/xms_conan_file.py | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 1bc7481..0717779 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ version = __version__ setup( - python_requires='>=3.10', + python_requires='>=3.6', name='xmsconan', version=version, packages=['xmsconan'], diff --git a/xmsconan/xms_conan_file.py b/xmsconan/xms_conan_file.py index 3db487b..96194b4 100644 --- a/xmsconan/xms_conan_file.py +++ b/xmsconan/xms_conan_file.py @@ -20,6 +20,9 @@ class XmsConanFile(ConanFile): } generators = "cmake", "txt" build_requires = "cxxtest/4.4@aquaveo/stable" + xms_dependencies = [] + extra_exports = [] + extra_export_sources = [] default_options = { 'wchar_t': 'builtin', @@ -77,9 +80,9 @@ def configure(self): for dependency in self.xms_dependencies: dep_name, _, _ = dependency.split('/') - self.options[dep_name].pybind = self.option.pybind - self.options[dep_name].testing = self.option.testing - self.options[dep_name].wchar_t = self.option.wchar_t + self.options[dep_name].pybind = self.options.pybind + self.options[dep_name].testing = self.options.testing + self.options[dep_name].wchar_t = self.options.wchar_t def build(self): """ @@ -136,7 +139,7 @@ def run_cxx_tests(self, cmake): A function to run the cxx_tests. """ try: - cmake.test() + cmake.test(output_on_failure=True) except ConanException: raise finally: @@ -198,9 +201,11 @@ def export_sources(self): """ Specify sources to be exported. """ - self.output.info('----- RUNNING EXPORT_SOURCES()') self.copy('*', src=f'{self.name}', dst=f'{self.name}') self.copy('*', src='_package', dst='_package') + + for item in self.extra_export_sources: + self.copy('*', src=f'{item}', dst=f'{item}') def export(self): """ @@ -208,3 +213,6 @@ def export(self): """ self.copy('CMakeLists.txt') self.copy('LICENSE') + + for item in self.extra_exports: + self.copy(f'{item}') From a73fb58e556f1f4537c4dcf37747d2234c27f1b5 Mon Sep 17 00:00:00 2001 From: Gage Larsen Date: Thu, 10 Mar 2022 17:36:21 -0700 Subject: [PATCH 4/7] fix flake --- xmsconan/xms_conan_file.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xmsconan/xms_conan_file.py b/xmsconan/xms_conan_file.py index 96194b4..354c0d2 100644 --- a/xmsconan/xms_conan_file.py +++ b/xmsconan/xms_conan_file.py @@ -77,7 +77,7 @@ def configure(self): 'Visual Studio') self.options['boost'].wchar_t = self.options.wchar_t - + for dependency in self.xms_dependencies: dep_name, _, _ = dependency.split('/') self.options[dep_name].pybind = self.options.pybind @@ -203,7 +203,7 @@ def export_sources(self): """ self.copy('*', src=f'{self.name}', dst=f'{self.name}') self.copy('*', src='_package', dst='_package') - + for item in self.extra_export_sources: self.copy('*', src=f'{item}', dst=f'{item}') @@ -213,6 +213,6 @@ def export(self): """ self.copy('CMakeLists.txt') self.copy('LICENSE') - + for item in self.extra_exports: self.copy(f'{item}') From 5f060c78294f210d3b55304f9890bf6293e0d076 Mon Sep 17 00:00:00 2001 From: Gage Larsen Date: Fri, 11 Mar 2022 08:28:55 -0700 Subject: [PATCH 5/7] check for directories and remove verbosity --- xmsconan/build_helpers.py | 1 - xmsconan/xms_conan_file.py | 11 +++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/xmsconan/build_helpers.py b/xmsconan/build_helpers.py index a93dc84..1cf24ae 100644 --- a/xmsconan/build_helpers.py +++ b/xmsconan/build_helpers.py @@ -31,7 +31,6 @@ def get_builder(library_name): # General Options env_vars.update({ 'XMS_VERSION': xms_version, - 'VERBOSE': 1, 'PYTHON_TARGET_VERSION': python_target_version, 'RELEASE_PYTHON': release_python, 'AQUAPI_USERNAME': aquapi_username, diff --git a/xmsconan/xms_conan_file.py b/xmsconan/xms_conan_file.py index 354c0d2..68617a3 100644 --- a/xmsconan/xms_conan_file.py +++ b/xmsconan/xms_conan_file.py @@ -205,7 +205,11 @@ def export_sources(self): self.copy('*', src='_package', dst='_package') for item in self.extra_export_sources: - self.copy('*', src=f'{item}', dst=f'{item}') + if os.path.isdir(item): + self.copy('*', src=f'{item}', dst=f'{item}') + else: + self.copy(f'{item}') + def export(self): """ @@ -215,4 +219,7 @@ def export(self): self.copy('LICENSE') for item in self.extra_exports: - self.copy(f'{item}') + if os.path.isdir(item): + self.copy('*', src=f'{item}', dst=f'{item}') + else: + self.copy(f'{item}') From 66864649c91ef9c13aae4297c3ea98af59f1ab03 Mon Sep 17 00:00:00 2001 From: Gage Larsen Date: Fri, 11 Mar 2022 08:31:00 -0700 Subject: [PATCH 6/7] fix flake issues --- xmsconan/xms_conan_file.py | 1 - 1 file changed, 1 deletion(-) diff --git a/xmsconan/xms_conan_file.py b/xmsconan/xms_conan_file.py index 68617a3..b464d23 100644 --- a/xmsconan/xms_conan_file.py +++ b/xmsconan/xms_conan_file.py @@ -209,7 +209,6 @@ def export_sources(self): self.copy('*', src=f'{item}', dst=f'{item}') else: self.copy(f'{item}') - def export(self): """ From 3137acde60db3f02e35819189e30c63ce01ebfac Mon Sep 17 00:00:00 2001 From: Gage Larsen Date: Fri, 11 Mar 2022 11:50:48 -0700 Subject: [PATCH 7/7] increment version number --- xmsconan/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmsconan/__init__.py b/xmsconan/__init__.py index bbfb3e6..0a09230 100644 --- a/xmsconan/__init__.py +++ b/xmsconan/__init__.py @@ -1,4 +1,4 @@ """ Methods and Modules used to aid in xmsconan projects. """ -__version__ = '0.0.1' +__version__ = '1.0.0'