Skip to content

Commit

Permalink
Updates to package structure, license and ci
Browse files Browse the repository at this point in the history
  • Loading branch information
anjos committed Aug 3, 2016
1 parent 0476897 commit f594b18
Show file tree
Hide file tree
Showing 10 changed files with 103 additions and 748 deletions.
15 changes: 8 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
language: python
env:
global:
- secure: MPgfLy1TeHcTfPcRqnKAqzvDAeHoAGEf7+O6KqI0R71vtUc5tz/RdCmG/pbPzNRSo5m8nPWs4/R04enbC/mjb8ibxqZixTQ8ZLOEZDrLFwpzn7aVIS7Dr0dLrk1/gFQKUy1jpQF554VZK02dYz03E6UkjRLuyIn0aA1N0jJF2bM=
- secure: R//IYVHP3G4JQah/AhEhT8HCmESN5FsC1JGjFQK05/q9QFm6Ztgqk86EZ2bDA1DW0eTZ47dmyQ3wJwoWI6DcgQeWAIred/iK2ZtKAMefmvwRjnxEDcE+D9F2ZCOB0HNW5o7LtuwsbXWNE2Z880pOBKVkQJyFKLfnwkywOv6/irI=
- BOB_UPLOAD_WHEEL=1
matrix:
include:
- python: 2.7
env:
- secure: Xxn/9bwmKulVZX1zsoPbCIjNPxwC2PtN8J0kdDWRDV45ATUE0FIbh3CiWa26D7jFgSdUN9gUm8hbvjBbffnDlEnKQIKBzEO9E2q+R1dtBaevNZxOEQu9miM+GUYaf2Rr4ed8EAIHoKO0yGCOVRG+p+6qyBDVW9bhOqLNAESY6rc=
- secure: Qs6A6w5jj8NlxTjXt4v844IC2tE9117Zsx1lYlVeQN+baXD8Bo/bFBjGCTsnvruIZQRdnX/ZCT/Gece1Hqlw06Iy8WEfN8nPH1MR8e3+QqRY2okpbtAdGjC2CPdG6WKp8DjLchnZccWE8QV1YdfinJ0qAh6wguS86fTbyq/hyyo=
- BOB_DOCUMENTATION_SERVER=https://www.idiap.ch/software/bob/docs/latest/bioidiap/%s/master
- python: 3.3
- python: 3.4
- python: 3.5
Expand All @@ -14,13 +15,13 @@ before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq --force-yes libboost-all-dev libblitz1-dev libhdf5-serial-dev libatlas-dev libatlas-base-dev liblapack-dev texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
- pip install --upgrade pip
- pip install --find-links https://www.idiap.ch/software/bob/wheels/travis/ --use-wheel sphinx nose numpy coverage
- pip install --find-links https://www.idiap.ch/software/bob/wheels/travis/ --use-wheel sphinx nose coverage cpp-coveralls pillow
- pip install --find-links https://www.idiap.ch/software/bob/wheels/travis/ --use-wheel --pre -r requirements.txt coveralls
install:
- python bootstrap-buildout.py
- ./bin/buildout buildout:develop=. buildout:extensions=bob.buildout buildout:auto-checkout=
- ./bin/buildout
script:
- ./bin/python -c 'import pkg_resources; from bob.db.utfvp import get_config; print(get_config())'
- ./bin/python -c 'from bob.db.utfvp import get_config; print(get_config())'
- ./bin/bob_dbmanage.py utfvp download
- ./bin/coverage run --source=bob.db.utfvp ./bin/nosetests -sv
- ./bin/sphinx-build -b doctest doc sphinx
Expand Down
674 changes: 0 additions & 674 deletions COPYING

This file was deleted.

24 changes: 24 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Copyright (c) 2016, Andre Anjos - Idiap Research Institute
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer. 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. Neither the name of the Idiap Research Institute 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.
29 changes: 13 additions & 16 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.. vim: set fileencoding=utf-8 :
.. Pedro Tome <pedro.tome@idiap.ch>
.. Tus Jan 13 19:35:05 CEST 2015
.. Wed 03 Aug 2016 09:05:32 CEST
.. image:: http://img.shields.io/badge/docs-stable-yellow.png
:target: http://pythonhosted.org/bob.db.utfvp/index.html
Expand All @@ -20,26 +19,24 @@
:target: http://www.sas.ewi.utwente.nl


==============================================================================
=============================================
UTFVP Fingervein Database Interface for Bob
==============================================================================
=============================================

This package contains an interface for the evaluation protocol of the `UTFVP Fingervein Database <http://www.sas.ewi.utwente.nl>`_.
This package does not contain the original `UTFVP Fingervein <http://www.sas.ewi.utwente.nl>`_ data files, which need to be obtained through the links above.
This package contains an interface for the evaluation protocols of the `UTFVP
Fingervein Database`_. Notice this package does not contain the raw data files
from this dataset, which need to be obtained through the link above.


Installation
------------
To install this package -- alone or together with other `Packages of Bob <https://github.com/idiap/bob/wiki/Packages>`_ -- please read the `Installation Instructions <https://github.com/idiap/bob/wiki/Installation>`_.
For Bob_ to be able to work properly, some dependent packages are required to be installed.
Please make sure that you have read the `Dependencies <https://github.com/idiap/bob/wiki/Dependencies>`_ for your operating system.

Documentation
-------------
For further documentation on this package, please read the `Stable Version <http://pythonhosted.org/bob.db.utfvp/index.html>`_ or the `Latest Version <https://www.idiap.ch/software/bob/docs/latest/bioidiap/bob.db.utfvp/master/index.html>`_ of the documentation.
For a list of tutorials on this or the other packages ob Bob_, or information on submitting issues, asking questions and starting discussions, please visit its website.

.. _bob: https://www.idiap.ch/software/bob

This package only contains database access functions so it is easy to
programatically reproduce evaluation results obtained in papers. You normally
don't install this package, unless you're modifying it. Instead, install one of
our top-level frameworks for vein image processing, such as ``bob.bio.vein``.


.. Write your references here:
.. _bob: https://www.idiap.ch/software/bob
.. _utfvp fingervein database: http://www.sas.ewi.utwente.nl
1 change: 1 addition & 0 deletions bob/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# see https://docs.python.org/3/library/pkgutil.html
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
1 change: 1 addition & 0 deletions bob/db/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# see https://docs.python.org/3/library/pkgutil.html
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
55 changes: 38 additions & 17 deletions bootstrap-buildout.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@

from optparse import OptionParser

tmpeggs = tempfile.mkdtemp()
__version__ = '2015-07-01'
# See zc.buildout's changelog if this version is up to date.

tmpeggs = tempfile.mkdtemp(prefix='bootstrap-')

usage = '''\
[DESIRED PYTHON FOR BUILDOUT] bootstrap.py [options]
Expand All @@ -40,13 +43,14 @@
'''

parser = OptionParser(usage=usage)
parser.add_option("-v", "--version", help="use a specific zc.buildout version")

parser.add_option("--version",
action="store_true", default=False,
help=("Return bootstrap.py 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 --version, the "
"bootstrap script and buildout gets the newest "
help=("Normally, if you do not specify a --buildout-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 "
Expand All @@ -59,25 +63,33 @@
parser.add_option("--allow-site-packages",
action="store_true", default=False,
help=("Let bootstrap.py use existing site packages"))
parser.add_option("--buildout-version",
help="Use a specific zc.buildout version")
parser.add_option("--setuptools-version",
help="use a specific setuptools version")

help="Use a specific setuptools version")
parser.add_option("--setuptools-to-dir",
help=("Allow for re-use of existing directory of "
"setuptools versions"))

options, args = parser.parse_args()
if options.version:
print("bootstrap.py version %s" % __version__)
sys.exit(0)


######################################################################
# load/install setuptools

try:
if options.allow_site_packages:
import setuptools
import pkg_resources
from urllib.request import urlopen
except ImportError:
from urllib2 import urlopen

ez = {}
exec(urlopen('https://bootstrap.pypa.io/ez_setup.py').read(), ez)
if os.path.exists('ez_setup.py'):
exec(open('ez_setup.py').read(), ez)
else:
exec(urlopen('https://bootstrap.pypa.io/ez_setup.py').read(), ez)

if not options.allow_site_packages:
# ez_setup imports site, which adds site packages
Expand All @@ -88,12 +100,19 @@
# We can't remove these reliably
if hasattr(site, 'getsitepackages'):
for sitepackage_path in site.getsitepackages():
sys.path[:] = [x for x in sys.path if sitepackage_path not in x]
# Strip all site-packages directories from sys.path that
# are not sys.prefix; this is because on Windows
# sys.prefix is a site-package directory.
if sitepackage_path != sys.prefix:
sys.path[:] = [x for x in sys.path
if sitepackage_path not in x]

setup_args = dict(to_dir=tmpeggs, download_delay=0)

if options.setuptools_version is not None:
setup_args['version'] = options.setuptools_version
if options.setuptools_to_dir is not None:
setup_args['to_dir'] = options.setuptools_to_dir

ez['use_setuptools'](**setup_args)
import setuptools
Expand All @@ -110,7 +129,12 @@

ws = pkg_resources.working_set

setuptools_path = ws.find(
pkg_resources.Requirement.parse('setuptools')).location

# Fix sys.path here as easy_install.pth added before PYTHONPATH
cmd = [sys.executable, '-c',
'import sys; sys.path[0:0] = [%r]; ' % setuptools_path +
'from setuptools.command.easy_install import main; main()',
'-mZqNxd', tmpeggs]

Expand All @@ -123,11 +147,8 @@
if find_links:
cmd.extend(['-f', find_links])

setuptools_path = ws.find(
pkg_resources.Requirement.parse('setuptools')).location

requirement = 'zc.buildout'
version = options.version
version = options.buildout_version
if version is None and not options.accept_buildout_test_releases:
# Figure out the most recent final version of zc.buildout.
import setuptools.package_index
Expand Down Expand Up @@ -167,7 +188,7 @@ def _final_version(parsed_version):
cmd.append(requirement)

import subprocess
if subprocess.call(cmd, env=dict(os.environ, PYTHONPATH=setuptools_path)) != 0:
if subprocess.call(cmd) != 0:
raise Exception(
"Failed to execute command:\n%s" % repr(cmd)[1:-1])

Expand Down
8 changes: 5 additions & 3 deletions buildout.cfg
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
; vim: set fileencoding=utf-8 :
; Pedro Tome <pedro.tome@idiap.ch>
; Tue Jan 16 19:35:15 CEST 2015
; Tue 02 Aug 2016 15:44:30 CEST

[buildout]
parts = scripts
eggs = bob.db.utfvp
bob.db.base
extensions = bob.buildout
develop = .

verbose = true
newest = false

[scripts]
recipe = bob.buildout:scripts
dependent-scripts=true
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
setuptools
six
bob.io.base
bob.db.base
Expand Down
43 changes: 13 additions & 30 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,43 +1,25 @@
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Pedro Tome <Pedro.Tome@idiap.ch>
#
# Copyright (C) 2014-2015 Idiap Research Institute, Martigny, Switzerland
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

from setuptools import setup, find_packages, dist
from setuptools import setup, dist
dist.Distribution(dict(setup_requires=['bob.extension']))

from bob.extension.utils import load_requirements
from bob.extension.utils import load_requirements, find_packages
install_requires = load_requirements()

# Define package version
version = open("version.txt").read().rstrip()


# The only thing we do in this file is to call the setup() function with all
# parameters that define our package.
setup(

name='bob.db.utfvp',
version=version,
description='UTFVP Database Access API for Bob',
url='https://github.com/bioidiap/bob.db.utfvp',
license='GPLv3',
author='Pedro Tome',
author_email='pedro.tome@idiap.ch',
version=open("version.txt").read().rstrip(),
description='VERA Fingervein Database Access API for Bob',
url='https://github.com/bioidiap/bob.db.vera',
license='BSD',

author='Andre Anjos,Pedro Tome',
author_email='andre.anjos@idiap.ch,pedro.tome@idiap.ch',

keywords='fingervein recognition, bob, bob.db, UTFVP',

long_description=open('README.rst').read(),

# This line is required for any distutils based packaging.
Expand All @@ -48,6 +30,7 @@
install_requires=install_requires,

entry_points = {
# bob database declaration
'bob.db': [
'utfvp = bob.db.utfvp.driver:Interface',
],
Expand All @@ -60,7 +43,7 @@
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
Expand Down

0 comments on commit f594b18

Please sign in to comment.