Commit be1039ca authored by Nicolas Chauvat's avatar Nicolas Chauvat
Browse files

first public release

parents
include *.py
recursive-include data external_resources *.gif
recursive-include i18n *.pot *.po
recursive-include migration *.py
"""package __init__"""
# pylint: disable-msg=W0622
"""cubicweb-person packaging information"""
distname = "cubicweb-person"
numversion = (1, 2, 0)
version = '.'.join(str(num) for num in numversion)
license = 'LGPL'
copyright = '''Copyright (c) 2003-2007 LOGILAB S.A. (Paris, FRANCE).
http://www.logilab.fr/ -- mailto:contact@logilab.fr'''
author = "Logilab"
author_email = "contact@logilab.fr"
web = ''
short_desc = "Person support for the CubicWeb framework"
long_desc = """CubicWeb is a entities / relations bases knowledge management system
developped at Logilab.
.
This package provides base schema and views to store persons in cubicweb applications.
.
"""
from os import listdir
from os.path import join
CUBES_DIR = join('share', 'cubicweb', 'cubes')
try:
data_files = [
[join(CUBES_DIR, 'person'),
[fname for fname in listdir('.')
if fname.endswith('.py') and fname != 'setup.py']],
[join(CUBES_DIR, 'person', 'data'),
[join('data', fname) for fname in listdir('data')]],
[join(CUBES_DIR, 'person', 'i18n'),
[join('i18n', fname) for fname in listdir('i18n')]],
[join(CUBES_DIR, 'person', 'migration'),
[join('migration', fname) for fname in listdir('migration')]],
]
except OSError:
# we are in an installed directory
pass
cube_eid = 20342
# used packages
__use__ = ()
__recommend__ = ('addressbook',)
[MAIN]
includes=%(public)s/cubicweb/misc/cubicweb-base_test.ini
[cubicwebpack-person]
dependencies=cubicweb
groups=CUBES
repository=hg:%(public)s/cubes/person/
path=person
cubicweb-person (1.2.0-1) unstable; urgency=low
* new upstream release
-- Laure Bourgois <laure.bourgois@logilab.fr> Mon, 20 Oct 2008 12:15:05 +0200
cubicweb-person (1.1.1-1) unstable; urgency=low
* new upstream release
-- Sylvain Thénault <sylvain.thenault@logilab.fr> Thu, 12 Jun 2008 18:27:05 +0200
cubicweb-person (1.1.0-1) unstable; urgency=low
* new upstream release
-- Nicolas Chauvat <Nicolas.Chauvat@logilab.fr> Mon, 12 May 2008 22:36:06 +0200
cubicweb-person (1.0.3-1) unstable; urgency=low
* new upstream release
* update standards version and fix section in control
-- Sylvain Thénault <Sylvain.Thenault@logilab.fr> Wed, 27 Feb 2008 10:46:11 +0100
cubicweb-person (1.0.2-1) unstable; urgency=low
* add debian/compat and debian/pycompat files, remove DH_COMPAT from rules
* fixed uploaders/maintainer in debian/control
-- Adrien.DiMascio <Adrien.DiMascio@logilab.fr> Wed, 06 Feb 2008 08:43:50 +0100
cubicweb-person (1.0.1-1) unstable; urgency=low
* packaging fixes
-- Sylvain Thénault <sylvain.thenault@logilab.fr> Tue, 30 Oct 2007 17:09:23 +0100
cubicweb-person (1.0.0-1) unstable; urgency=low
* initial upstream release
-- Sylvain Thénault <Sylvain.Thenault@logilab.fr> Tue, 18 Sep 2007 16:31:38 +0200
Source: cubicweb-person
Section: web
Priority: optional
Maintainer: Logilab Packaging Team <contact@logilab.fr>
Uploaders: Sylvain Thenault <sylvain.thenault@logilab.fr>
Build-Depends: debhelper (>= 5.0.37.1), python (>=2.4), python-dev (>=2.4)
Standards-Version: 3.7.3
Package: cubicweb-person
Architecture: all
Depends: cubicweb-person-server (>= ${source:Version}), cubicweb-person-client (>= ${source:Version})
Description: Person support for the CubicWeb framework
CubicWeb is a entities / relations based knowledge management system
developed at Logilab.
.
This package provides base schema and views to store persons in cubicweb
applications.
.
This package will install all the components you need to use the
person component on a single machine. You can also deploy cubicweb by
running the different process on different computers, in which case
you need to install the corresponding packages on the different
hosts.
Package: cubicweb-person-server
Architecture: all
Depends: cubicweb-server (>= 2.48.0), cubicweb-person-comp (>= ${source:Version})
Description: Person support for the CubicWeb framework (repository)
CubicWeb is a entities / relations bases knowledge management system
developed at Logilab.
.
This package provides base schema and views to store persons in cubicweb
applications.
.
This package is a virtual package providing necessary package for the
repository server part of the person component for CubicWeb.
Package: cubicweb-person-client
Architecture: all
Depends: cubicweb-twisted (>= 2.48.0) | cubicweb-web-frontend, cubicweb-person-comp (>= ${source:Version})
Description: Person support for the CubicWeb framework (web)
CubicWeb is a entities / relations bases knowledge management system
developed at Logilab.
.
This package provides base schema and views to store persons in cubicweb
applications.
.
This package is a virtual package providing necessary package for the
web client part of the person component for CubicWeb.
Package: cubicweb-person-comp
Architecture: all
Depends: python2.4
Description: Person support for the CubicWeb framework
CubicWeb is a entities / relations based knowledge management system
developed at Logilab.
.
This package provides base schema and views to store persons in cubicweb
applications.
.
This package will install all the components you need to use the
person component on a single machine. You can also deploy cubicweb by
running the different process on different computers, in which case
you need to install the corresponding packages on the different
hosts.
This package was debianized by Logilab <contact@logilab.fr>.
Upstream Author:
Logilab <contact@logilab.fr>
Copyright:
Copyright (c) 2003-2007 LOGILAB S.A. (Paris, FRANCE).
http://www.logilab.fr/ -- mailto:contact@logilab.fr
Logilab Closed source License. This code is *NOT* open-source. Usage of this
code is subject to a licence agreement. If you want to use it, you should
contact logilab's sales service at commercial@logilab.fr .
usr/share/cubicweb/cubes/person
#!/bin/sh -e
delete_pyo_pyc () {
find /usr/share/cubicweb/cubes/person -name "*.pyc" | xargs rm -f
find /usr/share/cubicweb/cubes/person -name "*.pyo" | xargs rm -f
}
case "$1" in
failed-upgrade|abort-install|abort-upgrade|disappear)
;;
upgrade)
delete_pyo_pyc
;;
remove)
delete_pyo_pyc
;;
purge)
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
esac
#DEBHELPER#
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
build: build-stamp
build-stamp:
dh_testdir
python setup.py -q build
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
rm -rf build
find . -name "*.pyc" | xargs rm -f
rm -f changelog.gz
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs -i
python setup.py -q install --no-compile --prefix=debian/cubicweb-person-comp/usr/
# Build architecture-independent files here.
binary-indep: build install
dh_testdir
dh_testroot
dh_install -i
# dh_pycentral -i
# dh_python -i
# gzip -9 -c ChangeLog > changelog.gz
dh_installchangelogs -i
dh_installexamples -i
dh_installdocs -i
dh_installman -i
dh_link -i
dh_compress -i -X.py -X.ini -X.xml -Xtest
dh_fixperms -i
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
# Build architecture-dependent files here.
binary-arch:
binary: binary-indep
.PHONY: build clean binary-arch binary-indep binary
"""entity classes for optional person entities
:organization: Logilab
:copyright: 2003-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
"""
__docformat__ = "restructuredtext en"
from cubicweb.common.mixins import EmailableMixIn
from cubicweb.entities import AnyEntity, fetch_config
class Person(EmailableMixIn, AnyEntity):
"""customized class for Person entities"""
id = 'Person'
fetch_attrs, fetch_order = fetch_config(['surname', 'firstname'])
rest_attr = 'surname'
skip_copy_for = ('primary_email',)
__rtags__ = {
'assisted_by' : 'create',
('phone', 'PhoneNumber') : 'inlineview', # 'primary',
('use_email', 'EmailAddress') : 'inlineview', # 'primary',
}
def dc_title(self):
return self.name()
def dc_long_title(self):
return self.name(True)
def name(self, civility=False):
if civility:
return u'%s. %s %s' % (self.req._(self.civility),
self.firstname or u'', self.surname or u'')
return u'%s %s' % (self.firstname or u'', self.surname or u'')
from cubicweb.sobjects.notification import NormalizedTextView
class PersonAddedView(NormalizedTextView):
"""get notified from new persons"""
accepts = ('Person',)
content_attr = 'description'
# cubicweb-person i18n catalog
# Copyright 2003-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# Logilab <contact@logilab.fr>
msgid ""
msgstr ""
"Project-Id-Version: cubicweb-person 0.1.0\n"
"PO-Revision-Date: 2008-02-15 10:59+0100\n"
"Last-Translator: Logilab Team <contact@logilab.fr>\n"
"Language-Team: en <contact@logilab.fr>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Mr"
msgstr ""
msgid "Mrs"
msgstr ""
msgid "Ms"
msgstr ""
msgid "New Person"
msgstr "New person"
# schema pot file, generated on 2007-10-29 11:08:31
#
# singular and plural forms for each entity type
msgid "Person"
msgstr "Person"
msgid "Person_plural"
msgstr "Persons"
msgid "This Person"
msgstr "This person"
msgid "a physical person"
msgstr ""
msgid "add a Person"
msgstr "add a person"
# subject and object forms for each relation type
# (no object form for final relation types)
msgid "civility"
msgstr ""
msgid "emails"
msgstr ""
#, python-format
msgid "emails sent or received by %s"
msgstr ""
msgid "remove this Person"
msgstr "remove this person"
# cubicweb-person i18n catalog
# Copyright 2003-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# Logilab <contact@logilab.fr>
msgid ""
msgstr ""
"Project-Id-Version: cubicweb-person 0.1.0\n"
"PO-Revision-Date: 2008-02-15 10:58+0100\n"
"Last-Translator: Logilab Team <contact@logilab.fr>\n"
"Language-Team: fr <contact@logilab.fr>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Mr"
msgstr "M"
msgid "Mrs"
msgstr "Mme"
msgid "Ms"
msgstr "Melle"
msgid "New Person"
msgstr "Nouvelle personne"
# schema pot file, generated on 2007-10-29 11:08:31
#
# singular and plural forms for each entity type
msgid "Person"
msgstr "Personne"
msgid "Person_plural"
msgstr "Personnes"
msgid "This Person"
msgstr "Cette personne"
msgid "a physical person"
msgstr "une personne physique"
msgid "add a Person"
msgstr "ajouter une personne"
# subject and object forms for each relation type
# (no object form for final relation types)
msgid "civility"
msgstr "civilité"
msgid "emails"
msgstr "courriels"
#, python-format
msgid "emails sent or received by %s"
msgstr "courriels émis ou reçus par %s"
msgid "remove this Person"
msgstr "supprimer cette personne"
# postcreate script. You could setup a workflow here for example
from cubicweb.common.schema import format_constraint
class Person(EntityType):
"""a physical person"""
surname = String(required=True, fulltextindexed=True, indexed=True, maxsize=64)
firstname = String(fulltextindexed=True, maxsize=64)
civility = String(required=True, internationalizable=True,
vocabulary=(_('Mr'), _('Ms'), _('Mrs')),
default='Mr')
description_format = String(meta=True, internationalizable=True, maxsize=50,
default='text/rest', constraints=[format_constraint])
description = String(fulltextindexed=True)
if 'PhoneNumber' in defined_types: # from addressbook package
phone = SubjectRelation('PhoneNumber', composite='subject')
use_email = SubjectRelation('EmailAddress', cardinality='*1', composite='subject')
# allowing an email to be the primary email of multiple persons is necessary for
# test at least :-/
primary_email = SubjectRelation('EmailAddress', cardinality='??',
constraints= [RQLConstraint('S use_email O')])
#!/usr/bin/env python
# pylint: disable-msg=W0404,W0622,W0704,W0613,W0152
# Copyright (c) 2003-2004 LOGILAB S.A. (Paris, FRANCE).
# http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
""" Generic Setup script, takes package info from __pkginfo__.py file """
import os
import sys
import shutil
from distutils.core import setup
from distutils import command
from distutils.command import install_lib
from os.path import isdir, exists, join, walk
# import required features
from __pkginfo__ import distname, version, license, short_desc, long_desc, \
web, author, author_email
# import optional features
try:
from __pkginfo__ import distname
except ImportError:
distname = distname
try:
from __pkginfo__ import scripts
except ImportError:
scripts = []
try:
from __pkginfo__ import data_files
except ImportError:
data_files = None
try:
from __pkginfo__ import include_dirs
except ImportError:
include_dirs = []
BASE_BLACKLIST = ('CVS', 'debian', 'dist', 'build', '__buildlog')
IGNORED_EXTENSIONS = ('.pyc', '.pyo', '.elc')
def ensure_scripts(linux_scripts):
"""creates the proper script names required for each platform
(taken from 4Suite)
"""
from distutils import util
if util.get_platform()[:3] == 'win':
scripts_ = [script + '.bat' for script in linux_scripts]
else:
scripts_ = linux_scripts
return scripts_
def install(**kwargs):
"""setup entry point"""
#kwargs['distname'] = modname
return setup(name=distname,
version=version,
license =license,
description=short_desc,
long_description=long_desc,
author=author,
author_email=author_email,
url=web,
scripts=ensure_scripts(scripts),
data_files=data_files,
**kwargs)
if __name__ == '__main__' :
install()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment