For build/install I don't really know in fact, I don't who which is better
or if it's a real problem. Maybe for packaging?

For the doc, isn't it possible to not include the dir intead of removing
them after?

Maybe I didn't understood what the "build" phase was for. For what I
understood, it was to build an image of the instalation, so will all dir. I
was wrong?

thanks :)




On Mon, Feb 24, 2014 at 4:21 PM, Rémi Palancher <notifications@github.com>wrote:

> In setup.py:
>
> > -
> > +        if self.exclude_doc is 1:
> > +            # self.distribution.data_files is list of tuples,
> > +            # each tuple is a (directory name, [list of files]).
> > +            # we remove here all files that start with 'doc/'
> > +            for data_tuple in self.distribution.data_files:
> > +                data_file_list = data_tuple[1]
> > +                for data_file in data_file_list:
> > +                    if data_file.startswith('doc/'):
> > +                        print "removing doc file {0}".format(data_file)
> > +                        data_file_list.remove(data_file)
> > +            # finally cleanup list of data files to remove empty dirs
> > +            self.distribution.data_files = [(data_dir, data_files) \
> > +                                               for data_dir, data_files \
> > +                                               in self.distribution.data_files \
> > +                                               if len(data_files) != 0 ]
>
> The empty directories (/var/run/shinken, /var/log/shinken) are created at
> build time in build_config.copy_objects_file() of the setup.py. I can't
> figure why they are created at build time instead of install time though.
>
> There are many empty dirs once the doc files are removed. Here is the full
> list:
>
>    - /var/lib/shinken/doc
>    - /var/lib/shinken/doc/source
>    - /var/lib/shinken/doc/source/01_about
>    - /var/lib/shinken/doc/source/02_gettingstarted
>    - /var/lib/shinken/doc/source/02_gettingstarted/installations
>    - /var/lib/shinken/doc/source/03_configuringshinken
>    - /var/lib/shinken/doc/source/04_runningshinken
>    - /var/lib/shinken/doc/source/05_thebasics
>    - /var/lib/shinken/doc/source/06_medium
>    - /var/lib/shinken/doc/source/07_advancedtopics
>    - /var/lib/shinken/doc/source/08_configobjects
>    - /var/lib/shinken/doc/source/09_architecture
>    - /var/lib/shinken/doc/source/10_troubleshooting
>    - /var/lib/shinken/doc/source/11_integrationwithothersoftware
>    - /var/lib/shinken/doc/source/12_securityandperformancetuning
>    - /var/lib/shinken/doc/source/13_how_to_monitor
>    - /var/lib/shinken/doc/source/14_how_to_contribute
>    - /var/lib/shinken/doc/source/15_development
>    - /var/lib/shinken/doc/source/89_packages
>    - /var/lib/shinken/doc/source/89_packages/snmp
>    - /var/lib/shinken/doc/source/89_packages/webui
>    - /var/lib/shinken/doc/source/99_references
>    - /var/lib/shinken/doc/source/_static/images
>    - /var/lib/shinken/doc/source/_static/images/http/de3.php.net/images
>    - /var/lib/shinken/doc/source/_static/images/official/images
>    - /var/lib/shinken/doc/source/_static/images/official/images/callouts
>    - /var/lib/shinken/doc/theme/sphinx_rtd_theme
>    - /var/lib/shinken/doc/theme/sphinx_rtd_theme/static/css
>    - /var/lib/shinken/doc/theme/sphinx_rtd_theme/static/font
>    - /var/lib/shinken/doc/theme/sphinx_rtd_theme/static/js
>    - /var/lib/shinken/doc/tools
>
> Only these dirs are excluded by the above list comprehension, and they are
> related to doc.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/naparuba/shinken/pull/1091/files#r9994566>
> .
>