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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Radim Novotný
October 25, 2012
Programming
1
230
Buildout
Radim Novotný
October 25, 2012
Tweet
Share
Other Decks in Programming
See All in Programming
実践ハーネスエンジニアリング #MOSHTech
kajitack
7
4.5k
条件判定に名前、つけてますか? #phperkaigi #c
77web
2
840
Codex CLI でつくる、Issue から merge までの開発フロー
amata1219
0
150
Codex CLIのSubagentsによる並列API実装 / Parallel API Implementation with Codex CLI Subagents
takatty
2
580
Fundamentals of Software Engineering In the Age of AI
therealdanvega
2
300
Symfony + NelmioApiDocBundle を使った スキーマ駆動開発 / Schema Driven Development with NelmioApiDocBundle
okashoi
0
240
CS教育のDX AIによる育成の効率化
niftycorp
PRO
0
170
ローカルで稼働するAI エージェントを超えて / beyond-local-ai-agents
gawa
0
100
今こそ押さえておきたい アマゾンウェブサービス(AWS)の データベースの基礎 おもクラ #6版
satoshi256kbyte
1
200
How to stabilize UI tests using XCTest
akkeylab
0
140
GoのDB アクセスにおける 「型安全」と「柔軟性」の両立 - Bob という選択肢
tak848
0
280
PHP でエミュレータを自作して Ubuntu を動かそう
m3m0r7
PRO
2
150
Featured
See All Featured
Ruling the World: When Life Gets Gamed
codingconduct
0
180
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.7k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
240
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
460
Information Architects: The Missing Link in Design Systems
soysaucechin
0
850
Done Done
chrislema
186
16k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
150
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
86
The Cost Of JavaScript in 2023
addyosmani
55
9.8k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
190
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
980
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.4k
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