Skip to content

Commit 6cd2182

Browse files
committed
Adapt build scripts for packaging dynd.ndt and dynd.nd separately.
1 parent abcc2a1 commit 6cd2182

8 files changed

Lines changed: 93 additions & 15 deletions

File tree

.travis.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,14 @@ matrix:
4343
- travis_retry pip install --install-option="--no-cython-compile" Cython==0.24
4444
- python -c "from __future__ import print_function; import numpy; print(numpy.__version__)"
4545
- git clone --depth=1 https://github.com/libdynd/libdynd.git
46-
- python setup.py install
46+
- python setup.py install --target=ndt
47+
- rm -rf build dist dynd.ndt.egg-info
48+
- echo dynd.ndt >> requirements.txt
49+
- python setup.py install --target=nd
4750
script:
4851
- pushd ..
49-
- python -c "import dynd; dynd.test(verbosity=2, exit=True)"
52+
- python -m dynd.ndt.test
53+
- python -m dynd.nd.test
5054
- popd
5155
- language: objective-c
5256
os: osx
@@ -73,12 +77,17 @@ script:
7377
- export PATH=$HOME/miniconda${Miniconda_ver}/bin:$PATH
7478
- conda install --yes conda-build jinja2
7579
- if [ $TRAVIS_BRANCH == "master" ] && [ $TRAVIS_PULL_REQUEST == "false" ]; then conda install --yes anaconda-client; fi
76-
- conda build conda.recipe --channel dynd/channel/dev
80+
- conda build conda/ndt.recipe --channel dynd/channel/dev
81+
- rm -rf build dist dynd.ndt.egg-info
82+
- echo dynd.ndt >> requirements.txt
83+
- conda build conda/nd.recipe --channel dynd/channel/dev
7784
- conda install --yes numpy libdynd --channel dynd/channel/dev
78-
- conda install $(conda build --output conda.recipe | grep bz2)
85+
- conda install $(conda build --output conda/ndt.recipe | grep bz2)
86+
- conda install $(conda build --output conda/nd.recipe | grep bz2)
7987

8088
after_success:
81-
- if [ $TRAVIS_BRANCH == "master" ] && [ $TRAVIS_PULL_REQUEST == "false" ]; then anaconda --token $ANACONDA_TOKEN upload $(conda build --output conda.recipe) --user dynd --channel dev; fi
89+
- if [ $TRAVIS_BRANCH == "master" ] && [ $TRAVIS_PULL_REQUEST == "false" ]; then anaconda --token $ANACONDA_TOKEN upload $(conda build --output conda/ndt.recipe) --user dynd --channel dev; fi
90+
- if [ $TRAVIS_BRANCH == "master" ] && [ $TRAVIS_PULL_REQUEST == "false" ]; then anaconda --token $ANACONDA_TOKEN upload $(conda build --output conda/nd.recipe) --user dynd --channel dev; fi
8291

8392
notifications:
8493
email: false

appveyor.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ build_script:
2424
- conda update conda
2525
- conda install conda-build
2626
- ps: if(-not $env:APPVEYOR_PULL_REQUEST_NUMBER) { conda install anaconda-client }
27-
- conda build conda.recipe --channel dynd/channel/dev
27+
- conda build conda\ndt.recipe --channel dynd/channel/dev
28+
- rd /q /s build dist dynd.ndt.egg-info
29+
- echo dynd.ndt >> requirements.txt
30+
- conda build conda\nd.recipe --channel dynd/channel/dev
2831

2932
on_success:
3033
# Redirect output from stderr to stdout to avoid having the command for uploading
@@ -34,4 +37,5 @@ on_success:
3437
# See also http://stackoverflow.com/a/2095623/1935144
3538
# Route command back through cmd to avoid the powershell bug entirely.
3639
# See https://connect.microsoft.com/PowerShell/feedback/details/645954
37-
- ps: if(-not $env:APPVEYOR_PULL_REQUEST_NUMBER) { cmd /C anaconda --token $env:appveyor_token upload (conda build --output conda.recipe | select -Last 1) --user dynd --channel dev "2>&1" }
40+
- ps: if(-not $env:APPVEYOR_PULL_REQUEST_NUMBER) { cmd /C anaconda --token $env:appveyor_token upload (conda build --output conda\ndt.recipe | select -Last 1) --user dynd --channel dev "2>&1" }
41+
- ps: if(-not $env:APPVEYOR_PULL_REQUEST_NUMBER) { cmd /C anaconda --token $env:appveyor_token upload (conda build --output conda\nd.recipe | select -Last 1) --user dynd --channel dev "2>&1" }
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cd %RECIPE_DIR%
2-
cd ..
2+
cd ..\..\
33

4-
python setup.py install || exit 1
4+
python setup.py install --target=nd || exit 1
55

66
rd /s /q %SP_DIR%\__pycache__
77
rd /s /q %SP_DIR%\numpy
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ elif [ `uname` == Darwin ]; then
1010
EXTRA_CMAKE_ARGS=-DCMAKE_OSX_DEPLOYMENT_TARGET=10.9
1111
fi
1212

13-
cd ..
14-
$PYTHON setup.py build_ext --extra-cmake-args=$EXTRA_CMAKE_ARGS install || exit 1
13+
cd ../../
14+
$PYTHON setup.py build_ext --target=nd --extra-cmake-args=$EXTRA_CMAKE_ARGS install || exit 1
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
package:
2-
name: dynd-python
2+
name: dynd.nd
33
version: 0.7.2
44

55
build:
66
number: {{environ.get('TRAVIS_BUILD_NUMBER', 0)}} # [unix]
77
number: {{environ.get('APPVEYOR_BUILD_NUMBER', 0)}} # [win]
88
rpaths:
9-
- lib # [unix]
10-
- lib/python{{environ.get('PY_VER')}}/site-packages/dynd # [unix]
9+
- lib # [unix]
10+
- lib/python{{environ.get('PY_VER')}}/site-packages/dynd.nd # [unix]
1111
script_env:
1212
- CC [linux]
1313
- CXX [linux]
@@ -28,14 +28,15 @@ requirements:
2828
run:
2929
- python
3030
- numpy
31+
- dynd.ndt
3132
- libdynd
3233

3334
# Test separately to avoid unsatisfiable package dependencies bug on Win32.
3435
test:
3536
requires:
3637
- numba
3738
commands:
38-
- python -c "import dynd; dynd.test(verbosity=2, exit=True)"
39+
- python -m dynd.nd.test
3940

4041
about:
4142
home: http://libdynd.org

conda/ndt.recipe/bld.bat

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
cd %RECIPE_DIR%
2+
cd ..\..\
3+
4+
python setup.py install --target=ndt || exit 1
5+
6+
rd /s /q %SP_DIR%\__pycache__
7+
rd /s /q %SP_DIR%\numpy
8+
rd /s /q %SP_DIR%\Cython

conda/ndt.recipe/build.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
set -ex
3+
4+
cd $RECIPE_DIR
5+
6+
echo Setting the compiler...
7+
if [ `uname` == Linux ]; then
8+
EXTRA_CMAKE_ARGS=-DCMAKE_SHARED_LINKER_FLAGS=-static-libstdc++
9+
elif [ `uname` == Darwin ]; then
10+
EXTRA_CMAKE_ARGS=-DCMAKE_OSX_DEPLOYMENT_TARGET=10.9
11+
fi
12+
13+
cd ../../
14+
$PYTHON setup.py build_ext --target=ndt --extra-cmake-args=$EXTRA_CMAKE_ARGS install || exit 1

conda/ndt.recipe/meta.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
package:
2+
name: dynd.ndt
3+
version: 0.7.2
4+
5+
build:
6+
number: {{environ.get('TRAVIS_BUILD_NUMBER', 0)}} # [unix]
7+
number: {{environ.get('APPVEYOR_BUILD_NUMBER', 0)}} # [win]
8+
rpaths:
9+
- lib # [unix]
10+
- lib/python{{environ.get('PY_VER')}}/site-packages/dynd.ndt # [unix]
11+
script_env:
12+
- CC [linux]
13+
- CXX [linux]
14+
15+
requirements:
16+
build:
17+
# - cmake [unix]
18+
- python
19+
- setuptools
20+
- cython >=0.24
21+
- numpy
22+
- libdynd
23+
# Needed for version tags, not necessary on CI systems since it's already there.
24+
# Comment it out to avoid the unnecessary download.
25+
#- git
26+
# CMake is also needed in general but not necessary on CI systems
27+
#- cmake
28+
run:
29+
- python
30+
- numpy
31+
- libdynd
32+
33+
# Test separately to avoid unsatisfiable package dependencies bug on Win32.
34+
test:
35+
requires:
36+
- numba
37+
commands:
38+
- python -m dynd.ndt.test
39+
40+
about:
41+
home: http://libdynd.org
42+
license: BSD

0 commit comments

Comments
 (0)