diff --git a/CMakeLists.txt b/CMakeLists.txt index e587aea9..6a1aeb88 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,12 +27,6 @@ option(BUILD_SHARED_LIBS "Build shared library" ON) ## Build Option: when active headers will be installed in the CMAKE_INSTALL_PREFIX/include directory option(INSTALL_HEADERS "Installs the header files" ON) -## Build option: enable test set. -option(ENABLE_TESTS "Build test set." ON) - -## Build Option: build executable for the examples -option(BUILD_EXAMPLES "Build examples." ON) - ## Build Option: build documentation option(BUILD_DOC "Build documentation." ON) @@ -67,14 +61,6 @@ add_subdirectory("${CMAKE_SOURCE_DIR}/src") ############################################################################## -if(ENABLE_TESTS) - # add_subdirectory("${CMAKE_SOURCE_DIR}/tests") -endif(ENABLE_TESTS) - -if(BUILD_EXAMPLES) - # add_subdirectory("${CMAKE_SOURCE_DIR}/examples") -endif(BUILD_EXAMPLES) - if(BUILD_DOC) # add_subdirectory("${CMAKE_SOURCE_DIR}/doc") endif(BUILD_DOC) diff --git a/INSTALL.md b/INSTALL.md index 44a9420c..2ac7e420 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -34,7 +34,7 @@ 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 +conda create -n tyssue python=3.4 numpy scipy vispy matplotlib nose ## activate the new environment source activate tyssue ``` diff --git a/src/setup.py.in b/src/setup.py.in new file mode 100644 index 00000000..c3d105a6 --- /dev/null +++ b/src/setup.py.in @@ -0,0 +1,45 @@ +from setuptools import setup +from setuptools import find_packages + +DISTNAME = 'tyssue' +DESCRIPTION = 'tyssue is stronger than Arnold Schwarzenegge' +LONG_DESCRIPTION = 'tyssue is going to conquer the world soon ' +MAINTAINER = 'Guillaume Gay' +MAINTAINER_EMAIL = 'gllm.gay@gmail.com' +URL = 'https://github.com/CellModels/tyssue' +LICENSE = 'BSD 3-Clause' +DOWNLOAD_URL = 'https://github.com/CellModels/tyssue.git' +VERSION = '${Tyssue_VERSION}' + +if __name__ == "__main__": + + setup( + name=DISTNAME, + description=DESCRIPTION, + long_description=LONG_DESCRIPTION, + maintainer=MAINTAINER, + maintainer_email=MAINTAINER_EMAIL, + url=URL, + license=LICENSE, + download_url=DOWNLOAD_URL, + version=VERSION, + + classifiers=["Development Status :: 4 - Beta", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: BSD License", + "Natural Language :: English", + "Operating System :: MacOS", + "Operating System :: Microsoft", + "Operating System :: POSIX :: Linux", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: Implementation :: CPython", + "Topic :: Scientific/Engineering :: Artificial Intelligence", + "Topic :: Scientific/Engineering :: Bio-Informatics", + "Topic :: Scientific/Engineering :: Image Recognition", + "Topic :: Scientific/Engineering :: Medical Science Apps", + ], + + packages=find_packages('${CMAKE_CURRENT_SOURCE_DIR}'), + package_dir={'': '${CMAKE_CURRENT_SOURCE_DIR}'}, + zip_safe=False + ) diff --git a/src/tyssue/__init__.py b/src/tyssue/__init__.py index 71a48c01..532dd106 100644 --- a/src/tyssue/__init__.py +++ b/src/tyssue/__init__.py @@ -1 +1 @@ -from .core import objects \ No newline at end of file +from .core import objects diff --git a/src/tyssue/core/__init__.py b/src/tyssue/core/__init__.py index 048ad0cc..57400c02 100644 --- a/src/tyssue/core/__init__.py +++ b/src/tyssue/core/__init__.py @@ -1,7 +1,8 @@ import sys -sys.path.append("/home/hadim/local/conda/envs/tyssue/lib/") +import os -import libtyssue_core as core +ld_library_path = os.path.dirname(os.path.dirname(os.__file__)) +sys.path.append(ld_library_path) from .objects import Epithelium, Vertex, Edge, Face, Volume, Cell, test_import from libtyssue_core import make_hexagon diff --git a/src/tyssue/core/objects.py b/src/tyssue/core/objects.py index 16ce8179..5cb59fa0 100644 --- a/src/tyssue/core/objects.py +++ b/src/tyssue/core/objects.py @@ -4,7 +4,7 @@ def test_import(): planet = core.World() planet.set('howdy') - print(planet.greet()) + return planet.greet() class Epithelium(core.Epithelium): diff --git a/src/tyssue/core/tests/__init__.py b/src/tyssue/core/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/tyssue/core/tests/test_objects.py b/src/tyssue/core/tests/test_objects.py new file mode 100644 index 00000000..e60b7198 --- /dev/null +++ b/src/tyssue/core/tests/test_objects.py @@ -0,0 +1,3 @@ +def test_world_import(): + import tyssue + assert tyssue.core.test_import() == "howdy" diff --git a/src/tyssue/draw/__init__.py b/src/tyssue/draw/__init__.py index 5d080849..d066521c 100644 --- a/src/tyssue/draw/__init__.py +++ b/src/tyssue/draw/__init__.py @@ -1 +1,2 @@ -import vispy_draw, mpl_draw \ No newline at end of file +from . import vispy_draw +from . import mpl_draw