Skip to content

Commit

Permalink
Merge pull request #3281 from bollwyvl/libarchive-c
Browse files Browse the repository at this point in the history
Add python-libarchive-c
  • Loading branch information
isuruf authored Jul 26, 2017
2 parents b90eae9 + 3f4d4fc commit 8a9eefa
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 0 deletions.
10 changes: 10 additions & 0 deletions recipes/python-libarchive-c/activate.sh
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions recipes/python-libarchive-c/build.sh
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions recipes/python-libarchive-c/deactivate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
unset LIBARCHIVE
38 changes: 38 additions & 0 deletions recipes/python-libarchive-c/meta.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8a9eefa

Please sign in to comment.