The code below will mark everything in reportlab.pdfbase as a hidden import
(which may be more than you need). The file hook-sphinx.py provides an
example.

from hookutils import collect_submodules


hiddenimports = collect_submodules('reportlab.pdfbase')


On Fri, Feb 7, 2014 at 3:44 PM, Michael Hipp <notifications@github.com>wrote:

> In PyInstaller/hooks/hook-reportlab.pdfbase._fontdata.py:
>
> > +    'reportlab.pdfbase._fontdata_enc_winansi',
> > +    'reportlab.pdfbase._fontdata_enc_zapfdingbats',
> > +    'reportlab.pdfbase._fontdata_widths_courier',
> > +    'reportlab.pdfbase._fontdata_widths_courierbold',
> > +    'reportlab.pdfbase._fontdata_widths_courierboldoblique',
> > +    'reportlab.pdfbase._fontdata_widths_courieroblique',
> > +    'reportlab.pdfbase._fontdata_widths_helvetica',
> > +    'reportlab.pdfbase._fontdata_widths_helveticabold',
> > +    'reportlab.pdfbase._fontdata_widths_helveticaboldoblique',
> > +    'reportlab.pdfbase._fontdata_widths_helveticaoblique',
> > +    'reportlab.pdfbase._fontdata_widths_symbol',
> > +    'reportlab.pdfbase._fontdata_widths_timesbold',
> > +    'reportlab.pdfbase._fontdata_widths_timesbolditalic',
> > +    'reportlab.pdfbase._fontdata_widths_timesitalic',
> > +    'reportlab.pdfbase._fontdata_widths_timesroman',
> > +    'reportlab.pdfbase._fontdata_widths_zapfdingbats',
>
> I have no idea, I don't know the internals of ReportLab that well. All
> those imports come from a certain directory within RL. I suppose we could
> just walk that directory and add everything starting with '_fontdata'. Is
> that what you're thinking of? Below is a listing of that directory. I could
> ask Andy, et al on the ReportLab user's list if there is a better way.
> Michael λ ls -l total 195 -rw-r--r--    1 michael  Administ      299 Feb  4
> 19:37 __init__.py -rw-r--r--    1 michael  Administ     1887 Feb  4 19:37
> _can_cmap_data.py -rw-r--r--    1 michael  Administ    31714 Feb  4 19:37
> _cidfontdata.py -rw-r--r--    1 michael  Administ    10414 Feb  4 19:37
> _fontdata.py -rw-r--r--    1 michael  Administ     3086 Feb  4 19:37
> _fontdata_enc_macexpert.py -rw-r--r--    1 michael  Administ     2969 Feb
> 4 19:37 _fontdata_enc_macroman.py -rw-r--r--    1 michael  Administ
> 2330 Feb  4 19:37 _fontdata_enc_pdfdoc.py -rw-r--r--    1 michael
> Administ     1844 Feb  4 19:37 _fontdata_enc_standard.py -rw-r--r--    1
> michael  Administ     3217 Feb  4 19:37 _fontdata_enc_symbol.py
> -rw-r--r--    1 michael  Administ     3040 Feb  4 19:37
> _fontdata_enc_winansi.py -rw-r--r--    1 michael  Administ     2242 Feb  4
> 19:37 _fontdata_enc_zapfdingbats.py -rw-r--r--    1 michael  Administ
> 3893 Feb  4 19:37 _fontdata_widths_courier.py -rw-r--r--    1 michael
> Administ     3893 Feb  4 19:37 _fontdata_widths_courierbold.py
> -rw-r--r--    1 michael  Administ     3893 Feb  4 19:37
> _fontdata_widths_courierboldoblique.py -rw-r--r--    1 michael
> Administ     3893 Feb  4 19:37 _fontdata_widths_courieroblique.py
> -rw-r--r--    1 michael  Administ     3900 Feb  4 19:37
> _fontdata_widths_helvetica.py -rw-r--r--    1 michael  Administ     3899
> Feb  4 19:37 _fontdata_widths_helveticabold.py -rw-r--r--    1 michael
> Administ     3899 Feb  4 19:37 _fontdata_widths_helveticaboldoblique.py
> -rw-r--r--    1 michael  Administ     3900 Feb  4 19:37
> _fontdata_widths_helveticaoblique.py -rw-r--r--    1 michael  Administ
> 3557 Feb  4 19:37 _fontdata_widths_symbol.py -rw-r--r--    1 michael
> Administ     3901 Feb  4 19:37 _fontdata_widths_timesbold.py -rw-r--r--
> 1 michael  Administ     3897 Feb  4 19:37
> _fontdata_widths_timesbolditalic.py -rw-r--r--    1 michael  Administ
> 3894 Feb  4 19:37 _fontdata_widths_timesitalic.py -rw-r--r--    1 michael
> Administ     3896 Feb  4 19:37 _fontdata_widths_timesroman.py -rw-r--r--
> 1 michael  Administ     2934 Feb  4 19:37 _fontdata_widths_zapfdingbats.py
> -rw-r--r--    1 michael  Administ    19262 Feb  4 19:37 cidfonts.py
> -rw-r--r--    1 michael  Administ    91575 Feb  4 19:37 pdfdoc.py
> -rw-r--r--    1 michael  Administ    17138 Feb  4 19:37 pdfform.py
> -rw-r--r--    1 michael  Administ    29186 Feb  4 19:37 pdfmetrics.py
> -rw-r--r--    1 michael  Administ     2483 Feb  4 19:37 pdfpattern.py
> -rw-r--r--    1 michael  Administ     9991 Feb  4 19:37 pdfutils.py
> -rw-r--r--    1 michael  Administ    55265 Feb  4 19:37 rl_codecs.py
> -rw-r--r--    1 michael  Administ    45710 Feb  4 19:37 ttfonts.py On
> 2/7/2014 3:36 PM, Martin Zibricky wrote: In
> PyInstaller/hooks/hook-reportlab.pdfbase._fontdata.py: +
> 'reportlab.pdfbase._fontdata_enc_winansi',
>  + 'reportlab.pdfbase._fontdata_enc_zapfdingbats', +
> 'reportlab.pdfbase._fontdata_widths_courier', +
> 'reportlab.pdfbase._fontdata_widths_courierbold', +
> 'reportlab.pdfbase._fontdata_widths_courierboldoblique', +
> 'reportlab.pdfbase._fontdata_widths_courieroblique', +
> 'reportlab.pdfbase._fontdata_widths_helvetica', +
> 'reportlab.pdfbase._fontdata_widths_helveticabold', +
> 'reportlab.pdfbase._fontdata_widths_helveticaboldoblique', +
> 'reportlab.pdfbase._fontdata_widths_helveticaoblique', +
> 'reportlab.pdfbase._fontdata_widths_symbol', +
> 'reportlab.pdfbase._fontdata_widths_timesbold', +
> 'reportlab.pdfbase._fontdata_widths_timesbolditalic', +
> 'reportlab.pdfbase._fontdata_widths_timesitalic', +
> 'reportlab.pdfbase._fontdata_widths_timesroman', +
> 'reportlab.pdfbase._fontdata_widths_zapfdingbats',
> Could it be possible to somehow generate this long list of hidden imports
> dinamically? — Reply to this email directly or view it on GitHub.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/pyinstaller/pyinstaller/pull/107/files#r9556409>
> .
>



-- 
Bryan A. Jones, Ph.D.
Associate Professor
Department of Electrical and Computer Engineering
231 Simrall / PO Box 9571
Mississippi State University
Mississippi state, MS 39762
http://www.ece.msstate.edu/~bjones
bjones AT ece DOT msstate DOT edu
voice 662-325-3149
fax 662-325-2298

Our Master, Jesus Christ, is on his way. He'll show up right on
time, his arrival guaranteed by the Blessed and Undisputed Ruler,
High King, High God.
- 1 Tim. 6:14b-15 (The Message)