diff --git a/recipes/python-libarchive-c/activate.sh b/recipes/python-libarchive-c/activate.sh new file mode 100644 index 0000000000000..147297e4e8f80 --- /dev/null +++ b/recipes/python-libarchive-c/activate.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +if [ "`uname`" == 'Darwin' ] +then + # for Mac OSX + export LIBARCHIVE="${CONDA_PREFIX}/lib/libarchive.dylib" +else + # for Linux + export LIBARCHIVE="${CONDA_PREFIX}/lib/libarchive.so" +fi diff --git a/recipes/python-libarchive-c/build.sh b/recipes/python-libarchive-c/build.sh new file mode 100644 index 0000000000000..80c252fd206a0 --- /dev/null +++ b/recipes/python-libarchive-c/build.sh @@ -0,0 +1,12 @@ +#!/bin/bash +export PYTHONHASHSEED=0 + +python setup.py install --single-version-externally-managed --record record.txt + +# Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. +# This will allow them to be run on environment activation. +for CHANGE in "activate" "deactivate" +do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/libarchive-c_${CHANGE}.sh" +done diff --git a/recipes/python-libarchive-c/deactivate.sh b/recipes/python-libarchive-c/deactivate.sh new file mode 100644 index 0000000000000..3094ae532190c --- /dev/null +++ b/recipes/python-libarchive-c/deactivate.sh @@ -0,0 +1,2 @@ +#!/bin/bash +unset LIBARCHIVE diff --git a/recipes/python-libarchive-c/meta.yaml b/recipes/python-libarchive-c/meta.yaml new file mode 100644 index 0000000000000..c32c224c4cde0 --- /dev/null +++ b/recipes/python-libarchive-c/meta.yaml @@ -0,0 +1,38 @@ +{% set pypi = "libarchive-c" %} +{% set name = "python-libarchive-c" %} +{% set version = "2.7" %} +{% set sha256 = "56eadbc383c27ec9cf6aad3ead72265e70f80fa474b20944328db38bab762b04" %} + +package: + name: {{ name }} + version: {{ version }} + +source: + fn: {{ name }}-{{ version }}.tar.gz + url: https://pypi.io/packages/source/{{ pypi[0] }}/{{ pypi }}/{{ pypi }}-{{ version }}.tar.gz + sha256: {{ sha256 }} + +build: + number: 0 + skip: true # [win] + +requirements: + build: + - python + - setuptools + run: + - libarchive + - python + +test: + imports: + - libarchive + +about: + home: https://github.com/Changaco/python-libarchive-c + license: CC0-1.0 + summary: Python interface to libarchive + +extra: + recipe-maintainers: + - bollwyvl