Proposal: remove buildout.cfg, develop.cfg, and bootstrap-buildout.py files from our repos

17 views
Skip to first unread message

Amir Mohammadi

unread,
Aug 24, 2016, 10:23:55 AM8/24/16
to bob-devel
Hi,

Buildout is a great tool and gives us a lot of flexibility but most people don't know how to use it.
We have a really good guide here: https://gitlab.idiap.ch/bob/bob/wikis/build#using-zcbuildout-for-production but nobody uses that and people just use the default config files that comes with the package and just use that.
From my understanding, for each experiment and not each package you create a folder, bootstrap, write a custom config file that meets your needs and then run buildout. Later, you can modify your buildout config file however you want to meet your needs (e.g. use latest commit of a package, use another branch, ...).
Also, we don't really need buildout config files for our build process.

My suggestion is that we remove all of these buildout related files and instead point to a wiki page on how you should really be using buildout.

Best regards,
Amir

Tiago Freitas Pereira

unread,
Aug 24, 2016, 10:54:38 AM8/24/16
to bob-...@googlegroups.com
I think this is a bit extreme.
The .cfg files in our packages are very handy, specially for development.

If people don't know how to use it properly, they should learn.



--
-- You received this message because you are subscribed to the Google Groups bob-devel group. To post to this group, send email to bob-...@googlegroups.com. To unsubscribe from this group, send email to bob-devel+unsubscribe@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/bob-devel or directly the project website at http://idiap.github.com/bob/
---
You received this message because you are subscribed to the Google Groups "bob-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bob-devel+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Tiago

Amir Mohammadi

unread,
Aug 24, 2016, 11:05:04 AM8/24/16
to bob-devel
They are handy but everyone has different needs and we cannot provide a config file that works for all.
Most of the time you need to only get some packages from source code and use the stable version from the rest.
In our new gitlab-ci process the new buildout config files are not really used. Instead you can just run
python setup.py install

Now that we have 2 config files it is even more confusing to explain to people on how they should use it.

Today, Sushil and Marc were complaining that the new buildout config files were not working.
In case of Marc, he had to write a custom config file because none of buildout.cfg or develop.cfg met his needs.

Moreover, you can have some config files for yourself lying around and use them whenever you need them.
They don't have to come with repos and be maintained.

Amir

André Anjos

unread,
Aug 24, 2016, 11:19:58 AM8/24/16
to bob-...@googlegroups.com
The current buildout.cfg files are stock files - they have nothing special. We could create them on-the-fly during the builds, except, perhaps, for packages like bob.nightlies.

The develop.cfg files are another story - they are a bit more difficult to correctly create, as they need insight in where the repositories live.

I think it is important to train people to better use buildout as this is normally a development advantage. Nobody should be using a library's buildout.cfg file, except when developing those. However, some packages are meant as "development" warehouses, so it is normally OK to use buildouts in those packages to bootstrap an installation. This is the case, for example, on `bob.bio.vein` and related packages.

Going all the way to remove the cfg files from the packages is probably a bit too much and will leave the people w/o a default alternative. IMO, most people prefer to have a base working environment, copy'n'paste from that and change it to suite their needs rather than starting from scratch.

A

--
Dr. André Anjos
Idiap Research Institute
Centre du Parc - rue Marconi 19
CH-1920 Martigny, Suisse
Phone: +41 27 721 7763
Fax: +41 27 721 7712
http://andreanjos.org

Manuel Günther

unread,
Aug 24, 2016, 11:46:29 AM8/24/16
to bob-devel
I agree with Andre and Tiago. Removing the ``buildout.cfg`` files will IMHO create more trouble than keeping them.
Indeed, if you have custom requirements (like Marc had), you need to write your own ``buildout.cfg``. 
However, I think it is better to start from an existing file rather than needing to write one from scratch.
There might be some options (like the ``dependent-scripts`` in the ``[scripts]`` section) which might not be obvious.

Additionally, sometimes the ``buildout.cfg`` can add packages that are usually not required, but might be useful. For example in ``bob.bio.base``, ``gridtk`` is optional and can be added on need. 
Also, sometimes I have developed custom versions of ``buildout.cfg``, e.g., when there is no default package on PyPI. One example is in ``bob.bio.csu``, where I have added (and documented) a command line to tell, where to find the CSU face recognition resources:
(I just realized that the ``buildout.cfg`` in this package is the develop version)

Keeping the ``bootstrap-buildout.py`` inside the package would have the advantage that -- theoretically -- one would be able to run buildout without internet connection (once the package is downloaded and all dependencies are installed locally), e.g., using ``./bin/buildout -o``.
Also, it makes us more independent of possibly screwed-up updates of the ``bootstrap-buildout.py``, or the unavailability of the ``pypa.io`` server.
On the other hand, updating the file in all packages (if there is an update online, which happens **very** rarely) would be a pain.
Maybe, for the moment, we can leave it inside, and when it should happen that there is a new version of  ``bootstrap-buildout.py``, we can start this discussion again.

Manuel
Reply all
Reply to author
Forward
0 new messages