Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.buildout
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
bob
bob.buildout
Commits
cd7a5e44
Commit
cd7a5e44
authored
12 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
Reconsider .egg-info files as bob is locally built using that now
parent
17b48109
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.rst
+4
-3
4 additions, 3 deletions
README.rst
xbob/buildout/external.py
+19
-18
19 additions, 18 deletions
xbob/buildout/external.py
with
23 additions
and
21 deletions
README.rst
+
4
−
3
View file @
cd7a5e44
...
...
@@ -90,9 +90,10 @@ The recipe supports the following options::
egg-directories
A list of directories that we will scan for eggs
include-glob
A globbing expression (``*.egg`` or ``bla-*.egg``, for example) for path
names that will be considered for inclusion. Defaults to ``*.egg``.
include-globs
A list of globbing expression (``*.egg`` or ``bla-*.egg-info``, for
example) for path names that will be considered for inclusion. Defaults to
``bob*.egg-info``.
recurse
If set to ``1`` or ``true``, recurses into all subdirectories (the default
...
...
This diff is collapsed.
Click to expand it.
xbob/buildout/external.py
+
19
−
18
View file @
cd7a5e44
...
...
@@ -39,7 +39,7 @@ class Recipe(object):
self
.
logger
.
debug
(
"
Found %d valid egg directory(ies)
"
%
len
(
self
.
eggdirs
))
self
.
only_glob
=
options
.
get
(
'
include-glob
'
,
'
*.egg
'
)
self
.
only_glob
=
parse_list
(
options
.
get
(
'
include-glob
s
'
,
'
bob
*.egg
-info
'
)
)
self
.
buildout_eggdir
=
buildout
[
'
buildout
'
].
get
(
'
eggs-directory
'
)
...
...
@@ -52,10 +52,20 @@ class Recipe(object):
def
create_egg_link
(
distro
):
'''
Generates the egg-link file
'''
basename
=
os
.
path
.
splitext
(
os
.
path
.
basename
(
distro
.
location
))[
0
]
basename
,
ext
=
os
.
path
.
splitext
(
os
.
path
.
basename
(
distro
))
link
=
os
.
path
.
join
(
self
.
buildout_eggdir
,
basename
)
+
'
.egg-link
'
f
=
open
(
link
,
'
wt
'
)
f
.
write
(
distro
.
location
+
'
\n
'
)
if
ext
.
lower
()
==
'
.egg
'
:
f
.
write
(
distro
+
'
\n
'
)
elif
ext
.
lower
()
==
'
.egg-info
'
:
f
.
write
(
os
.
path
.
dirname
(
distro
)
+
'
\n
'
)
else
:
f
.
close
()
message
=
"
Can
'
t deal with extension %s (%s)
"
%
(
ext
,
distro
)
self
.
logger
.
error
(
message
)
raise
RuntimeError
,
message
f
.
close
()
self
.
options
.
created
(
link
)
...
...
@@ -63,26 +73,17 @@ class Recipe(object):
if
self
.
recurse
:
for
path
in
self
.
eggdirs
:
for
(
dirpath
,
dirnames
,
filenames
)
in
os
.
walk
(
path
):
names
=
fnmatch
.
filter
(
dirnames
,
self
.
only_glob
)
+
\
fnmatch
.
filter
(
filenames
,
self
.
only_glob
)
for
glob
in
self
.
only_glob
:
names
=
fnmatch
.
filter
(
dirnames
,
glob
)
+
\
fnmatch
.
filter
(
filenames
,
glob
)
eggs
+=
[
os
.
path
.
join
(
dirpath
,
k
)
for
k
in
names
]
else
:
for
path
in
self
.
eggdirs
:
names
=
fnmatch
.
filter
(
os
.
listdir
(
path
),
self
.
only_glob
)
eggs
+=
[
os
.
path
.
join
(
path
,
k
)
for
k
in
names
]
# resolve versions and package names (only consider strict versions)
from
pkg_resources
import
find_distributions
from
distutils.version
import
StrictVersion
distros
=
[
d
[
0
]
for
d
in
[
list
(
find_distributions
(
k
))
for
k
in
eggs
]]
if
self
.
strict_version
:
distros
=
[
d
for
d
in
distros
if
StrictVersion
.
version_re
.
match
(
d
.
version
)]
self
.
logger
.
info
(
"
Found %d version-strict egg(s)
"
%
len
(
distros
))
else
:
self
.
logger
.
debug
(
"
Found %d non-version-strict egg(s)
"
%
len
(
distros
))
for
k
in
distros
:
self
.
logger
.
info
(
"
Linking external egg %s
"
%
k
.
location
)
for
k
in
eggs
:
self
.
logger
.
info
(
"
Linking external egg %s
"
%
k
)
create_egg_link
(
k
)
return
self
.
options
.
created
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment