-
Notifications
You must be signed in to change notification settings - Fork 14
/
setup.py
28 lines (24 loc) · 963 Bytes
/
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
import numpy
from setuptools import setup, convert_path
from Cython.Build import cythonize
# Work around bugs in passing CFLAGS to the Cython compilation process
import os
os.environ['CFLAGS'] = '-Ofast -DNPY_NO_DEPRECATED_API'
if __name__ == '__main__':
main_ns = {}
ver_path = convert_path('internetarchivepdf/const.py')
with open(ver_path) as ver_file:
exec(ver_file.read(), main_ns)
version = main_ns['__version__']
setup(
version = version,
download_url='https://github.com/internetarchive/archive-pdf-tools/archive/%s.tar.gz' % version,
include_dirs = [numpy.get_include()],
scripts=['bin/recode_pdf', 'bin/pdf-metadata-json',
'bin/compress-pdf-images', 'bin/pdfcomp',
'bin/epub-to-pdf'],
ext_modules = cythonize(
['cython/sauvola.pyx', 'cython/optimiser.pyx'],
compiler_directives = {'language_level' : '3'},
),
)