Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Rafael Monnerat
slapos.buildout
Commits
4b4ad2ac
Commit
4b4ad2ac
authored
Feb 18, 2008
by
Christian Zagrodnick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Added `environment` option to custom extension building options.
parent
00cd74f6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
2 deletions
+31
-2
src/zc/buildout/tests.py
src/zc/buildout/tests.py
+4
-0
zc.recipe.egg_/CHANGES.txt
zc.recipe.egg_/CHANGES.txt
+5
-0
zc.recipe.egg_/src/zc/recipe/egg/custom.py
zc.recipe.egg_/src/zc/recipe/egg/custom.py
+5
-0
zc.recipe.egg_/src/zc/recipe/egg/custom.txt
zc.recipe.egg_/src/zc/recipe/egg/custom.txt
+17
-2
No files found.
src/zc/buildout/tests.py
View file @
4b4ad2ac
...
@@ -2475,8 +2475,12 @@ initextdemo(void)
...
@@ -2475,8 +2475,12 @@ initextdemo(void)
"""
"""
extdemo_setup_py
=
"""
extdemo_setup_py
=
"""
import os
from distutils.core import setup, Extension
from distutils.core import setup, Extension
if os.environ.get('test-variable'):
print "Have environment test-variable:", os.environ['test-variable']
setup(name = "extdemo", version = "%s", url="http://www.zope.org",
setup(name = "extdemo", version = "%s", url="http://www.zope.org",
author="Demo", author_email="demo@demo.com",
author="Demo", author_email="demo@demo.com",
ext_modules = [Extension('extdemo', ['extdemo.c'])],
ext_modules = [Extension('extdemo', ['extdemo.c'])],
...
...
zc.recipe.egg_/CHANGES.txt
View file @
4b4ad2ac
...
@@ -8,6 +8,11 @@ To do
...
@@ -8,6 +8,11 @@ To do
Change History
Change History
**************
**************
1.1.0 (unreleased)
==================
- Added `environment` option to custom extension building options.
1.0.0 (2007-11-03)
1.0.0 (2007-11-03)
==================
==================
...
...
zc.recipe.egg_/src/zc/recipe/egg/custom.py
View file @
4b4ad2ac
...
@@ -57,6 +57,11 @@ class Custom(Base):
...
@@ -57,6 +57,11 @@ class Custom(Base):
options
[
'index'
]
=
index
options
[
'index'
]
=
index
self
.
index
=
index
self
.
index
=
index
environment_section
=
options
.
get
(
'envirionment'
)
if
environment_section
:
for
key
,
value
in
buildout
[
environment_section
].
items
():
os
.
environ
[
key
]
=
value
options
[
'_e'
]
=
buildout
[
'buildout'
][
'eggs-directory'
]
options
[
'_e'
]
=
buildout
[
'buildout'
][
'eggs-directory'
]
assert
options
.
get
(
'unzip'
)
in
(
'true'
,
'false'
,
None
)
assert
options
.
get
(
'unzip'
)
in
(
'true'
,
'false'
,
None
)
...
...
zc.recipe.egg_/src/zc/recipe/egg/custom.txt
View file @
4b4ad2ac
...
@@ -83,7 +83,7 @@ python
...
@@ -83,7 +83,7 @@ python
section.
section.
environment
environment
The name of a section wi
c
h additional environment variables. The
The name of a section wi
t
h additional environment variables. The
envirionment variables are set before the egg is built.
envirionment variables are set before the egg is built.
To illustrate this, we'll define a buildout that builds an egg for a
To illustrate this, we'll define a buildout that builds an egg for a
...
@@ -129,20 +129,29 @@ the egg:
...
@@ -129,20 +129,29 @@ the egg:
... [buildout]
... [buildout]
... parts = extdemo
... parts = extdemo
...
...
... [extdemo-env]
... test-variable = foo
...
... [extdemo]
... [extdemo]
... recipe = zc.recipe.egg:custom
... recipe = zc.recipe.egg:custom
... find-links = %(server)s
... find-links = %(server)s
... index = %(server)s/index
... index = %(server)s/index
... include-dirs = include
... include-dirs = include
... envirionment = extdemo-env
...
... """ % dict(server=link_server))
... """ % dict(server=link_server))
>>> print system(buildout),
>>> print system(buildout),
Installing extdemo.
Installing extdemo.
Have environment test-variable: foo
zip_safe flag not set; analyzing archive contents...
zip_safe flag not set; analyzing archive contents...
We got the zip_safe warning because the source distribution we used
We got the zip_safe warning because the source distribution we used
wasn't setuptools based and thus didn't set the option.
wasn't setuptools based and thus didn't set the option.
The setup.py also printed out that we have set the environment `test-variable`
to foo.
The egg is created in the develop-eggs directory *not* the eggs
The egg is created in the develop-eggs directory *not* the eggs
directory because it depends on buildout-specific parameters and the
directory because it depends on buildout-specific parameters and the
eggs directory can be shared across multiple buildouts.
eggs directory can be shared across multiple buildouts.
...
@@ -179,11 +188,15 @@ Let's define a script that uses out ext demo:
...
@@ -179,11 +188,15 @@ Let's define a script that uses out ext demo:
... develop = demo
... develop = demo
... parts = extdemo demo
... parts = extdemo demo
...
...
... [extdemo-env]
... test-variable = foo
...
... [extdemo]
... [extdemo]
... recipe = zc.recipe.egg:custom
... recipe = zc.recipe.egg:custom
... find-links = %(server)s
... find-links = %(server)s
... index = %(server)s/index
... index = %(server)s/index
... include-dirs = include
... include-dirs = include
... envirionment = extdemo-env
...
...
... [demo]
... [demo]
... recipe = zc.recipe.egg
... recipe = zc.recipe.egg
...
@@ -233,11 +246,13 @@ We won't get an update.
...
@@ -233,11 +246,13 @@ We won't get an update.
- zc.recipe.egg.egg-link
- zc.recipe.egg.egg-link
But if we run the buildout in the default on-line and newest modes, we
But if we run the buildout in the default on-line and newest modes, we
will:
will. This time we also get the test-variable message again, because the new
version is imported:
>>> print system(buildout),
>>> print system(buildout),
Develop: '/sample-buildout/demo'
Develop: '/sample-buildout/demo'
Updating extdemo.
Updating extdemo.
Have environment test-variable: foo
zip_safe flag not set; analyzing archive contents...
zip_safe flag not set; analyzing archive contents...
Updating demo.
Updating demo.
Generated script '/sample-buildout/bin/demo'.
Generated script '/sample-buildout/bin/demo'.
...
...
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