Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob
Commits
4beb4d6e
Commit
4beb4d6e
authored
Apr 04, 2018
by
Amir MOHAMMADI
Browse files
Make Bob depend on all Bob packages.
parent
10e4995c
Pipeline
#18284
failed with stage
in 3 minutes and 42 seconds
Changes
10
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
README.rst
View file @
4beb4d6e
...
...
@@ -36,21 +36,32 @@ For the maintainers
Below are some instructions for the maintainers of the package.
Updat
ing
the
dependenc
ies
=========================
Adding/Remov
ing
a
dependenc
y package
=========================
===========
If you want to update the version of the dependency packages, run the following
commands::
To remove or add a package from bob, search for its name (or the name of a
similar package in case you are adding a new package) in this repository and
add/remove its name in appropriate places.
$ python ./bob/script/get_versions.py bob > requirements.txt
$ git commit requirements.txt -m "Update requeriments" && git push
Releasing a new version of Bob
==============================
Removing a dependency package
=============================
Please run::
To remove a package on bob, just remove the package name in the file
(`requirements.txt`).
$ # prepare a development environment for this package
$ buildout
$ bin/python ./bob/script/get_versions.py 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 ``get_versions.py`` 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.
.. External References
...
...
bob/script/get_versions.py
View file @
4beb4d6e
# Andre Anjos <andre.anjos@idiap.ch>
# Tiago de Freitas Pereira <tiago.pereira@idiap.ch>
# Amir Mohammadi <amir.mohammadi@idipa.ch>
# Mon 20 Jul 17:30:00 CEST 2015
# Lists the final version of a given package in PyPI
# Uses the package 'pkgtools' for such.
import
pkg_resources
# for bob import to work properly
import
sys
import
os
def
main
():
try
:
from
bob.utils
import
get_dependencies
,
get_releases
,
get_max_version
if
len
(
sys
.
argv
)
!=
2
:
print
(
"usage: %s <package>"
%
os
.
path
.
basename
(
sys
.
argv
[
0
]))
sys
.
exit
(
1
)
dependencies
=
get_dependencies
(
pkg_name
=
sys
.
argv
[
1
])
dependencies
.
remove
(
'setuptools'
)
for
d
in
dependencies
:
d
=
d
.
split
(
"=="
)[
0
].
strip
()
versions
=
get_releases
(
d
)
print
(
"{0} == {1}"
.
format
(
d
,
'{}.{}.{}'
.
format
(
*
get_max_version
(
versions
).
version
)))
except
ImportError
:
print
(
"Package pkgtools required, please install it. "
"<https://pypi.python.org/pypi/pkgtools/>"
)
raise
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
]))
sys
.
exit
(
1
)
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__'
:
...
...
bob/utils.py
View file @
4beb4d6e
...
...
@@ -7,8 +7,8 @@
import
distutils.version
import
pkg_resources
import
pkgtools.pypi
import
re
import
requests
def
get_config
():
...
...
@@ -23,10 +23,8 @@ def get_releases(package):
"""
Given a package name, get the release versions
"""
try
:
return
pkgtools
.
pypi
.
PyPIJson
(
package
).
retrieve
()[
'releases'
].
keys
()
except
Exception
:
return
[]
url
=
"https://pypi.org/pypi/{}/json"
.
format
(
package
)
return
requests
.
get
(
url
).
json
()[
"releases"
]
def
get_max_version
(
versions
):
...
...
buildout.cfg
View file @
4beb4d6e
...
...
@@ -5,7 +5,6 @@
[buildout]
parts = scripts
eggs = bob
pkgtools
bob.extension
nose-exclude
...
...
@@ -23,3 +22,4 @@ newest = false
[scripts]
recipe = bob.buildout:scripts
dependent-scripts = true
conda/meta.yaml
View file @
4beb4d6e
...
...
@@ -7,8 +7,10 @@ package:
build
:
number
:
{{
environ.get('BOB_BUILD_NUMBER'
,
0)
}}
run_exports
:
-
{{
pin_subpackage(name)
}}
ignore_run_exports
:
{
%
for package in resolved_packages('host') %
}
-
{{
package.split()
[
0
]
}}
{
%
endfor %
}
script
:
-
cd {{ project_dir }}
{
%
if environ.get('BUILD_EGG') %
}
...
...
@@ -20,19 +22,25 @@ requirements:
host
:
-
python {{ python }}
-
setuptools {{ setuptools }}
-
bob-devel {{ bob_devel }}
# the list below contains all (public and private) packages. This is/should
# be the same list as order.txt in bob.nightlies. Please keep public and
# private packages list separate.
# Public packages:
-
bob.buildout
-
bob.extension
-
bob.blitz
-
bob.core
-
bob.io.base
-
bob.sp
-
bob.ap
-
bob.math
-
bob.measure
-
bob.db.base
-
bob.io.audio
-
bob.io.image
-
bob.db.base
-
bob.io.video
-
bob.io.matlab
-
bob.io.audio
-
bob.sp
-
bob.ap
-
bob.ip.base
-
bob.ip.color
-
bob.ip.draw
...
...
@@ -41,9 +49,9 @@ requirements:
-
bob.learn.libsvm
-
bob.learn.linear
-
bob.learn.mlp
-
bob.learn.em
-
bob.learn.boosting
-
bob.db.iris
-
bob.learn.em
-
bob.db.wine
-
bob.db.mnist
-
bob.db.atnt
...
...
@@ -51,9 +59,68 @@ requirements:
-
bob.ip.optflow.hornschunck
-
bob.ip.optflow.liu
-
bob.ip.flandmark
-
gridtk
-
bob.ip.qualitymeasure
-
bob.ip.skincolorfilter
-
bob.ip.facelandmarks
-
bob.ip.dlib
-
bob.db.arface
-
bob.db.asvspoof
-
bob.db.asvspoof2017
-
bob.db.atvskeystroke
-
bob.db.avspoof
-
bob.db.banca
-
bob.db.biosecure
-
bob.db.biosecurid.face
-
bob.db.casme2
-
bob.db.caspeal
-
bob.db.cohface
-
bob.db.frgc
-
bob.db.gbu
-
bob.db.hci_tagging
-
bob.db.ijba
-
bob.db.kboc16
-
bob.db.lfw
-
bob.db.livdet2013
-
bob.db.mobio
-
bob.db.msu_mfsd_mod
-
bob.db.multipie
-
bob.db.nist_sre12
-
bob.db.putvein
-
bob.db.replay
-
bob.db.replaymobile
-
bob.db.scface
-
bob.db.utfvp
-
bob.db.verafinger
-
bob.db.fv3d
-
bob.db.voicepa
-
bob.db.xm2vts
-
bob.db.youtube
-
bob.db.pericrosseye
-
bob.db.cuhk_cufs
-
bob.bio.base
-
bob.bio.gmm
-
bob.bio.face
-
bob.bio.spear
-
bob.bio.video
-
bob.bio.vein
-
bob.db.voxforge
-
bob.pad.base
-
bob.pad.face
# Private packages:
-
bob.db.hkpu
-
bob.db.thufvdt
-
bob.db.mmcbnu6k
-
bob.db.hmtvein
-
bob.db.oulunpu
-
bob.db.uvad
run
:
-
python
-
setuptools
run_constrained
:
{
%
for package in resolved_packages('host') %
}
-
{{
package
}}
{
%
endfor %
}
test
:
imports
:
...
...
@@ -70,13 +137,14 @@ test:
-
coverage
-
sphinx
-
sphinx_rtd_theme
-
pkgtools
-
cmake
-
pkg-config
-
freetype
-
{{
compiler('c')
}}
-
{{
compiler('cxx')
}}
-
bob.buildout
{
%
for package in resolved_packages('host') %
}
-
{{
package
}}
{
%
endfor %
}
about
:
home
:
https://www.idiap.ch/software/bob/
...
...
dependencies.png
deleted
100644 → 0
View file @
10e4995c
542 KB
private-requirements.txt
0 → 100644
View file @
4beb4d6e
bob.db.hkpu
bob.db.thufvdt
bob.db.mmcbnu6k
bob.db.hmtvein
bob.db.oulunpu
bob.db.uvad
requirements.txt
View file @
4beb4d6e
bob.buildout
bob.extension
bob.blitz
bob.core
bob.io.base
bob.sp
bob.ap
bob.math
bob.measure
bob.db.base
bob.io.audio
bob.io.image
bob.db.base
bob.io.video
bob.io.matlab
bob.io.audio
bob.sp
bob.ap
bob.ip.base
bob.ip.color
bob.ip.draw
...
...
@@ -19,9 +20,9 @@ bob.learn.activation
bob.learn.libsvm
bob.learn.linear
bob.learn.mlp
bob.learn.em
bob.learn.boosting
bob.db.iris
bob.learn.em
bob.db.wine
bob.db.mnist
bob.db.atnt
...
...
@@ -29,3 +30,51 @@ bob.ip.facedetect
bob.ip.optflow.hornschunck
bob.ip.optflow.liu
bob.ip.flandmark
gridtk
bob.ip.qualitymeasure
bob.ip.skincolorfilter
bob.ip.facelandmarks
bob.ip.dlib
bob.db.arface
bob.db.asvspoof
bob.db.asvspoof2017
bob.db.atvskeystroke
bob.db.avspoof
bob.db.banca
bob.db.biosecure
bob.db.biosecurid.face
bob.db.casme2
bob.db.caspeal
bob.db.cohface
bob.db.frgc
bob.db.gbu
bob.db.hci_tagging
bob.db.ijba
bob.db.kboc16
bob.db.lfw
bob.db.livdet2013
bob.db.mobio
bob.db.msu_mfsd_mod
bob.db.multipie
bob.db.nist_sre12
bob.db.putvein
bob.db.replay
bob.db.replaymobile
bob.db.scface
bob.db.utfvp
bob.db.verafinger
bob.db.fv3d
bob.db.voicepa
bob.db.xm2vts
bob.db.youtube
bob.db.pericrosseye
bob.db.cuhk_cufs
bob.bio.base
bob.bio.gmm
bob.bio.face
bob.bio.spear
bob.bio.video
bob.bio.vein
bob.db.voxforge
bob.pad.base
bob.pad.face
setup.py
View file @
4beb4d6e
...
...
@@ -21,8 +21,11 @@
from
setuptools
import
setup
,
find_packages
requeriments
=
[
l
.
rstrip
(
"
\n
"
)
for
l
in
open
(
"requirements.txt"
,
'r'
).
readlines
()]
version
=
open
(
"version.txt"
).
read
().
rstrip
()
requeriments
=
[
l
.
rstrip
(
"
\n
"
)
for
l
in
open
(
"requirements.txt"
,
'r'
).
readlines
()]
prequeriments
=
[
l
.
rstrip
(
"
\n
"
)
for
l
in
open
(
"private-requirements.txt"
,
'r'
).
readlines
()]
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.
...
...
@@ -50,16 +53,20 @@ setup(
# on the current system will be installed locally and only visible to the
# scripts of this package. Don't worry - You won't need administrative
# privileges when using buildout.
install_requires
=
[
"setuptools"
]
+
requeriments
,
classifiers
=
[
'Development Status :: 5 - Production/Stable'
,
'License :: OSI Approved :: BSD License'
,
'Intended Audience :: Education'
,
'Intended Audience :: Science/Research'
,
'Natural Language :: English'
,
'Programming Language :: Python'
,
'Programming Language :: Python :: 3'
,
install_requires
=
[
"setuptools"
],
extras_require
=
{
'public'
:
requeriments
,
'private'
:
prequeriments
,
},
classifiers
=
[
'Development Status :: 5 - Production/Stable'
,
'License :: OSI Approved :: BSD License'
,
'Intended Audience :: Education'
,
'Intended Audience :: Science/Research'
,
'Natural Language :: English'
,
'Programming Language :: Python'
,
'Programming Language :: Python :: 3'
,
],
)
test-requirements.txt
View file @
4beb4d6e
pkgtools
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment