Skip to content

Commit

Permalink
Improve the package scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
abergeron committed Aug 28, 2017
1 parent 44104d2 commit be5ccb5
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 21 deletions.
8 changes: 8 additions & 0 deletions conda/libgpuarray/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
cmake -G"NMake Makefiles" ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_PREFIX_PATH="%LIBRARY_PREFIX%" ^
-DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^
-DCMAKE_C_FLAGS="-I%LIBRARY_PREFIX%\include" ^
"%SRC_DIR%"
cmake --build . --config Release --target ALL_BUILD
cmake --build . --config Release --target install
11 changes: 9 additions & 2 deletions conda/libgpuarray/build.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX
make install
#!/bin/bash

if [[ $(uname) == Darwin ]]; then
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_OSX_DEPLOYMENT_TARGET=
else
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX
fi
cmake --build . --config Release --target all
cmake --build . --config Release --target install
21 changes: 10 additions & 11 deletions conda/libgpuarray/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,20 @@ build:
features:
- vc9 # [win and py27]
- vc10 # [win and py34]
- vc14 # [win and py35]
- vc14 # [win and py36]
- vc14 # [win and (py35 or py36)]

requirements:
build:
- m2-git [win]
- m2-filesystem [win]
- git [not win]
- cmake
- python # [win]

test:
requires:
- python {{ environ['PY_VER'] + '*' }} # [win]
commands:
- test -f ${PREFIX}/lib/libgpuarray.dylib # [osx]
- test -f ${PREFIX}/lib/libgpuarray.so # [linux]
- if not exist %PREFIX%\\Library\\lib\\gpuarray.lib exit 1 # [win]
- mako
- python
run:
- vs2008_runtime [win and py27]
- vs2010_runtime [win and py34]
- vs2015_runtime [win and (py35 or py36)]

about:
home: http://github.com/Theano/libgpuarray
Expand Down
3 changes: 3 additions & 0 deletions conda/pygpu/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
set LIB=%LIBRARY_LIB%;%LIB%
set INCLUDE=%LIBRARY_INC%;%INCLUDE%
%PYTHON% setup.py install --single-version-externally-managed --record=record.txt
4 changes: 4 additions & 0 deletions conda/pygpu/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

export CFLAGS=${CFLAGS}" -I${PREFIX}/include -L${PREFIX}/lib"
$PYTHON setup.py install --single-version-externally-managed --record=record.txt
12 changes: 4 additions & 8 deletions conda/pygpu/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ source:

build:
number: 0
script:
- export CFLAGS="${CFLAGS} -I${PREFIX}/include -L${PREFIX}/lib" # [unix]
- python setup.py install --single-version-externally-managed --record record.txt
detect_binary_files_with_prefix: False

requirements:
build:
- m2-git [win]
- m2-filesystem [win]
- git [not win]
- python
- cython >=0.25
- numpy x.x
Expand All @@ -30,11 +31,6 @@ requirements:
- six
- libgpuarray =={{ version }}

test:
imports:
- pygpu
- pygpu.gpuarray

about:
home: http://github.com/Theano/libgpuarray
license: ISC
Expand Down

0 comments on commit be5ccb5

Please sign in to comment.