Skip to content

Commit

Permalink
continue
Browse files Browse the repository at this point in the history
  • Loading branch information
mara004 committed Nov 22, 2023
1 parent 2731135 commit 4fbd7c4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/conda.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ defaults:
run:
shell: bash -el {0}

# TODO it would be nice to also support building both packages in one run and testing the helpers package with the newly-built raw package, but this may be failry complicated
# TODO it would be nice to also support building both packages in one run and testing the helpers package with the newly-built raw package, but this may be fairly complicated

jobs:

Expand Down Expand Up @@ -61,6 +61,10 @@ jobs:
git config --global user.name "geisserml"
python -m pip install -U -r req/setup.txt
# this is used to automatically manage build number for rebuilds of the raw package
- name: Autorelease (raw package)
run: python setupsrc/pypdfium2_setup/autorelease_conda_raw.py --pdfium-ver ${{ inputs.raw_version }}

- name: Build package
run: ./run craft conda_${{ inputs.package }}

Expand Down
4 changes: 3 additions & 1 deletion setupsrc/pypdfium2_setup/autorelease_conda_raw.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ def main():
parser = argparse.ArgumentParser()
parser.add_argument("--pdfium-ver", type=int, default=None)
args = parser.parse_args()
if not args.pdfium_ver:
if not args.pdfium_ver or args.pdfium_ver == "latest":
args.pdfium_ver = PdfiumVer.get_latest()
else:
args.pdfium_ver = int(args.pdfium_ver)

# parse existing releases to automatically handle arbitrary version builds
search = run_cmd(["conda", "search", "pypdfium2_raw", "--override-channels", "-c", "pypdfium2-team"], cwd=None, capture=True)
Expand Down
4 changes: 3 additions & 1 deletion setupsrc/pypdfium2_setup/craft_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ def parse_args():
)

args = root_parser.parse_args()
if not args.pdfium_ver:
if not args.pdfium_ver or args.pdfium_ver == "latest":
args.pdfium_ver = PdfiumVer.get_latest()
else:
args.pdfium_ver = int(args.pdfium_ver)
if args.parser == P_CONDA_BUNDLE:
if args.platforms and args.platforms[0] == "all":
args.platforms = list(CondaNames.keys())
Expand Down

0 comments on commit 4fbd7c4

Please sign in to comment.