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
Packager son projet Django
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Bruno Renié
April 14, 2012
Programming
4
580
Packager son projet Django
Bruno Renié
April 14, 2012
Tweet
Share
More Decks by Bruno Renié
See All by Bruno Renié
Visibility for web developers
brutasse
3
470
Decentralization & real-time with PubSubHubbub
brutasse
1
160
Deployability of Python Web Applications
brutasse
17
2.4k
Stop writing settings files
brutasse
21
2.6k
Class-based Views: patterns and anti-patterns
brutasse
9
1.7k
Staticfiles : tout ce qu'il faut savoir, rien que ce qu'il faut savoir
brutasse
4
570
Introduction to Django
brutasse
3
440
Other Decks in Programming
See All in Programming
CSC307 Lecture 10
javiergs
PRO
1
690
Raku Raku Notion 20260128
hareyakayuruyaka
0
430
あなたはユーザーではない #PdENight
kajitack
4
300
Head of Engineeringが現場で回した生産性向上施策 2025→2026
gessy0129
0
210
守る「だけ」の優しいEMを抜けて、 事業とチームを両方見る視点を身につけた話
maroon8021
3
170
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
360
NOT A HOTEL - 建築や人と融合し、自由を創り出すソフトウェア
not_a_hokuts
2
540
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
12
7.4k
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
110
CopilotKit + AG-UIを学ぶ
nearme_tech
PRO
1
120
AIに仕事を丸投げしたら、本当に楽になれるのか
dip_tech
PRO
0
180
AI駆動開発の本音 〜Claude Code並列開発で見えたエンジニアの新しい役割〜
hisuzuya
4
460
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
75
11k
Test your architecture with Archunit
thirion
1
2.2k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
370
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
140
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
Navigating Weather and Climate Data
rabernat
0
130
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
The Cost Of JavaScript in 2023
addyosmani
55
9.7k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
300
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Transcript
Bruno Renié Djangocong 2012 Packager son projet Django
distribuer / déployer du code
git
dépendances rollback traçabilité
PaaS
contraintes géographiques architecturales culturelles
packaging
installer son application comme une simple bibliothèque* * configuration laissée
au soin de l'utilisateur
simplicité traçabilité reproductibilité
OS Application deb / RPM setup.py
None
django nettoyez-moi tout ça
arrêter d'altérer sys.path project/ __init__.py urls.py app1/ __init__.py models.py app2/
from project.app1.views import stuff
Application réutilisable : package séparé from project.app.models import Stuff from
registration.models import RegistrationProfile Application non réutilisable : embarquée
requirements : versions explicites Django==1.4 PIL==1.1.6 pas de liens git
setup.py from distutils.core import setup from setuptools import find_packages with
open('requirements.txt') as reqs: install_requires = reqs.read().split('\n') setup( name='project', version=__import__('project').__version__, packages=find_packages(), include_package_data=True, zip_safe=False, install_requires=install_requires, )
MANIFEST.in pour tout ce qui est non-python include requirements.txt recursive‐include
project * recursive‐exclude project *.pyc recursive‐exclude project *.scss exclude project/settings.py
settings project/default_settings.py Packagé : Déployé : settings.py from project.default_settings import
* DATABASES = { … }
layout final requirements.txt setup.py MANIFEST.in project/ __init__.py default_settings.py settings.py app1/
app2/
Déploiement
env/ public/ static/ settings.py wsgi.py ./env/bin/gunicorn wsgi:application utiliser add2virtualenv pour
rendre wsgi et settings importables sans toucher PYTHONPATH
pip et paquets privés --find-links : file:///path/to/packages --index-url : structure
de type http://pypi.python.org/simple/ bien héberger tous ses paquets pypi tombe, les versions disparaissent
Workflow final Déployer (incrément n° de version) python setup.py sdist
(upload) pip install ‐U project ‐‐find‐links … Rollback pip install project==X.Y.Z ‐‐find‐links …
https://github.com/brutasse/fab-bundle @brutasse
[email protected]