@@ -223,17 +223,16 @@ def compile(install_cmd: Optional[list] = None, ncores: int = 1, cwd: Optional[s
223223GMSH_DIR = os .path .join (WORK_DIR , 'gmsh' )
224224GMSH_URL = ('https://gmsh.info/src/' , r'gmsh-(\d+\.\d+\.\d+)-source' )
225225
226- # Gitlab "python-gmsh" access
227- LIB_GITLAB = 'gitlab.iag.uni-stuttgart.de '
228- # LIB_PROJECT = 'libs/python-gmsh '
229- LIB_PROJECT = '797 '
230-
226+ # Github "python-gmsh" access
227+ LIB_GITHUB = 'github.com '
228+ LIB_OWNER = 'hopr-framework '
229+ LIB_PROJECT = 'python-gmsh '
230+ LIB_BRANCH = 'main'
231231
232232# Determine the number of available cores and leave 2 for other tasks
233233total_cores = multiprocessing .cpu_count ()
234234build_cores = max (total_cores - 2 , 1 )
235235
236-
237236# ------------------------------------------------------------------------
238237# Version checks
239238# ------------------------------------------------------------------------
@@ -754,46 +753,14 @@ def build_fontconfig():
754753def build_fltk ():
755754 print_header ('BUILDING FLTK' )
756755
757- # Add system libjpeg-turbo-devel to PATH
758- # lfs = 'yes'
759- # lib = f'libjpeg-turbo-devel-1.2.90-8.el7.{arch}'
760- # subprocess.run([f'curl https://{LIB_GITLAB}/api/v4/projects/{LIB_PROJECT}/repository/files/{lib}.tar.gz/raw?lfs={lfs} --output {lib}.tar.gz'], # noqa: E501
761- # check=True,
762- # cwd=BUILD_DIR,
763- # shell=True)
764- # extract(os.path.join(BUILD_DIR, f'{lib}.tar.gz'), BUILD_DIR)
765- #
766- # # Move files into common directory
767- # shutil.copytree(os.path.join(BUILD_DIR, lib, 'usr', 'include/') , '/io/build/include' , dirs_exist_ok=True)
768- #
769- # # Add system libpng-devel to PATH
770- # lib = f'libpng-devel-1.5.13-8.el7.{arch}'
771- # subprocess.run([f'curl https://{LIB_GITLAB}/api/v4/projects/{LIB_PROJECT}/repository/files/{lib}.tar.gz/raw?lfs={lfs} --output {lib}.tar.gz'], # noqa: E501
772- # check=True,
773- # cwd=BUILD_DIR,
774- # shell=True)
775- # extract(os.path.join(BUILD_DIR, f'{lib}.tar.gz'), BUILD_DIR)
776- #
777- # # Move files into common directory
778- # shutil.copytree(os.path.join(BUILD_DIR, lib, 'usr', 'include/') , '/io/build/include' , dirs_exist_ok=True)
779- #
780- # os.environ['CPPFLAGS'] = '-I{}'.format( os.path.join(BUILD_DIR, 'include'))
781- # subprocess.check_call(['yum', 'install', '-y', 'libjpeg-turbo-devel', 'libpng-devel'])
782-
783756 fltk_src_dir = os .path .join (BUILD_DIR , f'fltk-{ FLTK_VERSION } ' )
784757 if os .path .exists (fltk_src_dir ):
785758 shutil .rmtree (fltk_src_dir )
786759
787- # url = f'https://www.fltk.org/pub/fltk/{FLTK_VERSION}/fltk-{FLTK_VERSION}-source.tar.gz'
788760 url = f'https://github.com/fltk/fltk/releases/download/release-{ FLTK_VERSION } /fltk-{ FLTK_VERSION } -source.tar.gz'
789- # url = 'https://www.fltk.org/pub/fltk/snapshots/fltk-1.4.x-20241011-013e939c.tar.gz'
790761 file = download (url , BUILD_DIR )
791762 extract (file , BUILD_DIR )
792763
793- # if os.path.isdir(f'{BUILD_DIR}/fltk-1.4.0'):
794- # shutil.rmtree(f'{BUILD_DIR}/fltk-1.4.0')
795- # subprocess.run(['mv', f'{BUILD_DIR}/fltk-1.4.x-20241011-013e939c', f'{BUILD_DIR}/fltk-1.4.0'], check=True)
796-
797764 conf_cmd = [
798765 './configure' ,
799766 '--prefix={}' .format (FLTK_DIR ),
@@ -1113,12 +1080,14 @@ def build_gmsh() -> None:
11131080
11141081 # Add system libGLU to PATH
11151082 lfs = 'yes'
1083+ branch = 'master'
11161084 lib = f'mesa-libGLU-9.0.0-4.el7.{ arch } '
1117- subprocess .run ([f'curl https://{ LIB_GITLAB } /api/v4/projects/{ LIB_PROJECT } /repository/files/{ lib } .tar.gz/raw?lfs={ lfs } --output { lib } .tar.gz' ], # noqa: E501
1085+ tar = f'{ lib } .tar.gz'
1086+ subprocess .run ([f'curl -L https://{ LIB_GITHUB } /{ LIB_OWNER } /{ LIB_PROJECT } /raw/refs/heads/{ LIB_BRANCH } /{ tar } ?download\= --output { tar } ' ], # noqa: E501
11181087 check = True ,
11191088 cwd = BUILD_DIR ,
11201089 shell = True )
1121- extract (os .path .join (BUILD_DIR , f'{ lib } . tar.gz ' ), BUILD_DIR )
1090+ extract (os .path .join (BUILD_DIR , f'{ tar } ' ), BUILD_DIR )
11221091 os .environ ['PKG_CONFIG_PATH' ] = '{}' .format ( os .path .join (BUILD_DIR , 'lib64' , 'pkgconfig' ))
11231092 os .environ ['CMAKE_PREFIX_PATH' ] = '{}' .format ( os .path .join (BUILD_DIR ))
11241093 os .environ ['CMAKE_LIBRARY_PATH' ] = '{}' .format ( os .path .join (BUILD_DIR , 'lib64' ))
@@ -1132,11 +1101,12 @@ def build_gmsh() -> None:
11321101 shutil .copytree (os .path .join (BUILD_DIR , lib , 'usr' , 'lib64/' ) , os .path .join (WORK_DIR , 'build' , 'lib64' ) , dirs_exist_ok = True )
11331102
11341103 lib = f'mesa-libGLU-devel-9.0.0-4.el7.{ arch } '
1135- subprocess .run ([f'curl https://{ LIB_GITLAB } /api/v4/projects/{ LIB_PROJECT } /repository/files/{ lib } .tar.gz/raw?lfs={ lfs } --output { lib } .tar.gz' ], # noqa: E501
1104+ tar = f'{ lib } .tar.gz'
1105+ subprocess .run ([f'curl -L https://{ LIB_GITHUB } /{ LIB_OWNER } /{ LIB_PROJECT } /raw/refs/heads/{ LIB_BRANCH } /{ tar } ?download\= --output { tar } ' ], # noqa: E501
11361106 check = True ,
11371107 cwd = BUILD_DIR ,
11381108 shell = True )
1139- extract (os .path .join (BUILD_DIR , f'{ lib } . tar.gz ' ), BUILD_DIR )
1109+ extract (os .path .join (BUILD_DIR , f'{ tar } ' ), BUILD_DIR )
11401110
11411111 # Move files into common directory
11421112 shutil .copytree (os .path .join (BUILD_DIR , lib , 'usr' , 'lib64/' ) , os .path .join (WORK_DIR , 'build' , 'lib64' ) , dirs_exist_ok = True , symlinks = True ) # noqa: E501
@@ -1373,7 +1343,7 @@ def package() -> None:
13731343 dependencies = [] # Add any required dependencies
13741344
13751345 [project.urls]
1376- homepage = 'https://gitlab.iag.uni-stuttgart.de/libs /python-gmsh'
1346+ homepage = 'https://github.com/hopr-framework /python-gmsh'
13771347
13781348 [tool.setuptools]
13791349 packages = ['gmsh']
0 commit comments