-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
47 lines (43 loc) · 1.19 KB
/
setup.py
File metadata and controls
47 lines (43 loc) · 1.19 KB
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
"""
Setup script for Fast JPEG Decoder
"""
from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext
import sys
import os
class get_pybind_include:
"""Helper class to determine the pybind11 include path"""
def __str__(self):
import pybind11
return pybind11.get_include()
ext_modules = [
Extension(
'fast_jpeg_decoder._fast_jpeg_decoder',
sources=[
'src/cpp/bitstream.cpp',
'src/cpp/idct.cpp',
'src/cpp/huffman.cpp',
'src/cpp/decoder.cpp',
'src/bindings/bindings.cpp',
],
include_dirs=[
get_pybind_include(),
'src/cpp',
],
language='c++',
extra_compile_args=['-std=c++11', '-O3', '-Wall'],
),
]
setup(
name='fast_jpeg_decoder',
version='0.1.0',
author='Your Name',
description='A high-performance JPEG decoder implemented in C++',
long_description='',
ext_modules=ext_modules,
packages=['fast_jpeg_decoder'],
package_dir={'fast_jpeg_decoder': 'src/python/fast_jpeg_decoder'},
install_requires=['numpy', 'pybind11>=2.6.0'],
python_requires='>=3.6',
zip_safe=False,
)