singa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wang...@apache.org
Subject [14/15] incubator-singa git commit: update conda build files for py3
Date Fri, 04 Aug 2017 08:32:58 GMT
update conda build files for py3


Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/57dbe429
Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/57dbe429
Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/57dbe429

Branch: refs/heads/master
Commit: 57dbe429ecbcd5745c78f3a6371dde6ec0488335
Parents: 01b7a74
Author: wangwei <wangwei@comp.nus.edu.sg>
Authored: Mon Jul 31 14:32:50 2017 +0000
Committer: Wei Wang <wangwei@comp.nus.edu.sg>
Committed: Thu Aug 3 18:17:17 2017 +0800

----------------------------------------------------------------------
 cmake/Dependencies.cmake |  5 +++--
 tool/conda/build.sh      |  2 +-
 tool/conda/meta.yaml     | 24 ++++++++++++++++++------
 3 files changed, 22 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/57dbe429/cmake/Dependencies.cmake
----------------------------------------------------------------------
diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake
index 180732b..07736a0 100644
--- a/cmake/Dependencies.cmake
+++ b/cmake/Dependencies.cmake
@@ -129,8 +129,9 @@ IF(USE_PYTHON)
         FIND_PACKAGE(PythonInterp 2.7 REQUIRED)
 	FIND_PACKAGE(SWIG 3.0.10 REQUIRED)
     ELSE()
-        FIND_PACKAGE(PythonLibs 3.0 REQUIRED)
-        FIND_PACKAGE(PythonInterp 3.0 REQUIRED)
+        set(Python_ADDITIONAL_VERSIONS 3.6)
+        FIND_PACKAGE(PythonLibs 3 REQUIRED)
+        FIND_PACKAGE(PythonInterp 3 REQUIRED)
 	FIND_PACKAGE(SWIG 3.0.10 REQUIRED)
     ENDIF()
 ENDIF()

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/57dbe429/tool/conda/build.sh
----------------------------------------------------------------------
diff --git a/tool/conda/build.sh b/tool/conda/build.sh
index 2716452..7bd9023 100644
--- a/tool/conda/build.sh
+++ b/tool/conda/build.sh
@@ -16,7 +16,7 @@
 #
 
 # to compile swig api files which depdend on numpy.i
-export export CPLUS_INCLUDE_PATH=`python -c "import numpy; print numpy.get_include()"`:$CPLUS_INCLUDE_PATH
+export export CPLUS_INCLUDE_PATH=`python -c "from __future__ import print_function; import
numpy; print(numpy.get_include())"`:$CPLUS_INCLUDE_PATH
 
 # to let cmake use the dependent libs installed by conda, including python
 export CMAKE_PREFIX_PATH=$PREFIX

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/57dbe429/tool/conda/meta.yaml
----------------------------------------------------------------------
diff --git a/tool/conda/meta.yaml b/tool/conda/meta.yaml
index 2342e4a..bb65ce4 100644
--- a/tool/conda/meta.yaml
+++ b/tool/conda/meta.yaml
@@ -3,7 +3,7 @@ package:
   version: "{{ GIT_DESCRIBE_TAG }}"
 
 source:
-  git_url: https://github.com/apache/incubator-singa.git
+  path: ../../
 
 
 build:
@@ -15,9 +15,12 @@ build:
 
 requirements:
   build:
-    - swig 3.0.2
-    - openblas 0.2.19
-    - protobuf 3.2.0
+    - python 2.7* [py27]
+    - python 3.6* [py36]
+    - numpy >=1.10
+    - swig >=3.0
+    - openblas >=0.2.10
+    - protobuf 3.2
     - glog 0.3.4
     - libgfortran 3.0.0 # [osx]
     - gcc 4.8.5 # [linux]
@@ -25,8 +28,10 @@ requirements:
     - numpy 1.12.0
 
   run:
-    - openblas 0.2.19
-    - protobuf 3.2.0
+    - python 2.7* [py27]
+    - python 3.6* [py36]
+    - numpy >=1.10
+    - protobuf 3.2
     - glog 0.3.4
     - libgfortran 3.0.0 # [osx]
     - libgcc 4.8.5 # [linux]
@@ -35,6 +40,13 @@ requirements:
     - flask >=0.10.1
     - flask-cors >=3.0.2
     - pillow >=2.3.0
+    - libgcc 4.8.5 # [linux]
+
+test:
+  source_files:
+    - test/python/*.py
+  test:
+    - python run.py
 
 about:
   home: http://singa.apache.org/


Mime
View raw message