Added Python infrastructure, as well as, PIP NOW WORKSgit add README .venv requirements.txt !

master
Sofus Albert Høgsbro Rose 2017-01-19 19:22:00 -05:00
parent f8cd85bbc2
commit 913d6904bc
Signed by: so-rose
GPG Key ID: 3D01BE95F3EFFEB9
9 changed files with 31 additions and 8 deletions

1
.venv 100644
View File

@ -0,0 +1 @@
openlut

View File

@ -1 +1,2 @@
recursive-include openlut *.py
include openlut/lib/olOpt.cpp

1
README
View File

@ -1 +0,0 @@
README.md

View File

@ -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!!!

View File

@ -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.

View File

@ -51,6 +51,7 @@ py::array_t<float> gam(py::array_t<float> arr, const std::function<float(float)>
return result;
}
}

5
requirements.txt 100644
View File

@ -0,0 +1,5 @@
numpy==1.12.0
pygame==1.9.3
PyOpenGL==3.1.0
scipy==0.18.1
Wand==0.4.4

21
setup.py 100644 → 100755
View File

@ -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'
]
)

1
src
View File

@ -1 +0,0 @@
openlut