Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubicweb
Commits
8ebed973819b
Commit
7c4a6e7d
authored
Apr 20, 2010
by
Sylvain Thénault
Browse files
merge stable, fixing dependencies generation on c-c newcube on the way
parents
b7eca41d72f9
9ec5c37f11ba
Changes
5
Hide whitespace changes
Inline
Side-by-side
dbapi.py
View file @
8ebed973
...
...
@@ -108,11 +108,50 @@ def repo_connect(repo, login, **kwargs):
def
connect
(
database
=
None
,
login
=
None
,
host
=
None
,
group
=
None
,
cnxprops
=
None
,
setvreg
=
True
,
mulcnx
=
True
,
initlog
=
True
,
**
kwargs
):
"""Constructor for creating a connection to the CubicWeb repository.
Returns a Connection object.
Returns a
:class:`
Connection
`
object.
When method is 'pyro', setvreg is True, try to deal with connections to
differents instances in the same process unless specified otherwise by
setting the mulcnx to False.
Typical usage::
cnx = connect('myinstance', login='me', password='toto')
Arguments:
:database:
the instance's pyro identifier.
:login:
the user login to use to authenticate.
:host:
the pyro nameserver host. Will be detected using broadcast query if
unspecified.
:group:
the instance's pyro nameserver group. You don't have to specify it unless
tweaked in instance's configuration.
:cnxprops:
an optional :class:`ConnectionProperties` instance, allowing to specify
the connection method (eg in memory or pyro). A Pyro connection will be
established if you don't specify that argument.
:setvreg:
flag telling if a registry should be initialized for the connection.
Don't change this unless you know what you're doing.
:mulcnx:
Will disappear at some point. Try to deal with connections to differents
instances in the same process unless specified otherwise by setting this
flag to False. Don't change this unless you know what you're doing.
:initlog:
flag telling if logging should be initialized. You usually don't want
logging initialization when establishing the connection from a process
where it's already initialized.
:kwargs:
there goes authentication tokens. You usually have to specify for
instance a password for the given user, using a named 'password' argument.
"""
config
=
cwconfig
.
CubicWebNoAppConfiguration
()
if
host
:
...
...
debian/control
View file @
8ebed973
...
...
@@ -50,7 +50,7 @@ Depends: python-psycopg2, postgresql-client
Description: postgres support for the CubicWeb framework
CubicWeb is a semantic web application framework.
.
This virtual package provides depend
a
ncies to use postgres for the
This virtual package provides depend
e
ncies to use postgres for the
cubicweb repository.
Package: cubicweb-mysql-support
...
...
@@ -60,7 +60,7 @@ Depends: python-mysqldb, mysql-client
Description: mysql support for the CubicWeb framework
CubicWeb is a semantic web application framework.
.
This virtual package provides depend
a
ncies to use mysql for the
This virtual package provides depend
e
ncies to use mysql for the
cubicweb repository.
...
...
devtools/devctl.py
View file @
8ebed973
...
...
@@ -538,19 +538,14 @@ layout, and a full featured cube with "full" layout.',
longdesc
=
shortdesc
=
raw_input
(
'Enter a short description for your cube: '
)
if
verbose
:
longdesc
=
raw_input
(
'Enter a long description (leave empty to reuse the short one): '
)
dependencies
=
{
'cubicweb'
:
'>= %s'
%
cubicwebversion
}
if
verbose
:
includes
=
self
.
_ask_for_dependancies
()
if
len
(
includes
)
==
1
:
dependancies
=
'%r,'
%
includes
[
0
]
else
:
dependancies
=
', '
.
join
(
repr
(
cube
)
for
cube
in
includes
)
else
:
dependancies
=
''
dependencies
.
update
(
self
.
_ask_for_dependencies
())
context
=
{
'cubename'
:
cubename
,
'distname'
:
distname
,
'shortdesc'
:
shortdesc
,
'longdesc'
:
longdesc
or
shortdesc
,
'depend
a
ncies'
:
depend
a
ncies
,
'depend
e
ncies'
:
depend
e
ncies
,
'version'
:
cubicwebversion
,
'year'
:
str
(
datetime
.
now
().
year
),
'author'
:
self
[
'author'
],
...
...
@@ -565,21 +560,22 @@ layout, and a full featured cube with "full" layout.',
'cubes.*'
,
'external_resources*'
)
copy_skeleton
(
skeldir
,
cubedir
,
context
,
exclude
=
exclude
)
def
_ask_for_depend
a
ncies
(
self
):
def
_ask_for_depend
e
ncies
(
self
):
from
logilab.common.shellutils
import
ASK
from
logilab.common.textutils
import
splitstrip
includ
es
=
[]
for
stdtyp
e
in
ServerConfiguration
.
available_cubes
():
answer
=
ASK
.
ask
(
"Depends on cube %s? "
%
stdtyp
e
,
depcub
es
=
[]
for
cub
e
in
ServerConfiguration
.
available_cubes
():
answer
=
ASK
.
ask
(
"Depends on cube %s? "
%
cub
e
,
(
'N'
,
'y'
,
'skip'
,
'type'
),
'N'
)
if
answer
==
'y'
:
includ
es
.
append
(
stdtyp
e
)
depcub
es
.
append
(
cub
e
)
if
answer
==
'type'
:
includ
es
=
splitstrip
(
raw_input
(
'type depend
a
ncies: '
))
depcub
es
=
splitstrip
(
raw_input
(
'type depend
e
ncies: '
))
break
elif
answer
==
'skip'
:
break
return
includes
return
dict
((
'cubicweb-'
+
cube
,
ServerConfiguration
.
cube_version
(
cube
))
for
cube
in
depcubes
)
class
ExamineLogCommand
(
Command
):
...
...
goa/goactl.py
View file @
8ebed973
...
...
@@ -195,7 +195,7 @@ class NewGoogleAppCommand(Command):
# goa instance'skeleton
copy_skeleton
(
join
(
CW_SOFTWARE_ROOT
,
'goa'
,
'skel'
),
appldir
,
context
,
askconfirm
=
True
)
# cubicweb core depend
a
ncies
# cubicweb core depend
e
ncies
for
directory
,
subdirectory
in
slink_directories
():
subdirectory
=
join
(
appldir
,
subdirectory
)
if
not
exists
(
split
(
subdirectory
)[
0
]):
...
...
skeleton/__pkginfo__.py.tmpl
View file @
8ebed973
...
...
@@ -40,6 +40,6 @@ for dname in ('entities', 'views', 'sobjects', 'hooks', 'schema', 'data', 'i18n'
# Note: here, you'll need to add subdirectories if you want
# them to be included in the debian package
__depends__ =
{'cubicweb': '>= %(version)s'}
__depends__ =
%(dependencies)s
__recommends__ = {}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment