Skip to content

Commit

Permalink
Fix README
Browse files Browse the repository at this point in the history
  • Loading branch information
hadim committed May 24, 2014
1 parent 9c439dd commit 636405f
Showing 1 changed file with 40 additions and 26 deletions.
66 changes: 40 additions & 26 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,30 @@
from setuptools import setup
from setuptools import Extension

# Try to use Cython to compile .pyx files.
# If Cython it not available then try to compile .c related files.
# So be sure to always have the .c version for each .pyx files.
# You can generate .c files with python setup.py build_ext --inplace
try:
import numpy as np
except ImportError as e:
raise ImportError("Numpy is needed to compile .pyx extensions. Use : pip install numpy")

try:
from Cython.Distutils import build_ext
except ImportError as e:
from setuptools.command.build_ext import build_ext
warnings.warn("Cython is not present. .pyx extensions will be build against .c files.")

extensions = [Extension("sktracker.tracker.lapjv._lapjv",
["sktracker/tracker/lapjv/_lapjv.pyx"],
include_dirs=[np.get_include()]),

Extension("sktracker.io._tifffile",
["sktracker/io/_tifffile.c"],
include_dirs=[np.get_include()]),
]

# Get version number
import sys
sys.path.append('.')
Expand All @@ -18,14 +42,28 @@
# Fill project desciption fields
DISTNAME = 'scikit-tracker'
DESCRIPTION = 'Object detection and tracking for cell biology'
LONG_DESCRIPTION = open('README.md').read()
LONG_DESCRIPTION = """scikit-tracker aims to be a robust Python library to work with cell biology
microscopy images. OME XML and OME Tiff are supported to handle input/output to the lib. The two
main goals of the library is to implement detection and tracking algorithms relevant to analyse
biological microscopy dataset.
Several algorithms are featured and it is planned to add others:
- Gaussian peak detection by deflation loop : Segré et al. Nature Methods (2008)
- Cell boundary detection with bright field depth fitting : Julou, T., PNAS, (2013)
- Cell nucleus segmentation : by Guillaume Gay
- Lap Tracker, a robust single-particle tracking : K. Jaqaman and G. Danuser, Nature Methods, 2008.
The version implemented in scikit-tracker is a slightly modified version from the original to allow
easy, flexible and yet powerfull parameters adjustements with custom cost function.
For more details, please visit : http://bnoi.github.io/scikit-tracker/stable
"""
MAINTAINER = 'Guillaume Gay and Hadrien Mary'
MAINTAINER_EMAIL = '[email protected]'
URL = 'http://bnoi.github.io/scikit-tracker'
LICENSE = 'BSD 3-Clause'
DOWNLOAD_URL = 'https://github.com/bnoi/scikit-tracker'
VERSION = sktracker.__version__
PYTHON_VERSION = (3, 3)
DEPENDENCIES = ["numpy >= 1.8",
"scipy >= 0.12",
"pandas >= 0.13",
Expand All @@ -39,30 +77,6 @@
"coverage >= 3.7"
]

# Try to use Cython to compile .pyx files.
# If Cython it not available then try to compile .c related files.
# So be sure to always have the .c version for each .pyx files.
# You can generate .c files with python setup.py build_ext --inplace
try:
import numpy as np
except ImportError as e:
raise ImportError("Numpy is needed to compile .pyx extensions. Use : pip install numpy")

try:
from Cython.Distutils import build_ext
except ImportError as e:
from setuptools.command.build_ext import build_ext
warnings.warn("Cython is not present. .pyx extensions will be build against .c files.")

extensions = [Extension("sktracker.tracker.lapjv._lapjv",
["sktracker/tracker/lapjv/_lapjv.pyx"],
include_dirs=[np.get_include()]),

Extension("sktracker.io._tifffile",
["sktracker/io/_tifffile.c"],
include_dirs=[np.get_include()]),
]

if __name__ == "__main__":

setup(
Expand Down

1 comment on commit 636405f

@hadim
Copy link
Contributor Author

@hadim hadim commented on 636405f May 24, 2014

Choose a reason for hiding this comment

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

Fix setup.py I mean...

Please sign in to comment.