From f215a711b7a66eeddbe6eb218dfb074be7a662eb Mon Sep 17 00:00:00 2001 From: Dave Hirschfeld Date: Mon, 27 Jan 2025 15:09:43 +1000 Subject: [PATCH 1/6] Add `cloudsmith-api` --- recipes/example/cloudsmith-api/recipe.yaml | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 recipes/example/cloudsmith-api/recipe.yaml diff --git a/recipes/example/cloudsmith-api/recipe.yaml b/recipes/example/cloudsmith-api/recipe.yaml new file mode 100644 index 0000000000000..2bfacc58573dd --- /dev/null +++ b/recipes/example/cloudsmith-api/recipe.yaml @@ -0,0 +1,54 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json +context: + name: cloudsmith-cli + version: "2.0.16" + git_sha: 2087dcd31d250415d49cacad6b23d58f09a4af48 + +package: + name: ${{ name|lower }} + version: ${{ version }} + +source: + url: https://github.com/cloudsmith-io/cloudsmith-api/archive/${{ git_sha }}.zip + sha256: 0c270ad19de9f7d922cc3993d88a092189b9aa43f37fae99705196b59c49ebda + +build: + noarch: python + script: | + set -euxo pipefail + ./scripts/build.sh python + cd ./bindings/python/src + python -m pip install . -vv + echo "SUCCESS!" + exit 1 + number: 0 + +requirements: + host: + - python ${{ python_min }}.* + - pip + - setuptools + run: + - python >=${{ python_min }} + - certifi >=2017.4.17 + - python-dateutil >=2.1 + - six >=1.10 + - urllib3 >=1.23 + +tests: + - python: + pip_check: true + python_version: ${{ python_min }}.* + imports: + - cloudsmith_api + + +about: + homepage: https://github.com/cloudsmith-io/cloudsmith-api + summary: 'Cloudsmith API Client (Generated)' + license: Apache-2.0 + license_file: LICENSE + +extra: + recipe-maintainers: + - dhirschfeld From cb7198400d5a6644b7485cf9e6a66ed3b6221c41 Mon Sep 17 00:00:00 2001 From: Dave Hirschfeld Date: Mon, 27 Jan 2025 15:12:47 +1000 Subject: [PATCH 2/6] Fix location --- recipes/{example => }/cloudsmith-api/recipe.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename recipes/{example => }/cloudsmith-api/recipe.yaml (100%) diff --git a/recipes/example/cloudsmith-api/recipe.yaml b/recipes/cloudsmith-api/recipe.yaml similarity index 100% rename from recipes/example/cloudsmith-api/recipe.yaml rename to recipes/cloudsmith-api/recipe.yaml From f71cf675fcd7e1afa5c5349babac5eb5b2f006ad Mon Sep 17 00:00:00 2001 From: Dave Hirschfeld Date: Mon, 27 Jan 2025 16:17:00 +1000 Subject: [PATCH 3/6] wip --- recipes/cloudsmith-api/recipe.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/cloudsmith-api/recipe.yaml b/recipes/cloudsmith-api/recipe.yaml index 2bfacc58573dd..6347ad7deda71 100644 --- a/recipes/cloudsmith-api/recipe.yaml +++ b/recipes/cloudsmith-api/recipe.yaml @@ -1,6 +1,6 @@ # yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json context: - name: cloudsmith-cli + name: cloudsmith-api version: "2.0.16" git_sha: 2087dcd31d250415d49cacad6b23d58f09a4af48 @@ -26,6 +26,8 @@ build: requirements: host: - python ${{ python_min }}.* + - curl + - jq - pip - setuptools run: From 7d649bb423289805324fa3212dcc189405aba7e1 Mon Sep 17 00:00:00 2001 From: Dave Hirschfeld Date: Mon, 27 Jan 2025 19:40:32 +1000 Subject: [PATCH 4/6] Try `podman` --- recipes/cloudsmith-api/recipe.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/cloudsmith-api/recipe.yaml b/recipes/cloudsmith-api/recipe.yaml index 6347ad7deda71..41f50c86262ad 100644 --- a/recipes/cloudsmith-api/recipe.yaml +++ b/recipes/cloudsmith-api/recipe.yaml @@ -16,6 +16,8 @@ build: noarch: python script: | set -euxo pipefail + shopt -s expand_aliases + alias docker=podman ./scripts/build.sh python cd ./bindings/python/src python -m pip install . -vv @@ -29,6 +31,7 @@ requirements: - curl - jq - pip + - podman - setuptools run: - python >=${{ python_min }} From a39966a136896a6afbcaa1dae5a46b1d937dbc4e Mon Sep 17 00:00:00 2001 From: Dave Hirschfeld Date: Mon, 27 Jan 2025 19:49:31 +1000 Subject: [PATCH 5/6] Source the build script --- recipes/cloudsmith-api/recipe.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/cloudsmith-api/recipe.yaml b/recipes/cloudsmith-api/recipe.yaml index 41f50c86262ad..9ba227cee5e7f 100644 --- a/recipes/cloudsmith-api/recipe.yaml +++ b/recipes/cloudsmith-api/recipe.yaml @@ -18,7 +18,7 @@ build: set -euxo pipefail shopt -s expand_aliases alias docker=podman - ./scripts/build.sh python + source ./scripts/build.sh python cd ./bindings/python/src python -m pip install . -vv echo "SUCCESS!" From 2bfdc465a0547bddb9c9f8a3579c9dc096367225 Mon Sep 17 00:00:00 2001 From: Dave Hirschfeld Date: Mon, 27 Jan 2025 20:00:38 +1000 Subject: [PATCH 6/6] Relax error handling --- recipes/cloudsmith-api/recipe.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/cloudsmith-api/recipe.yaml b/recipes/cloudsmith-api/recipe.yaml index 9ba227cee5e7f..b7496313f29f7 100644 --- a/recipes/cloudsmith-api/recipe.yaml +++ b/recipes/cloudsmith-api/recipe.yaml @@ -15,7 +15,7 @@ source: build: noarch: python script: | - set -euxo pipefail + set -exo pipefail shopt -s expand_aliases alias docker=podman source ./scripts/build.sh python