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
220
Buildout
Radim Novotný
October 25, 2012
Tweet
Share
Other Decks in Programming
See All in Programming
DataStoreをテストする
mkeeda
0
290
大LLM時代にこの先生きのこるには-ITエンジニア編
fumiyakume
7
3.1k
Thank you <💅>, What's the Next?
ahoxa
1
490
Agentic Applications with Symfony
el_stoffel
2
310
Defying Front-End Inertia: Inertia.js on Rails
skryukov
0
490
「理解」を重視したAI活用開発
fast_doctor
0
150
VitestのIn-Source Testingが便利
taro28
6
2.1k
AIコーディングワークフローの試行 〜AIエージェント×ワークフローでの自動化を目指して〜
rkaga
3
3.7k
PHP で学ぶ OAuth 入門
azuki
1
210
On-the-fly Suggestions of Rewriting Method Deprecations
ohbarye
1
2.9k
リストビュー画面UX改善の振り返り
splcywolf
0
150
AIコーディングの理想と現実
tomohisa
25
32k
Featured
See All Featured
Music & Morning Musume
bryan
47
6.5k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.6k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.8k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
104
19k
Into the Great Unknown - MozCon
thekraken
37
1.7k
Bash Introduction
62gerente
611
210k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
32
5.4k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
23
2.6k
Rails Girls Zürich Keynote
gr2m
94
13k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
13
680
RailsConf 2023
tenderlove
30
1.1k
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 naro@irc.freenode.net/python-cs novotny.radim@gmail.com @narocz