Skip to content

Commit 5a139bf

Browse files
Merge pull request #714 from skrah/build_namespace_packages
Build namespace packages
2 parents abcc2a1 + 8dc7be9 commit 5a139bf

11 files changed

Lines changed: 121 additions & 25 deletions

File tree

.travis.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,13 @@ 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 -j2
47+
- rm -rf build dist dynd.ndt.egg-info
48+
- python setup.py install --target=nd -j2
4749
script:
4850
- pushd ..
49-
- python -c "import dynd; dynd.test(verbosity=2, exit=True)"
51+
- python -m dynd.ndt.test
52+
- python -m dynd.nd.test
5053
- popd
5154
- language: objective-c
5255
os: osx
@@ -73,12 +76,16 @@ script:
7376
- export PATH=$HOME/miniconda${Miniconda_ver}/bin:$PATH
7477
- conda install --yes conda-build jinja2
7578
- if [ $TRAVIS_BRANCH == "master" ] && [ $TRAVIS_PULL_REQUEST == "false" ]; then conda install --yes anaconda-client; fi
76-
- conda build conda.recipe --channel dynd/channel/dev
79+
- conda build conda/ndt.recipe --channel dynd/channel/dev
80+
- rm -rf build dynd.ndt.egg-info
81+
- conda build conda/nd.recipe --channel dynd/channel/dev
7782
- conda install --yes numpy libdynd --channel dynd/channel/dev
78-
- conda install $(conda build --output conda.recipe | grep bz2)
83+
- conda install $(conda build --output conda/ndt.recipe | grep bz2)
84+
- conda install $(conda build --output conda/nd.recipe | grep bz2)
7985

8086
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
87+
- 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
88+
- 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
8289

8390
notifications:
8491
email: false

appveyor.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ 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 dynd.ndt.egg-info
29+
- conda build conda\nd.recipe --channel dynd/channel/dev
2830

2931
on_success:
3032
# Redirect output from stderr to stdout to avoid having the command for uploading
@@ -34,4 +36,5 @@ on_success:
3436
# See also http://stackoverflow.com/a/2095623/1935144
3537
# Route command back through cmd to avoid the powershell bug entirely.
3638
# 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" }
39+
- 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" }
40+
- 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" }

buildscripts/bdist_wheel.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Example script for building dynd.ndt and dynd.nd wheels.
2+
3+
# Build dynd.ndt
4+
$PYTHON setup.py bdist_wheel --target=ndt &&
5+
cd build/lib* &&
6+
printf "\ntesting build ...\n" &&
7+
$PYTHON -m dynd.ndt.test &&
8+
cd - &&
9+
rm -rf build &&
10+
11+
# Build dynd.nd
12+
$PYTHON setup.py bdist_wheel --target=nd &&
13+
cd build/lib* &&
14+
printf "\ntesting build ...\n" &&
15+
$PYTHON -m dynd.nd.test || exit 1
16+
17+

conda.recipe/bld.bat

Lines changed: 0 additions & 8 deletions
This file was deleted.

conda/nd.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=nd --single-version-externally-managed --record=record.txt || exit 1
5+
6+
rd /s /q %SP_DIR%\__pycache__
7+
rd /s /q %SP_DIR%\numpy
8+
rd /s /q %SP_DIR%\Cython
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 --single-version-externally-managed --record=record.txt || exit 1
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
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]
8-
rpaths:
9-
- lib # [unix]
10-
- lib/python{{environ.get('PY_VER')}}/site-packages/dynd # [unix]
118
script_env:
129
- CC [linux]
1310
- CXX [linux]
@@ -28,14 +25,15 @@ requirements:
2825
run:
2926
- python
3027
- numpy
28+
- dynd.ndt
3129
- libdynd
3230

3331
# Test separately to avoid unsatisfiable package dependencies bug on Win32.
3432
test:
3533
requires:
3634
- numba
3735
commands:
38-
- python -c "import dynd; dynd.test(verbosity=2, exit=True)"
36+
- python -m dynd.nd.test
3937

4038
about:
4139
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 --single-version-externally-managed --record=record.txt || 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 --single-version-externally-managed --record=record.txt || exit 1

conda/ndt.recipe/meta.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+
script_env:
9+
- CC [linux]
10+
- CXX [linux]
11+
12+
requirements:
13+
build:
14+
# - cmake [unix]
15+
- python
16+
- setuptools
17+
- cython >=0.24
18+
- numpy
19+
- libdynd
20+
# Needed for version tags, not necessary on CI systems since it's already there.
21+
# Comment it out to avoid the unnecessary download.
22+
#- git
23+
# CMake is also needed in general but not necessary on CI systems
24+
#- cmake
25+
run:
26+
- python
27+
- numpy
28+
- libdynd
29+
30+
# Test separately to avoid unsatisfiable package dependencies bug on Win32.
31+
test:
32+
requires:
33+
- numba
34+
commands:
35+
- python -m dynd.ndt.test
36+
37+
about:
38+
home: http://libdynd.org
39+
license: BSD

0 commit comments

Comments
 (0)