From 5770dfc6397e38342f64fb993c52e0b92d3f8b6d Mon Sep 17 00:00:00 2001 From: Benoit LELANDAIS Date: Fri, 9 Aug 2024 08:30:37 +0200 Subject: [PATCH] Fix linter errors --- meshing_supersede/packages/cgal/package.py | 3 ++- .../packages/opencascade/package.py | 21 ++++++++----------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/meshing_supersede/packages/cgal/package.py b/meshing_supersede/packages/cgal/package.py index edb7029..915b332 100644 --- a/meshing_supersede/packages/cgal/package.py +++ b/meshing_supersede/packages/cgal/package.py @@ -104,7 +104,8 @@ def cmake_args(self): # Installation instructions: # https://doc.cgal.org/latest/Manual/installation.html spec = self.spec - def variant_bool(feature): str(feature in spec) + def variant_bool(feature): + str(feature in spec) cmake_args = [] cmake_args.append("-DBUILD_SHARED_LIBS:BOOL=%s" % variant_bool("+shared")) diff --git a/meshing_supersede/packages/opencascade/package.py b/meshing_supersede/packages/opencascade/package.py index 876b6c2..6c18b85 100755 --- a/meshing_supersede/packages/opencascade/package.py +++ b/meshing_supersede/packages/opencascade/package.py @@ -15,11 +15,11 @@ class Opencascade(CMakePackage): ############################################## -# WARNING this supersedes the upstream recipe +# WARNING this supersedes the upstream recipe ############################################## homepage = "https://www.opencascade.com" - url = "https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/V7_1_0;sf=tgz" + url = "https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/V7_1_0;sf=tgz" # version('7.4.0', extension='tar.gz', # sha256='1eace85115ea178f268e9d803ced994b66b72455b5484074b6ad7f643261f0a0') @@ -38,7 +38,7 @@ def url_for_version(self, version): # modifications for internal use patch('opencascade-7.1.0_a.patch', when='@7.1.0') - + variant('tbb', default=False, description='Build with Intel Threading Building Blocks') variant('vtk', default=False, @@ -60,14 +60,13 @@ def url_for_version(self, version): variant('draw', default=False, description='Sets BUILD_MODULE_Draw') variant('foundationclasses', default=False, - description='Sets BUILD_MODULE_FoundationClasses (probably always ON)' ) + description='Sets BUILD_MODULE_FoundationClasses (probably always ON)') variant('modelingalgorithm', default=False, description='Sets BUILD_MODULE_ModelingAlgorithm') variant('modelingdata', default=False, description='Sets BUILD_MODULE_ModelingData') variant('visualization', default=False, description='Sets BUILD_MODULE_Visualization') - depends_on('intel-tbb', when='+tbb') depends_on('vtk', when='+vtk') @@ -76,7 +75,6 @@ def url_for_version(self, version): depends_on('gl2ps', when='@7.1.0+gl2ps') depends_on('doxygen', when='+documentation') - depends_on('freetype') depends_on('tcl') @@ -87,11 +85,11 @@ def url_for_version(self, version): depends_on('gl') - # those two libraries are always used at link phase, but it could be a - # remnant of the optionnal gl2ps module. We might be able to remove + # those two libraries are always used at link phase, but it could be a + # remnant of the optionnal gl2ps module. We might be able to remove # those dependencies in a future release of OCC. - depends_on('libxmu', type=('build','link')) - depends_on('libxi', type=('build','link')) + depends_on('libxmu', type=('build', 'link')) + depends_on('libxi', type=('build', 'link')) def cmake_args(self): args = [] @@ -131,7 +129,6 @@ def cmake_args(self): else: args.append('-DUSE_GL2PS=OFF') - if '+documentation' in self.spec: args.append('-DBUILD_DOC_Overview=ON') else: @@ -151,7 +148,7 @@ def cmake_args(self): args.append('-DBUILD_MODULE_Draw=ON') else: args.append('-DBUILD_MODULE_Draw=OFF') - + if '+foundationclasses' in self.spec: args.append('-DBUILD_MODULE_FoundationClasses=ON') else: