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
GISエンジニアから見たLINKSデータ
nokonoko1203
0
190
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
360
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
660
Python札幌 LT資料
t3tra
7
1.1k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
720
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
180
2年のAppleウォレットパス開発の振り返り
muno92
PRO
0
180
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
1
320
20251212 AI 時代的 Legacy Code 營救術 2025 WebConf
mouson
0
250
Pythonではじめるオープンデータ分析〜書籍の紹介と書籍で紹介しきれなかった事例の紹介〜
welliving
3
780
dchart: charts from deck markup
ajstarks
3
960
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
230
Featured
See All Featured
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
0
240
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
51
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
200
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
550
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Paper Plane
katiecoart
PRO
0
45k
KATA
mclloyd
PRO
33
15k
Become a Pro
speakerdeck
PRO
31
5.8k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.3k
Darren the Foodie - Storyboard
khoart
PRO
2
2.1k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
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