-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
40 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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('.') | ||
|
@@ -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", | ||
|
@@ -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( | ||
|
636405f
There was a problem hiding this comment.
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...