diff --git a/.venv b/.venv new file mode 100644 index 0000000..056925b --- /dev/null +++ b/.venv @@ -0,0 +1 @@ +openlut diff --git a/MANIFEST.in b/MANIFEST.in index f12ea35..82c0556 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1,2 @@ recursive-include openlut *.py +include openlut/lib/olOpt.cpp diff --git a/README b/README deleted file mode 120000 index 42061c0..0000000 --- a/README +++ /dev/null @@ -1 +0,0 @@ -README.md \ No newline at end of file diff --git a/main.py b/main.py index 27d440c..097780d 100755 --- a/main.py +++ b/main.py @@ -8,9 +8,11 @@ Color Management: openlut deals with the raw RGB values, does its work, then put Dependencies: -numpy: Like, everything. -wand: Saving/loading images. + -PyOpenGL - For image viewer and other future graphics processing. + -pygame - For the physical display in the viewer. -scipy - OPTIONAL: For spline interpolation. -Easily get all deps: sudo pip3 install numpy wand numba scipy +Easily get all deps: sudo pip3 install numpy wand scipy PyOpenGL pygame *Make sure you get the Python 3.X version of these packages!!! diff --git a/openlut/ColMat.py b/openlut/ColMat.py index ab1922c..a91c9cd 100644 --- a/openlut/ColMat.py +++ b/openlut/ColMat.py @@ -3,7 +3,7 @@ from functools import reduce import operator as oper import numpy as np -import numba +#~ import numba from .Transform import Transform @@ -32,7 +32,7 @@ class ColMat(Transform) : return ColMat(reduce(ColMat.__mul__, reversed(inMats))) #Works because multiply is actually non-commutative dot. #This is why we reverse inMats. - @numba.jit(nopython=True) + #~ @numba.jit(nopython=True) def __optDot(img, mat, shp, out) : ''' Dots the matrix with each tuple of colors in the img. diff --git a/openlut/lib/olOpt.cpp b/openlut/lib/olOpt.cpp index 182f409..175d664 100644 --- a/openlut/lib/olOpt.cpp +++ b/openlut/lib/olOpt.cpp @@ -50,6 +50,7 @@ py::array_t gam(py::array_t arr, const std::function } return result; + } } diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..7400b0a --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +numpy==1.12.0 +pygame==1.9.3 +PyOpenGL==3.1.0 +scipy==0.18.1 +Wand==0.4.4 diff --git a/setup.py b/setup.py old mode 100644 new mode 100755 index 69d9b1a..7a9f711 --- a/setup.py +++ b/setup.py @@ -2,25 +2,40 @@ from setuptools import setup from setuptools import Extension +from setuptools import find_packages + +cpp_args = ['-fopenmp', '-std=gnu++14'] +link_args = ['-fopenmp'] + +olOpt = Extension( 'openlut.lib.olOpt', + sources = ['openlut/lib/olOpt.cpp'], + language = 'c++', + extra_compile_args = cpp_args, + extra_link_args = cpp_args + ) setup( name = 'openlut', - version = '0.0.2', + version = '0.1.1', description = 'OpenLUT is a practical color management library.', author = 'Sofus Rose', author_email = 'sofus@sofusrose.com', url = 'https://www.github.com/so-rose/openlut', + + packages = find_packages(exclude=['src']), + + ext_modules = [olOpt], license = 'MIT Licence', keywords = 'color image images processing', - install_requires = ['numpy', 'wand', 'scipy', 'pygame','PyOpenGL'], + install_requires = ['numpy', 'wand', 'scipy', 'pygame','PyOpenGL', 'setuptools'], classifiers = [ 'Development Status :: 3 - Alpha', 'License :: OSI Approved :: MIT License', - 'Programming Language :: Python :: 3.5' + 'Programming Language :: Python :: 3' ] ) diff --git a/src b/src deleted file mode 120000 index e17f667..0000000 --- a/src +++ /dev/null @@ -1 +0,0 @@ -openlut \ No newline at end of file