[Git][ghc/ghc][master] packaging: Fix upload_ghc_libs.py script
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Wed Dec 21 02:15:41 UTC 2022
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
9736ab74 by Matthew Pickering at 2022-12-20T21:15:22-05:00
packaging: Fix upload_ghc_libs.py script
This change reflects the changes where .cabal files are now generated by
hadrian rather than ./configure.
Fixes #22518
- - - - -
1 changed file:
- .gitlab/upload_ghc_libs.py
Changes:
=====================================
.gitlab/upload_ghc_libs.py
=====================================
@@ -51,15 +51,19 @@ def prep_base():
def build_copy_file(pkg: Package, f: Path):
target = Path('_build') / 'stage1' / pkg.path / 'build' / f
dest = pkg.path / f
- print(f'Building {target} for {dest}...')
+ build_file_hadrian(target)
+ print(f'Copying {target} to {dest}...')
+ dest.parent.mkdir(exist_ok=True, parents=True)
+ shutil.copyfile(target, dest)
+
+def build_file_hadrian(target: Path):
build_cabal = Path('hadrian') / 'build-cabal'
if not build_cabal.is_file():
build_cabal = Path('hadrian') / 'build.cabal.sh'
+ print(f'Building {target}...')
run([build_cabal, target], check=True)
- dest.parent.mkdir(exist_ok=True, parents=True)
- shutil.copyfile(target, dest)
def modify_file(pkg: Package, fname: Path, f: Callable[[str], str]):
target = pkg.path / fname
@@ -116,6 +120,7 @@ def prepare_sdist(pkg: Package):
print(f'Preparing package {pkg.name}...')
shutil.rmtree(pkg.path / 'dist-newstyle', ignore_errors=True)
+ build_file_hadrian(pkg.path / '{}.cabal'.format(pkg.name))
pkg.prepare_sdist()
# Upload source tarball
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9736ab7497ab91fe9d3bda57ca6d1230d7968fe2
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9736ab7497ab91fe9d3bda57ca6d1230d7968fe2
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20221220/e5ef948c/attachment-0001.html>
More information about the ghc-commits
mailing list