Verified Commit 345dda90 authored by Sofus Albert Høgsbro Rose's avatar Sofus Albert Høgsbro Rose
Browse files

Added some CI utils.

parent da01b5e9
# This file is a template, and might need editing before it works on your project.
# use the official gcc image, based on debian
# can use verions as well, like gcc:5.2
# see
image: sorose/graphics:v8
- build
- build-docs
- deploy-docs
- test
# - review
- apt update && apt -y install python3-pip gcc libmagickwand-dev
- rm -rf dist build docs/build openlut.egg-info
stage: build
- python3 sdist #Build source distribution.
- python3 bdist_wheel #Build Linux wheel.
- dist/*
stage: build-docs
- ./
- docs/build/html
stage: deploy-docs
name: Documentation
when: manual
# run tests using the binary built before.
stage: test
- python3 tests/
......@@ -35,7 +35,6 @@ First: **Ensure you have dependencies!!!** The pip command will break without th
Simply use pip: `pip3 install openlut` (pip3 denotes that you must use a Python 3 version of pip). Keep in mind, there are some external dependencies:
* **Python 3.5**: This is Python; you need Python.
* **gcc**: This is needed to compile the C++ extensions.
* **pybind11**: This is a library needed to link the C++ extension into Python. pip version is being difficult...
* **imagemagick**: For all file IO. It's not like I was gonna write that myself :) .
*If it's breaking, try running `pip3 install -U pip setuptools`. Sometimes they are out of date.*
......@@ -45,13 +44,13 @@ Installing Dependencies
Not Difficult, I promise!
On Debian/Ubuntu: `sudo apt-get install python3-pip gcc pybind11-dev libmagickwand-dev`
On Debian/Ubuntu: `sudo apt-get install python3-pip gcc libmagickwand-dev`
On Mac: `brew install python3 gcc pybind11 imagemagick`
On Mac: `brew install python3 gcc imagemagick`
* You will need Homebrew ( copy/paste a command from to install ) and XCode Command Line Tools for gcc (it should prompt you to install this).
* If this doesn't install pip, run `brew install python3; curl | python3`
On Other: You need **python 3.5**, pip, a newer version (must support C++14) of **gcc**, and pybind11 in your `includes`.
On Other: You need **python 3.5**, pip, a newer version (must support C++14) of **gcc**.
Basic Library Usage
......@@ -63,9 +63,9 @@ author = u'Sofus Rose'
# built documents.
# The short X.Y version.
version = u'0.2.1'
version = u'0.2.3'
# The full version, including alpha/beta/rc tags.
release = u'0.2.1'
release = u'0.2.3'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......@@ -2,11 +2,21 @@
rsync -avzP build/html/* $REMOTE:~/openlut/
#ssh $REMOTE 'bash -s' << 'ENDSSH'
#cd /var/www/openlut
#chown -R www-data:www-data *
#Remove the old docs.
ssh $REMOTE 'bash -s' << 'ENDSSH'
rm -rf /var/www/openlut/*
#Sync over the new docs.
rsync -avzP build/html/* $REMOTE:/var/www/openlut/
#Set strong permissions.
ssh $REMOTE 'bash -s' << 'ENDSSH'
chown -R sofus:www-data /var/www/openlut/*
find /var/www/openlut -type f -exec chmod 0640 {} \;
find /var/www/openlut -type d -exec chmod 2750 {} \;
pandoc --from=markdown --to=rst --output=README.rst
make -C doc html
description-file =
description-file = README.rst
......@@ -2,14 +2,18 @@
import sys, os
import os.path as path
from os.path import join
from setuptools import setup
from setuptools import Extension
from setuptools import find_packages
#pybind11, a dependency, can report its own includes!
#pybind11, a dep of openlut, can report its own includes for gcc compilation!
import pybind11
def read(fname):
return open(join(path.dirname(__file__), fname)).read()
#Make sure we're using gcc.
os.environ["CC"] = "g++"
os.environ["CXX"] = "g++"
......@@ -19,15 +23,17 @@ link_args = ['-fopenmp']
olOpt = Extension( 'openlut.lib.olOpt',
sources = ['openlut/lib/olOpt.cpp'],
include_dirs=[pybind11.get_include()], #Include pybind11.
include_dirs=[pybind11.get_include()], #Include pybind11 from its pip package.
language = 'c++',
extra_compile_args = cpp_args,
extra_link_args = cpp_args
setup( name = 'openlut',
version = '0.2.1',
version = '0.2.4',
description = 'OpenLUT is a practical color management library.',
long_description = read('README.rst'),
author = 'Sofus Rose',
author_email = '',
url = '',
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment