Commit 349e058e authored by André Anjos's avatar André Anjos 💬
Browse files

Gitlab package updates

parent a3cd3c3d
Pipeline #3047 failed with stages
in 15 minutes and 41 seconds
# This build file is defined in two parts: 1) a generic set of instructions you
# probably **don't** need to change and 2) a part you may have to tune to your
# project. It heavily uses template features from YAML to help you in only
# changing a minimal part of it and avoid code duplication to a maximum while
# still providing a nice pipeline display on your package.
# 1) Generic instructions (only change if you know what you're doing)
# -------------------------------------------------------------------
# Definition of our build pipeline
stages:
- build
- test
- docs
- wheels
# Global variables
variables:
CONDA_PREFIX: env
# Template for the build stage
# Needs to run on all supported architectures, platforms and python versions
.build_template: &build_job
stage: build
before_script:
- git clean -ffdx
- curl --silent https://gitlab.idiap.ch/bob/bob/snippets/7/raw | tr -d '\r' > bootstrap-conda.sh
- chmod 755 ./bootstrap-conda.sh
- ./bootstrap-conda.sh ${CONDA_FOLDER} ${PYTHON_VER} ${CONDA_PREFIX}
variables: &build_variables
BOB_DOCUMENTATION_SERVER: "http://www.idiap.ch/software/bob/docs/latest/bob/%s/master/"
script:
- ./bin/buildout
- ./bin/sphinx-build doc sphinx
- ./bin/python setup.py bdist_wheel --python-tag ${WHEEL_TAG}
after_script:
- rm -rf ${CONDA_PREFIX}
artifacts:
expire_in: 1 day
paths:
- bootstrap-conda.sh
- dist/
- sphinx/
# Template for building on a Linux machine
.build_linux_template: &linux_build_job
<<: *build_job
variables: &linux_build_variables
<<: *build_variables
CONDA_FOLDER: "/local/conda"
CFLAGS: "-coverage"
# Template for building on a Mac OSX machine
.build_mac_template: &macosx_build_job
<<: *build_job
variables: &macosx_build_variables
<<: *build_variables
CONDA_FOLDER: "/opt/conda"
MACOSX_DEPLOYMENT_TARGET: "10.9"
CFLAGS: "-pthread -coverage"
# Template for the test stage - re-install from uploaded wheels
# Needs to run on all supported architectures, platforms and python versions
.test_template: &test_job
stage: test
before_script:
- ./bootstrap-conda.sh ${CONDA_FOLDER} ${PYTHON_VER} ${CONDA_PREFIX}
- source ${CONDA_FOLDER}/bin/activate ${CONDA_PREFIX}
- pip install --use-wheel --no-index --pre dist/*.whl
script:
- cd ${CONDA_PREFIX}
- python -c "from ${CI_PROJECT_NAME} import get_config; print(get_config())"
- coverage run --source=${CI_PROJECT_NAME} ./bin/nosetests -sv ${CI_PROJECT_NAME}
- coverage report
- sphinx-build -b doctest ../doc ../sphinx
after_script:
- rm -rf ${CONDA_PREFIX}
# Template for the wheel uploading stage
# Needs to run against one combination of python 2.x and 3.x if it is a python
# only package, otherwise, needs to run in both pythons to all supported
# architectures (Linux and Mac OSX 64-bit)
.wheels_template: &wheels_job
stage: wheels
only:
- master
- tags
script:
- curl --silent --insecure --upload-file dist/*.whl https://${DOCUSER}:${DOCPASS}@www.idiap.ch/software/bob/wheels-upload/gitlab/
# Template for (latest) documentation upload stage
# Only one real job needs to do this
.docs_template: &docs_job
stage: docs
only:
- master
script:
- echo "repo=${CI_PROJECT_PATH}" > sphinx/.gitlab-ci.info
- echo "branch=${CI_BUILD_REF_NAME}" >> sphinx/.gitlab-ci.info
- echo "tag=${CI_BUILD_TAG}" >> sphinx/.gitlab-ci.info
- echo "build=${CI_BUILD_ID}" >> sphinx/.gitlab-ci.info
- echo "commit=${CI_BUILD_REF}" >> sphinx/.gitlab-ci.info
- echo "runner=${CI_RUNNER_DESCRIPTION}" >> sphinx/.gitlab-ci.info
- tar cfj ${CI_PROJECT_NAME}-${CI_BUILD_REF}.tar.bz2 sphinx
- curl --silent --insecure --upload-file *.tar.bz2 https://${DOCUSER}:${DOCPASS}@www.idiap.ch/software/bob/docs-upload/
# 2) Package specific instructions (you may tune this if needed)
# --------------------------------------------------------------
# Linux + Python 2.7: Builds, tests, uploads wheel
build_linux_27:
<<: *linux_build_job
variables: &linux_27_build_variables
<<: *linux_build_variables
PYTHON_VER: "2.7"
WHEEL_TAG: "py27"
tags:
- conda-linux
test_linux_27:
<<: *test_job
variables: *linux_27_build_variables
dependencies:
- build_linux_27
tags:
- conda-linux
wheels_linux_27:
<<: *wheels_job
dependencies:
- build_linux_27
tags:
- conda-linux
# Linux + Python 3.4: Builds and tests
build_linux_34:
<<: *linux_build_job
variables: &linux_34_build_variables
<<: *linux_build_variables
PYTHON_VER: "3.4"
WHEEL_TAG: "py3"
tags:
- conda-linux
test_linux_34:
<<: *test_job
variables: *linux_34_build_variables
dependencies:
- build_linux_34
tags:
- conda-linux
# Linux + Python 3.5: Builds, tests, uploads wheel
build_linux_35:
<<: *linux_build_job
variables: &linux_35_build_variables
<<: *linux_build_variables
PYTHON_VER: "3.5"
WHEEL_TAG: "py3"
tags:
- conda-linux
test_linux_35:
<<: *test_job
variables: *linux_35_build_variables
dependencies:
- build_linux_35
tags:
- conda-linux
wheels_linux_35:
<<: *wheels_job
dependencies:
- build_linux_35
tags:
- conda-linux
docs_linux_35:
<<: *docs_job
dependencies:
- build_linux_35
tags:
- conda-linux
# Mac OSX + Python 2.7: Builds and tests
build_macosx_27:
<<: *macosx_build_job
variables: &macosx_27_build_variables
<<: *macosx_build_variables
PYTHON_VER: "2.7"
WHEEL_TAG: "py27"
tags:
- conda-macosx
test_macosx_27:
<<: *test_job
variables: *macosx_27_build_variables
dependencies:
- build_macosx_27
tags:
- conda-macosx
# Mac OSX + Python 3.4: Builds and tests
build_macosx_34:
<<: *macosx_build_job
variables: &macosx_34_build_variables
<<: *macosx_build_variables
PYTHON_VER: "3.4"
WHEEL_TAG: "py3"
tags:
- conda-macosx
test_macosx_34:
<<: *test_job
variables: *macosx_34_build_variables
dependencies:
- build_macosx_34
tags:
- conda-macosx
# Mac OSX + Python 3.5: Builds and tests
build_macosx_35:
<<: *macosx_build_job
variables: &macosx_35_build_variables
<<: *macosx_build_variables
PYTHON_VER: "3.5"
WHEEL_TAG: "py3"
tags:
- conda-macosx
test_macosx_35:
<<: *test_job
variables: *macosx_35_build_variables
dependencies:
- build_macosx_35
tags:
- conda-macosx
\ No newline at end of file
language: python
sudo: false
python:
- "2.7"
- "3.3"
- "3.4"
- "3.5"
before_install:
- pip install --find-links https://www.idiap.ch/software/bob/wheels/travis/ --use-wheel sphinx nose --pre coveralls
install:
- "python bootstrap-buildout.py"
- "./bin/buildout"
script:
- "./bin/coverage run --source=bob.buildout ./bin/nosetests -sv"
after_success:
- "coveralls"
Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/
Written by Andre Anjos <andre.anjos@idiap.ch>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
.. vim: set fileencoding=utf-8 :
.. Andre Anjos <andre.anjos@idiap.ch>
.. Thu 30 Jan 08:46:53 2014 CET
.. image:: http://img.shields.io/badge/docs-stable-yellow.png
:target: http://pythonhosted.org/bob.buildout/index.html
.. image:: http://img.shields.io/badge/docs-latest-orange.png
:target: https://www.idiap.ch/software/bob/docs/latest/bioidiap/bob.buildout/master/index.html
.. image:: https://travis-ci.org/bioidiap/bob.buildout.svg?branch=master
:target: https://travis-ci.org/bioidiap/bob.buildout?branch=master
.. image:: https://coveralls.io/repos/bioidiap/bob.buildout/badge.svg?branch=master
:target: https://coveralls.io/r/bioidiap/bob.buildout?branch=master
.. image:: https://img.shields.io/badge/github-master-0000c0.png
:target: https://github.com/bioidiap/bob.buildout/tree/master
.. image:: https://gitlab.idiap.ch/bob/bob.buildout/badges/master/build.svg
:target: https://gitlab.idiap.ch/bob/bob.buildout/commits/master
.. image:: https://img.shields.io/badge/gitlab-project-0000c0.svg
:target: https://gitlab.idiap.ch/bob/bob.buildout
.. image:: http://img.shields.io/pypi/v/bob.buildout.png
:target: https://pypi.python.org/pypi/bob.buildout
.. image:: http://img.shields.io/pypi/dm/bob.buildout.png
:target: https://pypi.python.org/pypi/bob.buildout
===================================
Buildout Recipes for Bob Packages
===================================
This package contains a number of recipes to be used to build `Satellite
Packages <http://www.idiap.ch/software/bob/docs/releases/last/sphinx/html/OrganizeYourCode.html>`_ for `Bob <http://idiap.github.com/bob/>`_,
a signal-processing and machine learning toolbox originally developed by the
Biometrics Group at Idiap, in Switzerland.
.. note::
This package is part of the signal-processing and machine learning toolbox
Bob_. It contains a number of ``zc.buildout`` recipes for simplifying builds of
Bob_ packages.
You normally don't need to download this package directly. It will be done by
``zc.buildout`` automatically, if you followed our recipe to build `Satellite
Packages`_.
C++/Python Extension
--------------------
......@@ -41,6 +33,7 @@ using a buildout. It assures that eggs living in both ``develop-eggs`` and
section. By using this extension you can drop the use of the local recipe
``bob.buildout:develop``, which should be considered deprecated.
Supported Options
=================
......@@ -91,6 +84,7 @@ environ
``environ``'s ``BOB_PREFIX_PATH`` and ``PKG_CONFIG_PATH`` are **prepended**
to those listed in ``prefixes``, if that is also set.
Multi-Script Installer
----------------------
......@@ -132,6 +126,7 @@ To use this recipe, you just have to simply do::
[scripts]
recipe = bob.buildout:scripts
Common Supported Options
========================
......@@ -167,48 +162,25 @@ nose-flags
command line, automatically. Use this to preset arguments you like running
all the time like ``-v``, for example.
Other Recipes
-------------
This package also provides recipes that allow for the discrete installation of
interpreters and support programs, lumped together with the ``scripts`` recipe
described above. You can use some of the options described above with these
recipes. For example, the ``prefixes``, ``eggs`` and ``extra-paths`` are
considered by all these recipes.
.. note::
Installation
------------
Use of these individual recipes should be done with care. The ``scripts``
recipe should be used by default, unless you have a special requirement that
is not covered by that recipe.
Follow our `installation`_ instructions. Then, using the Python interpreter
provided by the distribution, bootstrap and buildout this package::
python
This recipe generates **just** a python interpreter on the binary directory.
Extra options considered: ``interpreter``.
ipython
This recipe generates an IPython interpreter on the binary directory.
Extra options considered: ``interpreter``.
gdb-python
This recipe generates a gdb launcher using the python interpreter so you can
start your scripts directly typing ``gdb-python myscript.py``.
$ python bootstrap-buildout.py
$ ./bin/buildout
pylint
No extra options for this recipe.
nose
This recipe generates only the ``nosetests`` program. Extra options
considered are:``nose-flags``.
Contact
-------
coverage
This recipe generates only the ``coverage`` program. Extra options
considered are:``coverage-flags``.
For questions or reporting issues to this software package, contact our
development `mailing list`_.
sphinx
This recipe generates only the Sphinx documentation generator applications.
Extra options considered: none.
egg.scripts
This recipe generates only the scripts (and dependent scripts) for the
package. Extra options considered: ``dependent-scripts``.
.. Place your references here:
.. _bob: https://www.idiap.ch/software/bob
.. _installation: https://gitlab.idiap.ch/bob/bob/wikis/Installation
.. _mailing list: https://groups.google.com/forum/?fromgroups#!forum/bob-devel
......@@ -49,8 +49,8 @@ parser.add_option("--version",
parser.add_option("-t", "--accept-buildout-test-releases",
dest='accept_buildout_test_releases',
action="store_true", default=False,
help=("Normally, if you do not specify a --buildout-version, "
"the bootstrap script and buildout gets the newest "
help=("Normally, if you do not specify a --version, the "
"bootstrap script and buildout gets the newest "
"*final* versions of zc.buildout and its recipes and "
"extensions for you. If you use this flag, "
"bootstrap and buildout will get the newest releases "
......
......@@ -18,29 +18,38 @@ import pkg_resources
# -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
needs_sphinx = '1.3'
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.pngmath',
'sphinx.ext.ifconfig',
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
]
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.ifconfig',
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
]
# The viewcode extension appeared only on Sphinx >= 1.0.0
import sphinx
if sphinx.__version__ >= "1.0":
extensions.append('sphinx.ext.viewcode')
if sphinx.__version__ >= "1.4":
extensions.append('sphinx.ext.imgmath')
else:
extensions.append('sphinx.ext.pngmath')
# Always includes todos
todo_include_todos = True
# Generates auto-summary automatically
autosummary_generate = True
# If we are on OSX, the 'dvipng' path maybe different
dvipng_osx = '/opt/local/libexec/texlive/binaries/dvipng'
if os.path.exists(dvipng_osx): pngmath_dvipng = dvipng_osx
......
......@@ -13,20 +13,17 @@ setup(
version=version,
description="zc.buildout recipes to perform a variety of tasks required by Bob satellite packages",
keywords=['buildout', 'sphinx', 'nose', 'recipe', 'eggs', 'bob'],
url='http://github.com/bioidiap/bob.buildout',
license='GPLv3',
url='https://gitlab.idiap.ch/bob/bob.buildout',
license='BSD',
author='Andre Anjos',
author_email='andre.anjos@idiap.ch',
long_description=open('README.rst').read(),
# This line is required for any distutils based packaging.
packages=find_packages(),
include_package_data=True,
zip_safe=False,
entry_points = {
'zc.buildout': [
'develop = bob.buildout.develop:Recipe',
......@@ -57,7 +54,7 @@ setup(
'Environment :: Plugins',
'Framework :: Buildout :: Recipe',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'License :: OSI Approved :: BSD License',
'Topic :: Software Development :: Build Tools',
'Topic :: Software Development :: Libraries :: Python Modules',
'Natural Language :: English',
......
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