diff --git a/recipe/activate.bat b/recipe/activate.bat new file mode 100644 index 0000000..c608374 --- /dev/null +++ b/recipe/activate.bat @@ -0,0 +1,2 @@ +@set "JGO_CACHE_DIR_CONDA_BACKUP=%JGO_CACHE_DIR%" +@set "JGO_CACHE_DIR=%CONDA_PREFIX%\jgo" diff --git a/recipe/activate.sh b/recipe/activate.sh new file mode 100644 index 0000000..834ebc6 --- /dev/null +++ b/recipe/activate.sh @@ -0,0 +1,2 @@ +export JGO_CACHE_DIR_CONDA_BACKUP="${JGO_CACHE_DIR}" +export JGO_CACHE_DIR="${CONDA_PREFIX}/jgo" diff --git a/recipe/bld.bat b/recipe/bld.bat new file mode 100644 index 0000000..5e24b08 --- /dev/null +++ b/recipe/bld.bat @@ -0,0 +1,7 @@ +"%PYTHON%" -m pip install . -vvv + +FOR %%F IN (activate deactivate) DO ( + IF NOT EXIST %PREFIX%\etc\conda\%%F.d MKDIR %PREFIX%\etc\conda\%%F.d + COPY %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat +) + diff --git a/recipe/build.sh b/recipe/build.sh new file mode 100644 index 0000000..1856bb2 --- /dev/null +++ b/recipe/build.sh @@ -0,0 +1,7 @@ +"${PYTHON}" -m pip install . -vvv + +for CHANGE in "activate" "deactivate" +do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" +done diff --git a/recipe/deactivate.bat b/recipe/deactivate.bat new file mode 100644 index 0000000..73d6855 --- /dev/null +++ b/recipe/deactivate.bat @@ -0,0 +1,2 @@ +@set "JGO_CACHE_DIR=%JGO_CACHE_DIR_CONDA_BACKUP%" +@set "JGO_CACHE_DIR_CONDA_BACKUP=" diff --git a/recipe/deactivate.sh b/recipe/deactivate.sh new file mode 100644 index 0000000..6ebda5a --- /dev/null +++ b/recipe/deactivate.sh @@ -0,0 +1,6 @@ +export JGO_CACHE_DIR="${JGO_CACHE_DIR_CONDA_BACKUP}" +unset JGO_CACHE_DIR_CONDA_BACKUP + +if [ -z "${JGO_CACHE_DIR}" ]; then + unset JGO_CACHE_DIR +fi diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 70dc4bb..0a8a912 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,5 @@ {% set name = "jgo" %} -{% set version = "0.1.0" %} +{% set version = "0.2.0" %} package: name: {{ name|lower }} @@ -7,11 +7,10 @@ package: source: url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz - sha256: 880d880badc2b3ec88ed15f063be3fe12c83eec5c951b743b182b66d81977188 + sha256: 440d23946d5d91b9855b8329373a7b2b66d77231486cbb82542aed7177122a40 build: number: 1000 - script: "{{ PYTHON }} -m pip install . -vvv" skip: True # [py2k] requirements: @@ -22,14 +21,20 @@ requirements: - python test: + requires: + - openjdk + - maven imports: - jgo + commands: + - test "${JGO_CACHE_DIR}" = "${CONDA_PREFIX}/jgo" # [unix] + - if not "%JGO_CACHE_DIR%" == "%CONDA_PREFIX%\jgo" exit 1 # [win] about: home: https://github.com/scijava/jgo license: PUBLIC-DOMAIN license_family: PUBLIC-DOMAIN - summary: 'Launch Java code from the CLI, installation-free. ' + summary: 'Launch Java code from the CLI, installation-free.' doc_url: https://github.com/scijava/jgo dev_url: https://github.com/scijava/jgo