Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

Remove dependency on NUPIC_CORE_RELEASE environment variable #552

Merged
merged 6 commits into from
Aug 25, 2015
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ before_deploy:
- ./ci/travis/before_deploy.sh
- cp $TRAVIS_BUILD_DIR/bindings/py/requirements.txt $TRAVIS_BUILD_DIR/bindings/py/dist/
- mkdir -p $TRAVIS_BUILD_DIR/bindings/py/dist/include/nupic
- cp $NUPIC_CORE_RELEASE/include/nupic/Version.hpp $TRAVIS_BUILD_DIR/bindings/py/dist/include/nupic
- cp ${TRAVIS_BUILD_DIR}/build/release/include/nupic/Version.hpp $TRAVIS_BUILD_DIR/bindings/py/dist/include/nupic
- mkdir -p $TRAVIS_BUILD_DIR/bindings/py/dist/include/nupic/proto
- cp $TRAVIS_BUILD_DIR/src/nupic/proto/*.capnp $TRAVIS_BUILD_DIR/bindings/py/dist/include/nupic/proto
- mkdir -p $TRAVIS_BUILD_DIR/bindings/py/dist/bin
- cp $NUPIC_CORE_RELEASE/bin/py_region_test $TRAVIS_BUILD_DIR/bindings/py/dist/bin
- cp ${TRAVIS_BUILD_DIR}/build/release/bin/py_region_test $TRAVIS_BUILD_DIR/bindings/py/dist/bin
- mkdir -p $TRAVIS_BUILD_DIR/release
- tar -zcvf $TRAVIS_BUILD_DIR/release/nupic_core-${TRAVIS_COMMIT}-${PLATFORM}64.tar.gz $TRAVIS_BUILD_DIR/bindings/py/dist

Expand Down Expand Up @@ -103,8 +103,7 @@ install:
- "make -j3"
- "make install"
- "cd $TRAVIS_BUILD_DIR"
- "export NUPIC_CORE_RELEASE=\"${TRAVIS_BUILD_DIR}/build/release\""
- "python setup.py install --user"
- "python setup.py install --user --nupic-core-dir=${TRAVIS_BUILD_DIR}/build/release"

script:
- "cd $TRAVIS_BUILD_DIR/build/scripts"
Expand Down
3 changes: 1 addition & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@ build_script:
- msbuild %MSBuildOptions% INSTALL.vcxproj
- cd %REPO_DIR%
- set INCLUDE='C:\Program Files (x86)\MSBuild\14.0\Include';%INCLUDE%
- set NUPIC_CORE_RELEASE=%REPO_DIR%\build\Release
- python setup.py install --user
- python setup.py install --user --nupic-core-dir=%REPO_DIR%\build\Release

test: off

Expand Down
10 changes: 5 additions & 5 deletions bindings/py/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ def getCommandLineOptions():
# optionDesc = [name, value, description]
optionsDesc = []
optionsDesc.append(
["skip-compare-versions",
"",
"(optional) Skip nupic.core version comparison"]
["nupic-core-dir",
"dir",
"Absolute path to nupic.core binary release directory"]
)
optionsDesc.append(
["optimizations-native",
Expand Down Expand Up @@ -529,9 +529,9 @@ def getExtensionModules(nupicCoreReleaseDir, platform, bitness, cxxCompiler, cmd
print "NUMPY VERSION: {}".format(numpy.__version__)

try:
nupicCoreReleaseDir = os.environ.get('NUPIC_CORE_RELEASE')
nupicCoreReleaseDir = getCommandLineOption("nupic-core-dir", options)
if nupicCoreReleaseDir is None:
raise Exception("Must provide path to nupic core release. export NUPIC_CORE_RELEASE=<path>")
raise Exception("Must provide nupic core release directory. --nupic-core-dir")
nupicCoreReleaseDir = fixPath(nupicCoreReleaseDir)
print "Nupic Core Release Directory: {}\n".format(nupicCoreReleaseDir)
if not os.path.isdir(nupicCoreReleaseDir):
Expand Down
2 changes: 1 addition & 1 deletion ci/travis/after_success-release-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pip install twine --user || exit
echo "Creating distribution files..."
# This release build creates the source distribution. All other release builds
# should not.
python setup.py sdist bdist bdist_wheel || exit
python setup.py sdist bdist bdist_wheel --nupic-core-dir=${TRAVIS_BUILD_DIR}/build/release || exit

echo "Created the following distribution files:"
ls -l dist
Expand Down
2 changes: 1 addition & 1 deletion ci/travis/after_success-release-osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export PATH=/Users/travis/Library/Python/2.7/bin:${PATH}
echo "Creating distribution files..."
# We are not creating sdist here, because it's being created and uploaded in the
# linux Travis-CI release build.
python setup.py bdist bdist_wheel || exit
python setup.py bdist bdist_wheel --nupic-core-dir=${TRAVIS_BUILD_DIR}/build/release || exit

echo "Created the following distribution files:"
ls -l dist
Expand Down
10 changes: 7 additions & 3 deletions ci/travis/before_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ echo
echo Running before_deploy.sh...
echo

set -o xtrace

# If this branch is master, this is an iterative deployment, so we'll package
# wheels ourselves for deployment to S3. No need to build docs.
if [ "${TRAVIS_BRANCH}" = "master" ]; then
Expand All @@ -32,13 +34,15 @@ if [ "${TRAVIS_BRANCH}" = "master" ]; then
pip install --upgrade pip

# Assuming pip 1.5.X is installed.
echo "pip install wheel --user"
pip install wheel --user

cd ${TRAVIS_BUILD_DIR}/bindings/py

# Build all NuPIC and all required python packages into dist/wheels as .whl
# files.
echo "pip wheel --wheel-dir=dist/wheels ."
pip wheel --wheel-dir=dist/wheels .
pip wheel --wheel-dir=dist/wheels -r requirements.txt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

won't this choke on nupic.bindings in requirements.txt?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is in nupic.core. nupic.bindings isn't in requirements.txt because these are the requirements for nupic.bindings

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

python setup.py bdist_wheel -d dist/wheels --nupic-core-dir=${TRAVIS_BUILD_DIR}/build/release
python setup.py bdist_egg -d dist --nupic-core-dir=${TRAVIS_BUILD_DIR}/build/release
# The dist/wheels folder is expected to be deployed to S3.

# If this is a tag, we're doing a release deployment, so we want to build docs
Expand Down