Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Packaging pratique (fr) - pycon.fr 2014
Search
Ordoquy Xavier - Linovia
October 25, 2014
Programming
190
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Packaging pratique (fr) - pycon.fr 2014
Présentation général du packaging Python
Ordoquy Xavier - Linovia
October 25, 2014
More Decks by Ordoquy Xavier - Linovia
See All by Ordoquy Xavier - Linovia
SQLAlchemy - un ami qui vous veut du bien
xordoquy
0
30
pycon.fr 2018 - Django REST framework workshop
xordoquy
0
360
mauvaises bonnes idées pour REST
xordoquy
1
420
Authentication and Permissions with Django REST framework
xordoquy
0
200
Buildbot 0.9
xordoquy
0
110
Performances Django REST framework - DjangoCong 2016
xordoquy
0
140
Présentation de l'architecture REST - meetup Django Paris
xordoquy
0
110
Django REST framework workshop @Djangocon Europe 2015
xordoquy
0
130
Django REST framework - DjangoConG 2015
xordoquy
3
160
Other Decks in Programming
See All in Programming
sbt 2.0: takeoff
eed3si9n
0
160
Event is what happens
moro
2
1.1k
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
2.3k
Unity6 URPによる海底をテーマにしたVJシステムの解説 | Unity Shader 完全に理解した 勉強会
gam0022
0
370
自作Discord音声botをLambda MicroVMsに移行した話 / Migrating My Discord Voice Bot to Lambda MicroVMs
akihisaikeda
0
130
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
360
npm との違いを手がかりにGo の依存管理を理解したい
optim
0
1k
Jetpack Compose Mechanisms
skydoves
3
840
Kotlinの15年とServer-Side Kotlin
n_takehata
1
160
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
870
Simple Storage Service(S3) is not simple
iwatsukayura
0
300
golang-bob.pdf
iwatsukayura
0
130
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
Marketing to machines
jonoalderson
1
5.9k
Google's AI Overviews - The New Search
badams
0
1.6k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Being A Developer After 40
akosma
92
590k
Ruling the World: When Life Gets Gamed
codingconduct
0
410
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
270
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
410
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
The Limits of Empathy - UXLibs8
cassininazir
2
730
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
270
Transcript
packaging xavier ordoquy
@linovia_net
Changer une miriade de scripts
en un système contrôlé.
Distribution: Une « distribution » Python est un fichier d’archive
versionné qui contient des paquets Python, des modules et d’autres fichiers de ressources qui sont utilisés pour distribuer une « Release ». Ce fichier de distribution est ce qu’un utilisateur final téléchargera d’Internet et installera.
Par la suite: packaging == distribution
exemple : pip install sentry[postgres]
Packaging Python : pourquoi ?
multi plateformes
Packaging Python : comment ?
3 outils + du code !!
virtualenv pyenv
Isoler le projet du reste
y compris avec docker, lxc, vagrant…
gain: fin des conflits
dépôt pypi
dépôt ‘officiel’ pypi.python.org
dépôt privé devpi
gain: distribution simple
pip
pip install -e
pip freeze (-l)
requirements: pip install -r
gain: gestion des dépendances
setup.py
use setuptools
recopiez !!
versions: PEP440 1.2.4.dev3557 1.2.4a1 1.2.4b1 1.2.4c1 == 1.2.4rc1 1.2.4 1.2.4.post1
images, css..: MANIFEST.in
gain: application web
executables : entry_points
gain : aucun chemin en dur
requirements : extra_requires
exemple : pip install sentry[postgres] pip install -e .[tests,dev]
gain: uniformisation des méthodes
Bonus: wheel
gain: temps
Bonus 2: stevedore
Bonus 3: du code !
setup( name='project', version='0.1.3a4', description='Some description', long_description=open('README.rst').read(), author='Xavier Ordoquy', author_email='
[email protected]
', url='http://github.com/xx/yy',
packages=find_packages(exclude=[‘tests']), zip_safe=False, include_package_data=True, classifiers=[ 'Framework :: Django', ] ) exemple:
setup( … install_requires=install_requires, extras_require={ 'tests': tests_require, 'dev': dev_requires, 'postgres': install_requires
+ pg_requires, } ) exemple:
setup( … entry_points={ 'console_scripts': [ 'sentry = sentry.utils.runner:main', ], },
) exemple:
class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = ['tests'] self.test_suite =
True def run_tests(self): import pytest errno = pytest.main(self.test_args) sys.exit(errno) setup( … cmdclass={'test': PyTest}, ) exemple:
Présentation http://bit.ly/1skB3K4 Python Packaging User Guide http://bit.ly/1ww8Nbz setup.py Sentry http://bit.ly/1FMMCnG
Merci