forked from pearu/pylibtiff
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
71 lines (64 loc) · 2.44 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/usr/bin/env python
import os
from setuptools import find_packages, Extension, setup
import numpy as np
try:
# HACK: https://github.com/pypa/setuptools_scm/issues/190#issuecomment-351181286
# Stop setuptools_scm from including all repository files
import setuptools_scm.integration
setuptools_scm.integration.find_files = lambda _: []
except ImportError:
pass
def setup_package():
with open("README.md", "r") as readme:
long_description = readme.read()
metadata = dict(
name='pylibtiff',
author='Pearu Peterson',
author_email='[email protected]',
license='https://github.com/pearu/pylibtiff/blob/master/LICENSE',
url='https://github.com/pearu/pylibtiff',
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"License :: OSI Approved",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering",
"Topic :: Software Development",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Operating System :: MacOS",
],
description='PyLibTiff: a Python tiff library.',
long_description=long_description,
long_description_content_type='text/markdown',
install_requires=['numpy>=1.13.3'],
python_requires='>=3.8',
extras_require={
'bitarray': ['bitarray'],
},
include_package_data=True,
packages=find_packages(),
ext_modules=[
Extension(name="libtiff.bittools",
sources=[os.path.join("libtiff", "src", "bittools.c")],
include_dirs=[np.get_include()]),
Extension(name="libtiff.tif_lzw",
sources=[os.path.join("libtiff", "src", "tif_lzw.c")],
include_dirs=[np.get_include()]),
],
entry_points={
'console_scripts': [
'libtiff.info = libtiff.scripts.info:main',
'libtiff.convert = libtiff.scripts.convert:main',
],
},
)
setup(**metadata)
if __name__ == '__main__':
setup_package()