Commit d109046b authored by Manuel Günther's avatar Manuel Günther

Implemented versioning by version.txt

parent 43a07229
include LICENSE README.rst bootstrap.py buildout.cfg requirements.txt include LICENSE README.rst bootstrap.py buildout.cfg requirements.txt version.txt
recursive-include doc conf.py doxygen.rc *.rst recursive-include doc conf.py doxygen.rc *.rst
recursive-include bob/learn/libsvm *.cpp *.h recursive-include bob/learn/libsvm *.cpp *.h
recursive-include bob/learn/libsvm/data *.* recursive-include bob/learn/libsvm/data *.*
...@@ -13,11 +13,12 @@ from bob.blitz.extension import Extension, Library, build_ext ...@@ -13,11 +13,12 @@ from bob.blitz.extension import Extension, Library, build_ext
from bob.extension.utils import load_requirements from bob.extension.utils import load_requirements
build_requires = load_requirements() build_requires = load_requirements()
# Define package version
version = open("version.txt").read().rstrip()
packages = ['boost'] packages = ['boost']
boost_modules = ['system', 'filesystem'] boost_modules = ['system', 'filesystem']
version = '2.0.0a0'
# process libsvm requirement # process libsvm requirement
import os import os
from distutils.version import LooseVersion from distutils.version import LooseVersion
...@@ -91,15 +92,15 @@ class libsvm: ...@@ -91,15 +92,15 @@ class libsvm:
# now check for user requirements # now check for user requirements
for candidate in candidates: for candidate in candidates:
version = libsvm_version(candidate) vv = libsvm_version(candidate)
available = LooseVersion(version) available = LooseVersion(vv)
if (operator == '<' and available < required) or \ if (operator == '<' and available < required) or \
(operator == '<=' and available <= required) or \ (operator == '<=' and available <= required) or \
(operator == '>' and available > required) or \ (operator == '>' and available > required) or \
(operator == '>=' and available >= required) or \ (operator == '>=' and available >= required) or \
(operator == '==' and available == required): (operator == '==' and available == required):
self.include_directory = os.path.dirname(candidate) self.include_directory = os.path.dirname(candidate)
self.version = version self.version = vv
found = True found = True
break break
......
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