Skip to content

Commit

Permalink
WIP dropping the cpp - not done yet, wont install
Browse files Browse the repository at this point in the history
  • Loading branch information
glyg committed Nov 23, 2015
1 parent 63e8195 commit 59d7c0e
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 676 deletions.
8 changes: 1 addition & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
language: cpp

compiler:
- gcc

before_install:
- sudo apt-get update
- sudo apt-get install --yes build-essential
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get -qq update
- sudo apt-get -qq install g++-4.8
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 90
- sudo apt-get install --yes libexpat1-dev
- sudo apt-get install --yes git

- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
Expand All @@ -23,7 +17,7 @@ before_install:
- conda create -q -n tyssue python=3.4
- source activate tyssue
- conda install numpy scipy pandas matplotlib nose coverage vispy pip
- conda install -c https://conda.anaconda.org/osgeo boost cgal
- conda install -c https://conda.anaconda.org/osgeo cgal
- pip install coveralls

install:
Expand Down
38 changes: 13 additions & 25 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ set(Tyssue_VERSION_MINOR 1)
set(Tyssue_VERSION ${Tyssue_VERSION_MAJOR}.${Tyssue_VERSION_MINOR})

# Some screen output
message(STATUS "OS detected: ${CMAKE_SYSTEM_NAME}")
message(STATUS "CXX Compiler detected: ${CMAKE_CXX_COMPILER_ID}")
message(STATUS "CMake additional search path for libraries: ${CMAKE_LIBRARY_PATH}")
# message(STATUS "OS detected: ${CMAKE_SYSTEM_NAME}")
# message(STATUS "CXX Compiler detected: ${CMAKE_CXX_COMPILER_ID}")
# message(STATUS "CMake additional search path for libraries: ${CMAKE_LIBRARY_PATH}")

##############################################################################

Expand All @@ -32,30 +32,18 @@ option(BUILD_DOC "Build documentation." ON)

##############################################################################

# Find boost
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)

find_package(Boost 1.54 COMPONENTS python3 QUIET)
if(NOT Boost_FOUND)
find_package(Boost 1.54 COMPONENTS python-py34 REQUIRED)
endif()
message(STATUS "Boost include dirs: ${Boost_INCLUDE_DIRS}")
message(STATUS "Boost libraries: ${Boost_LIBRARIES}")

# Find Python 3 (with numpy)
find_package(PythonInterp 3 REQUIRED)
find_package(PythonLibsNew 3 REQUIRED)
find_package(NumPy 3 REQUIRED)
find_package(SciPy REQUIRED)
# find_package(PythonInterp 3 REQUIRED)
# find_package(PythonLibsNew 3 REQUIRED)
# find_package(NumPy 3 REQUIRED)
# find_package(SciPy REQUIRED)

find_package(CGAL REQUIRED)
message(STATUS "CGAL version: ${CGAL_VERSION}")
# find_package(CGAL REQUIRED)
# message(STATUS "CGAL version: ${CGAL_VERSION}")

if(NOT CGAL_FOUND OR ${CGAL_VERSION} VERSION_LESS 4.6)
message(FATAL_ERROR "Tyssue needs CGAL library >= 4.6.")
endif()
# if(NOT CGAL_FOUND OR ${CGAL_VERSION} VERSION_LESS 4.6)
# message(FATAL_ERROR "Tyssue needs CGAL library >= 4.6.")
# endif()

##############################################################################

Expand All @@ -75,7 +63,7 @@ endif()
##############################################################################

# Add some flags to the compiler
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -frounding-math -std=c++11")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -frounding-math -std=c++11")

##############################################################################

Expand Down
12 changes: 2 additions & 10 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,17 @@ source .bashrc # update your PATH

```bash
sudo apt-get install build-essential
sudo apt-get install libexpat1-dev
sudo apt-get install git
```

### Install spareshash

```bash
wget https://sparsehash.googlecode.com/files/sparsehash_2.0.2-1_amd64.deb
sudo dpkg -i sparsehash_2.0.2-1_amd64.deb
```

### Create a virtual environment with `conda`

```bash
conda create -n tyssue python=3.4 numpy scipy vispy matplotlib nose coverage
## activate the new environment
source activate tyssue
## install some friends
conda install -c https://conda.anaconda.org/osgeo boost cgal
conda install -c https://conda.anaconda.org/osgeo cgal
pip install vispy
```

Expand All @@ -48,7 +40,7 @@ cmake ..
make && make install
```

If all went well, you have successfully installed tyssue. To test it, you can run `python -c "import tyssue; tyssue.core.test_import()"`. It should print `howdy`.
If all went well, you have successfully installed tyssue.

A `Makefile` provides some utility function. Try :

Expand Down
3 changes: 0 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
# Compile and install C++ lib
add_subdirectory("cpp-tyssue")

# Compile and install Python lib
add_subdirectory("py-tyssue")
43 changes: 0 additions & 43 deletions src/cpp-tyssue/CMakeLists.txt

This file was deleted.

214 changes: 0 additions & 214 deletions src/cpp-tyssue/include/tyssue/numpy_bind.hh

This file was deleted.

Loading

0 comments on commit 59d7c0e

Please sign in to comment.