Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
2b226477
Commit
2b226477
authored
Apr 01, 2001
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed the way we try to find ZServer to take advantage of the known
location of the start.py script (when it is used).
parent
b182ce7b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
39 deletions
+48
-39
src/ZEO/__init__.py
src/ZEO/__init__.py
+2
-1
src/ZEO/fap.py
src/ZEO/fap.py
+43
-36
src/ZEO/start.py
src/ZEO/start.py
+3
-2
No files found.
src/ZEO/__init__.py
View file @
2b226477
...
@@ -83,4 +83,5 @@
...
@@ -83,4 +83,5 @@
#
#
##############################################################################
##############################################################################
import
fap
# fixup asyncore/cPickle dependencies
import
fap
fap
.
fap
()
# fixup asyncore/cPickle dependencies
src/ZEO/fap.py
View file @
2b226477
...
@@ -90,47 +90,54 @@ localizing the hacks^H^H^H^H^Hchanges here.
...
@@ -90,47 +90,54 @@ localizing the hacks^H^H^H^H^Hchanges here.
"""
"""
import
sys
import
sys
# if we are using an old version of Python, our asyncore is likely to
def
whiff
(
where
):
# be out of date. If ZServer is sitting around, we can get a current
if
not
where
:
return
0
# version of ayncore from it. In any case, if we are going to be used
import
os
,
imp
# with Zope, it's important to use the version from Zope.
try
:
m
=
imp
.
find_module
(
'ZServer'
,
[
where
])
try
:
except
:
return
0
else
:
return
1
def
fap
(
where
=
''
):
# if we are using an old version of Python, our asyncore is likely to
# be out of date. If ZServer is sitting around, we can get a current
# version of ayncore from it. In any case, if we are going to be used
# with Zope, it's important to use the version from Zope.
try
:
from
ZServer.medusa
import
asyncore
from
ZServer.medusa
import
asyncore
except
:
except
:
# Try a little harder to import ZServer
# Try a little harder to import ZServer
import
os
,
imp
import
os
,
imp
try
:
m
=
imp
.
find_module
(
'ZServer'
,
[
'.'
])
except
:
for
location
in
where
,
'.'
,
os
.
path
.
join
(
'..'
,
'..'
):
try
:
m
=
imp
.
find_module
(
'ZServer'
,
[
os
.
path
.
join
(
'..'
,
'..'
)])
if
whiff
(
location
):
sys
.
path
.
append
(
location
)
try
:
from
ZServer.medusa
import
asyncore
except
:
except
:
import
asyncore
import
asyncore
else
:
break
sys
.
path
.
append
(
os
.
path
.
join
(
'..'
,
'..'
))
from
ZServer.medusa
import
asyncore
else
:
sys
.
path
.
append
(
'.'
)
from
ZServer.medusa
import
asyncore
if
sys
.
version
[:
1
]
<
'2'
and
asyncore
.
loop
.
func_code
.
co_argcount
<
3
:
if
sys
.
version
[:
1
]
<
'2'
and
asyncore
.
loop
.
func_code
.
co_argcount
<
3
:
raise
ImportError
,
'Cannot import an up-to-date asyncore'
raise
ImportError
,
'Cannot import an up-to-date asyncore'
sys
.
modules
[
'ZEO.asyncore'
]
=
asyncore
sys
.
modules
[
'ZEO.asyncore'
]
=
asyncore
# We need a recent version of cPickle too.
# We need a recent version of cPickle too.
if
sys
.
version
[:
3
]
<
'1.6'
:
if
sys
.
version
[:
3
]
<
'1.6'
:
try
:
try
:
from
ZODB
import
cPickle
from
ZODB
import
cPickle
sys
.
modules
[
'ZEO.cPickle'
]
=
cPickle
sys
.
modules
[
'ZEO.cPickle'
]
=
cPickle
except
:
except
:
# Try a little harder
# Try a little harder
import
cPickle
import
cPickle
else
:
else
:
import
cPickle
import
cPickle
import
cStringIO
import
cStringIO
p
=
cPickle
.
Pickler
(
cStringIO
.
StringIO
(),
1
)
p
=
cPickle
.
Pickler
(
cStringIO
.
StringIO
(),
1
)
try
:
try
:
p
.
fast
=
1
p
.
fast
=
1
except
:
except
:
raise
ImportError
,
'Cannot import an up-to-date cPickle'
raise
ImportError
,
'Cannot import an up-to-date cPickle'
src/ZEO/start.py
View file @
2b226477
...
@@ -86,7 +86,7 @@
...
@@ -86,7 +86,7 @@
"""Start the server storage.
"""Start the server storage.
"""
"""
__version__
=
"$Revision: 1.1
8
$"
[
11
:
-
2
]
__version__
=
"$Revision: 1.1
9
$"
[
11
:
-
2
]
import
sys
,
os
,
getopt
,
string
import
sys
,
os
,
getopt
,
string
...
@@ -207,7 +207,8 @@ def main(argv):
...
@@ -207,7 +207,8 @@ def main(argv):
elif
o
==
'-d'
:
detailed
=
1
elif
o
==
'-d'
:
detailed
=
1
elif
o
==
'-s'
:
Z
=
0
elif
o
==
'-s'
:
Z
=
0
import
fap
# fixup asyncore/cPickle dependencies
import
fap
fap
.
fap
(
directory
(
me
,
4
))
# fixup asyncore/cPickle dependencies
if
port
is
None
and
unix
is
None
:
if
port
is
None
and
unix
is
None
:
print
usage
print
usage
...
...
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