Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Buildout
Search
Radim Novotný
October 25, 2012
Programming
1
230
Buildout
Radim Novotný
October 25, 2012
Tweet
Share
Other Decks in Programming
See All in Programming
Fluid Templating in TYPO3 14
s2b
0
110
AgentCoreとHuman in the Loop
har1101
5
200
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
180
.NET Conf 2025 の興味のあるセッ ションを復習した / dotnet conf 2025 quick recap for backend engineer
tomohisa
0
120
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
220
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
360
Implementation Patterns
denyspoltorak
0
270
Grafana:建立系統全知視角的捷徑
blueswen
0
310
re:Invent 2025 トレンドからみる製品開発への AI Agent 活用
yoskoh
0
700
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
Architectural Extensions
denyspoltorak
0
250
Featured
See All Featured
A Tale of Four Properties
chriscoyier
162
24k
HDC tutorial
michielstock
1
330
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.2k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.4k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
59
42k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Navigating Weather and Climate Data
rabernat
0
80
How to train your dragon (web standard)
notwaldorf
97
6.5k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
430
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
87
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Transcript
Buildout Radim Novotný PyVo 25.10.2012
Co je to buildout? • zc.buildout (od r. 2006) •
opakovatelný deployment • nejen python • izolované prostředí na fs • rozšiřitelnost http://www.buildout.org
Syntaxe [buildout] parts = pokus [pokus] recipe = zc.recipe.egg interpreter
= mypython eggs = odict
Jak na to • wget http://svn.zope.org/repos/main/zc.buildout/ trunk/bootstrap/bootstrap.py • edit buildout.cfg
• python bootstrap.py • bin/buildout
Recipes • djangorecipe, fez.djangoskel • z3c.recipe.ldap • collective.recipe.patch • collective.recipe.omelette
http://www.buildout.org/docs/recipelist.html PyPI – hledat „recipe“
Příklady použití • https://github.com/plone/buildout.coredev • https://github.com/collective/ buildout.python • https://github.com/diefenbach/ lfs-buildout-development
• http://code.google.com/p/typhoonae/source/ browse/buildout.cfg (memcache, nginx, mongodb, rabbitmq, celery, sphinx, ejabberd, ...)
Minimal Plone buildout [buildout] parts = instance extends = http://dist.plone.org/release/4.1-
latest/versions.cfg find-links = http://dist.repoze.org/ [instance] recipe = plone.recipe.zope2instance eggs = Plone PIL collective.gallery
Plone • wget bootstrap.py • python2.6 bootstrap.py • bin/buildout •
<zadat admin username/password> • bin/instance fg • http://127.0.0.1:8080
Deployment • buildout.cfg a jeho závislosti jsou jediné opravdu důležité
soubory pro deployment • na serveru – git clone/svn checkout – ln -s deployment.cfg buildout.cfg – python bootstrap.py – bin/buildout
BAF Jakub Vysoký - https://github.com/kvbik/python-baf
BAF [buildout] extensions = mr.developer parts = pybaf [sources] baf
= git https://github.com/kvbik/python-baf [pybaf] recipe = zc.recipe.egg interpreter = pybaf eggs = baf
# bin/pybaf >>> import baf >>> baf.__version__ (1, 0) #
bin/baf an example packaging layout see https://github.com/kvbik/python-baf for more version = 1.0 BAF
BAF bin/develop checkout baf bin/buildout -N • nyní bin/baf i
bin/pybaf používají clone z src/baf bin/develop deactivate baf bin/buildout -N • bin/baf a bin/pybaf – egg z PyPI
Závěr ✗ složitější setup než virtualenv (bootstrap.py) ✔ vhodné na
větší, složitější projekty ✔ izolované prostředí ✔ možné použít nejen pro Python packages (Python, SOLR, Apache, Varnish, SQL, Jenkins, supervisor, selenium, ...)
One more thing...
jarn.mkrelease • Python releaser • commit/tag git, svn, hg •
upload na PyPI, sftp, plone.org nebo jen vytvoření egg/zip • release zip, egg • http://pypi.python.org/pypi/jarn.mkrelease
jarn.mkrelease # cd src/baf # mkrelease -qCTS (no-commit, no-tag, no-upload)
Releasing baf 1.0 running egg_info running sdist done # ls dist/ baf-1.0.zip
Děkuji
[email protected]
/python-cs
[email protected]
@narocz