Commit b7a93b6d authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

remove old code

parent 9af47116
include README.rst CHANGELOG LICENSE buildout.cfg requirements.txt version.txt
include test-requirements.txt
recursive-include doc doc/plot *.rst *.png *.py *.ico
recursive-include doc *.rst *.png *.py *.ico
......@@ -47,22 +47,7 @@ add/remove its name in appropriate places.
Releasing a new version of Bob
Please run::
$ # prepare a development environment for this package
$ buildout
$ bin/python ./bob/script/ requirements.txt > requirements.txt
This will give you the latest tag version of public packages release on PyPI.
* Find the same latest tag information of private packages using Gitlab tags.
For private packages you cannot use the ```` script.
* Update private-requirements.txt similar to requirements.txt
* Put the same tags in ``conda/meta.yaml`` too. You need to pin like this:
``bob.extension 2.4.5``.
* Tag and push.
* Remove the pins again to relax the dependencies while in master.
Use the release script from bob.admin to do this.
.. External References
# Andre Anjos <>
# Tiago de Freitas Pereira <>
# Amir Mohammadi <>
# Mon 20 Jul 17:30:00 CEST 2015
# Lists the final version of a given package in PyPI
import pkg_resources # for bob import to work properly
import sys
import os
def main():
from bob.utils import get_releases, get_max_version
if len(sys.argv) != 2:
print("usage: %s <requirements.txt>" % os.path.basename(sys.argv[0]))
dependencies = [l.rstrip("\n") for l in open(sys.argv[1], 'r').readlines()]
for d in dependencies:
d = d.split("==")[0].strip()
versions = get_releases(d)
print("{0} == {1}".format(
d, '{}.{}.{}'.format(*get_max_version(versions).version)))
if __name__ == '__main__':
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Tiago de Freitas Pereira <>
# Wed 05 Aug 11:36 2015 CEST
# Copyright (C) 2011-2014 Idiap Research Institute, Martigny, Switzerland
import distutils.version
import pkg_resources
import re
import requests
def get_config():
Returns a string containing the configuration information.
import bob.extension
return bob.extension.get_config(__name__)
def get_releases(package):
Given a package name, get the release versions
url = "{}/json".format(package)
return requests.get(url).json()["releases"]
def get_max_version(versions):
v = list(reversed(sorted([distutils.version.StrictVersion(k)
for k in versions])))
final = [k for k in v if not k.prerelease]
if final:
return final[0]
return v[0]
except Exception:
v = list(reversed(sorted([distutils.version.LooseVersion(k)
for k in versions])))
final = [k for k in v if not'[a-z]', k.vstring)]
if final:
return final[0]
return v[0]
def get_dependencies(pkg_name="bob"):
Given a package name, get the dependency list
package = pkg_resources.working_set.by_key[pkg_name]
return [str(r) for r in package.requires()]
; vim: set fileencoding=utf-8 :
; Wed Apr 4 15:29:11 CEST 2018
; Tue Apr 17 13:50:43 CEST 2018
parts = scripts
develop = .
eggs = envs
eggs = bob
extensions = bob.buildout
newest = false
verbose = true
Supports Markdown
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