skeleton/__pkginfo__.py.tmpl
author Julien Jehannet <julien.jehannet@logilab.fr>
Wed, 22 Apr 2009 18:58:47 +0200
changeset 1438 21b8f3961e6f
parent 548 195a0065aaae
child 1916 5c94f776e4f6
permissions -rw-r--r--
[distutils] don't consider directories as data files
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     1
# pylint: disable-msg=W0622
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     2
"""%(distname)s application packaging information"""
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     3
548
195a0065aaae missing quotes #102063
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents: 538
diff changeset
     4
modname = '%(cubename)s'
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     5
distname = '%(distname)s'
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     6
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     7
numversion = (0, 1, 0)
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     8
version = '.'.join(str(num) for num in numversion)
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     9
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    10
license = 'LCL'
365
5d8336b70aa7 make author information configurable
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents: 319
diff changeset
    11
copyright = '''Copyright (c) %(year)s %(author)s.
5d8336b70aa7 make author information configurable
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents: 319
diff changeset
    12
%(author-web-site)s -- mailto:%(author-email)s'''
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    13
458
99712f0d5472 fix syntax in skeleton's __pkginfo__.py
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 365
diff changeset
    14
author = '%(author)s'
99712f0d5472 fix syntax in skeleton's __pkginfo__.py
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 365
diff changeset
    15
author_email = '%(author-email)s'
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    16
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    17
short_desc = '%(shortdesc)s'
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    18
long_desc = '''%(longdesc)s'''
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    19
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    20
from os import listdir as _listdir
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    21
from os.path import join, isdir
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    22
319
00ada106b138 fix skeleton __pkginfo__ template
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 232
diff changeset
    23
web = 'http://www.cubicweb.org/project/%%s' %% distname
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    24
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    25
pyversions = ['2.4']
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    26
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    27
#from cubicweb.devtools.pkginfo import get_distutils_datafiles
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    28
CUBES_DIR = join('share', 'cubicweb', 'cubes')
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    29
THIS_CUBE_DIR = join(CUBES_DIR, '%(cubename)s')
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    30
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    31
def listdir(dirpath):
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    32
    return [join(dirpath, fname) for fname in _listdir(dirpath)
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    33
            if fname[0] != '.' and not fname.endswith('.pyc')
1438
21b8f3961e6f [distutils] don't consider directories as data files
Julien Jehannet <julien.jehannet@logilab.fr>
parents: 548
diff changeset
    34
            and not fname.endswith('~')
21b8f3961e6f [distutils] don't consider directories as data files
Julien Jehannet <julien.jehannet@logilab.fr>
parents: 548
diff changeset
    35
            and not isdir(join(dirpath, fname))]ΒΆ
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    36
166
879d78d37d47 missing import
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents: 139
diff changeset
    37
from glob import glob
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    38
try:
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    39
    data_files = [
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    40
        # common files
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    41
        [THIS_CUBE_DIR, [fname for fname in glob('*.py') if fname != 'setup.py']],
139
16aafc56a1ac skel cleanup
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents: 0
diff changeset
    42
        ]    
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    43
    # check for possible extended cube layout
232
f1f26070117d cleanup skel packaging
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents: 166
diff changeset
    44
    for dirname in ('entities', 'views', 'sobjects', 'hooks', 'schema', 'data', 'i18n', 'migration'):
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    45
        if isdir(dirname):
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    46
            data_files.append([join(THIS_CUBE_DIR, dirname), listdir(dirname)])
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    47
    # Note: here, you'll need to add subdirectories if you want
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    48
    # them to be included in the debian package
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    49
except OSError:
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    50
    # we are in an installed directory
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    51
    pass
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    52
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    53
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    54
cube_eid = None # <=== FIXME if you need direct bug-subscription
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    55
__use__ = (%(dependancies)s)
139
16aafc56a1ac skel cleanup
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents: 0
diff changeset
    56
__recommend__ = ()
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    57