-
Notifications
You must be signed in to change notification settings - Fork 13
/
setup.py
48 lines (41 loc) · 1.46 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
from setuptools import setup
from distutils.extension import Extension
try:
from Cython.Build import cythonize
from Cython.Distutils import build_ext
except:
use_cython = False
else:
use_cython = True
try:
import numpy
except:
raise Exception("Numpy is needed for installation")
import sys
import pytiff._version as _version
ext = ".pyx" if use_cython else ".cpp"
extensions = [
Extension("pytiff._pytiff", ["pytiff/_pytiff.pyx"],
libraries=["tiff"],
include_dirs=["./pytiff", numpy.get_include()],
language="c++",
)]
if use_cython:
extensions = cythonize(extensions, compiler_directives={'linetrace': True})
setup(
ext_modules = extensions,
setup_requires=["pytest-runner"],
tests_require=["pytest", "hypothesis"],
name="pytiff",
version=_version.__version__,
packages=["pytiff", "pytiff._version"],
package_dir={
"pytiff" : "pytiff",
},
license="BSD",
description="A libtiff wrapper to read tiled tiff images",
long_description="Pytiff is a Python library for reading and writing large Tiff files. It supports tiled Tiffs and is able to read only a part of the image. While this is pytiffs main advantage, it also supports reading of many other image formats and writing of greyscale images in tile or scanline mode.",
url="https://github.com/FZJ-INM1-BDA/pytiff",
author="Big Data Analytics Group, INM-1, Research Center Juelich",
author_email="[email protected]"
)