2017-01-19 23:55:14 +01:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
2017-01-20 03:09:48 +01:00
|
|
|
import sys, os
|
|
|
|
import os.path as path
|
2017-01-26 23:07:35 +01:00
|
|
|
from os.path import join
|
2017-01-20 03:09:48 +01:00
|
|
|
|
2017-01-19 23:55:14 +01:00
|
|
|
from setuptools import setup
|
|
|
|
from setuptools import Extension
|
2017-01-20 01:22:00 +01:00
|
|
|
from setuptools import find_packages
|
|
|
|
|
2017-01-26 23:07:35 +01:00
|
|
|
#pybind11, a dep of openlut, can report its own includes for gcc compilation!
|
2017-01-26 22:18:18 +01:00
|
|
|
import pybind11
|
2017-01-20 03:09:48 +01:00
|
|
|
|
2017-01-26 23:07:35 +01:00
|
|
|
def read(fname):
|
|
|
|
return open(join(path.dirname(__file__), fname)).read()
|
2017-01-26 23:35:19 +01:00
|
|
|
|
|
|
|
pypi_deps = ['numpy', 'wand', 'scipy', 'pygame','PyOpenGL', 'setuptools', 'pybind11']
|
2017-01-26 23:07:35 +01:00
|
|
|
|
2017-01-26 00:50:59 +01:00
|
|
|
#Make sure we're using gcc.
|
|
|
|
os.environ["CC"] = "g++"
|
|
|
|
os.environ["CXX"] = "g++"
|
|
|
|
|
2017-01-25 03:09:25 +01:00
|
|
|
cpp_args = ['-fopenmp', '-std=gnu++14', '-O3']
|
2017-01-20 01:22:00 +01:00
|
|
|
link_args = ['-fopenmp']
|
|
|
|
|
|
|
|
olOpt = Extension( 'openlut.lib.olOpt',
|
|
|
|
sources = ['openlut/lib/olOpt.cpp'],
|
2017-01-26 23:07:35 +01:00
|
|
|
include_dirs=[pybind11.get_include()], #Include pybind11 from its pip package.
|
2017-01-20 01:22:00 +01:00
|
|
|
language = 'c++',
|
|
|
|
extra_compile_args = cpp_args,
|
|
|
|
extra_link_args = cpp_args
|
|
|
|
)
|
2017-01-19 23:55:14 +01:00
|
|
|
|
|
|
|
setup( name = 'openlut',
|
2017-01-26 23:07:35 +01:00
|
|
|
version = '0.2.4',
|
2017-01-19 23:55:14 +01:00
|
|
|
description = 'OpenLUT is a practical color management library.',
|
2017-01-26 23:07:35 +01:00
|
|
|
long_description = read('README.rst'),
|
|
|
|
|
2017-01-19 23:55:14 +01:00
|
|
|
author = 'Sofus Rose',
|
|
|
|
author_email = 'sofus@sofusrose.com',
|
|
|
|
url = 'https://www.github.com/so-rose/openlut',
|
2017-01-20 01:22:00 +01:00
|
|
|
|
|
|
|
packages = find_packages(exclude=['src']),
|
|
|
|
|
|
|
|
ext_modules = [olOpt],
|
2017-01-19 23:55:14 +01:00
|
|
|
|
|
|
|
license = 'MIT Licence',
|
|
|
|
|
2017-01-26 22:18:18 +01:00
|
|
|
keywords = ['color', 'image', 'images', 'processing'],
|
2017-01-19 23:55:14 +01:00
|
|
|
|
2017-01-26 23:35:19 +01:00
|
|
|
install_requires = pypi_deps,
|
2017-01-19 23:55:14 +01:00
|
|
|
|
|
|
|
classifiers = [
|
|
|
|
'Development Status :: 3 - Alpha',
|
|
|
|
|
|
|
|
'License :: OSI Approved :: MIT License',
|
|
|
|
|
2017-01-20 01:22:00 +01:00
|
|
|
'Programming Language :: Python :: 3'
|
2017-01-19 23:55:14 +01:00
|
|
|
]
|
|
|
|
)
|