Wildcards in POTFILES.in
Bug #503026 reported by
Siegfried Gevatter
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-distutils-extra |
New
|
Undecided
|
Unassigned |
Bug Description
Please make it possible to use wildcards in POTFILES.in (or a new file which would generate POTFILES.in), eg.:
src/*.py
To post a comment you must log in.
Until (/If) this is implemented, I'm using the following hack to achieve this:
------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ----
from __future__ import with_statement
import os
from glob import glob
if __name__ == "__main__": chdir(os. path.realpath( os.path. dirname( __file_ _))) isfile( "po/POTFILES. in.in") : POTFILES. in.in") as f:
lines. extend( glob(line. strip() )) POTFILES. in", "w") as f:
f. write(" \n".join( lines) + "\n") ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ----
""" Generate POTFILES.in from POTFILES.in.in. """
os.
if os.path.
lines = []
with open("po/
for line in f:
with open("po/
-------
Listing it here in case it's useful to somebody.