Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Christopher Arndt Newsgroups: de.comp.lang.python Subject: [Python-de] requirements.txt (Was: Django Portierungstrategy???) Date: Mon, 25 Apr 2016 15:39:28 +0200 Lines: 94 Message-ID: References: <9b28130b-a35f-4ae2-b13e-d2c5faf42320@googlegroups.com> <570D1549.40004@mail.de> <570D4B30.5060402@broeckling.de> <570D56E2.5000906@mail.de> <20160413123058.5edabd06@bolas.gallifrey.local> <0db2f630-a4f7-4b58-9f22-8d41fc7bb521@googlegroups.com> <571DE72E.3060305@thomas-guettler.de> <571E1E10.7040208@chrisarndt.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="s1t8fxJ4IewFt5AAtbk68Dsof4nj3RoB3" X-Trace: news.uni-berlin.de JaPoIYG4rzw1pvDb++UNbAXfqdTz+819rnHmG7xfEcPQ== Return-Path: X-Original-To: python-de@python.org Delivered-To: python-de@mail.python.org X-Virus-Scanned: Debian amavisd-new at mx1.0x20.eu Openpgp: id=F0BA1EAE86651989C0A1C9901E0D97B33A4E1F31 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 In-Reply-To: <571DE72E.3060305@thomas-guettler.de> X-BeenThere: python-de@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Die Deutsche Python Mailingliste List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <571E1E10.7040208@chrisarndt.de> X-Mailman-Original-References: <9b28130b-a35f-4ae2-b13e-d2c5faf42320@googlegroups.com> <570D1549.40004@mail.de> <570D4B30.5060402@broeckling.de> <570D56E2.5000906@mail.de> <20160413123058.5edabd06@bolas.gallifrey.local> <0db2f630-a4f7-4b58-9f22-8d41fc7bb521@googlegroups.com> <571DE72E.3060305@thomas-guettler.de> Xref: csiph.com de.comp.lang.python:4430 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --s1t8fxJ4IewFt5AAtbk68Dsof4nj3RoB3 Content-Type: multipart/mixed; boundary="GXX93ESk8DqonxG8urOlvNXf38lVidj8v" From: Christopher Arndt To: Die Deutsche Python Mailingliste Message-ID: <571E1E10.7040208@chrisarndt.de> Subject: requirements.txt (Was: Django Portierungstrategy???) References: <9b28130b-a35f-4ae2-b13e-d2c5faf42320@googlegroups.com> <570D1549.40004@mail.de> <570D4B30.5060402@broeckling.de> <570D56E2.5000906@mail.de> <20160413123058.5edabd06@bolas.gallifrey.local> <0db2f630-a4f7-4b58-9f22-8d41fc7bb521@googlegroups.com> <571DE72E.3060305@thomas-guettler.de> In-Reply-To: <571DE72E.3060305@thomas-guettler.de> --GXX93ESk8DqonxG8urOlvNXf38lVidj8v Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Am 25.04.2016 um 11:45 schrieb Thomas G=FCttler: > Abh=E4ngigkeiten werden in Python so weit ich wei=DF =FCber install_req= uires > in setup.py definiert. Jein. install_requires setup.py definiert "abstrakte" Abh=E4ngigkeiten. Feste Versionsnummern sind dort nach M=F6glichkeit zu vermeiden, wenn n=F6tig sollte man darin h=F6chstens Minimal- oder Maximalversionsnummern= und direkte Abh=E4ngigkeiten festlegen. Die setup,py ist m.E. vorrangig f=FCr Python-*Pakete* gedacht. Deswegen sollte man davon ausgehen, dass sie in unterschiedlichen Umgebungen und Nutzungsszenarien ausgef=FChrt wird (z.B. beim Paketbau f=FCr Distributionen; beim Entwickler, wenn er sein virtualenv f=FCr ein Projek= t f=FCllt; beim Testen mit tox usw.) Die requirements.txt ist auf der Projekt bzw. Applikationsebene angesiedelt. In ihr kann man Versionen pinnen und definiert sozusagen die genaue Ausf=FChrungsumgebung f=FCr die Anwendung. Es sind dort i.d.R.= alle notwendigen Pakete, also auch die Abh=E4ngigkeiten von Abh=E4ngigkei= ten (rekursiv) aufgef=FChrt. Es gibt Tools, mit denen man die abstrakten Abh=E4ngigkeiten aus der requirements.txt (halb-)automatisch extrahieren kann. Eine naive Implementierung zum Einbinden in die setup.py, die f=FCr einfache F=E4lle= ausreicht, habe ich zum Beispiel hier notiert: https://gist.github.com/SpotlightKid/486c711a3c14c70edb1a Besser w=E4re m.E. aber, ein entsprechendes Skript in den Release-Prozess= zu integrieren, das dann auch indirekte Abh=E4ngigkeiten bereinigt usw. Weitere Gedanken zum Thema: https://caremad.io/2013/07/setup-vs-requirement/ Gru=DF, Chris --GXX93ESk8DqonxG8urOlvNXf38lVidj8v-- --s1t8fxJ4IewFt5AAtbk68Dsof4nj3RoB3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Puzzled by the all these strange characters? Comment: See http://tinyurl.com/cehoa7 for an introduction Comment: to public key encryption and signing. iQIcBAEBCAAGBQJXHh4QAAoJEB4Nl7M6Th8xGaQP/iAPwNcEjqRjZ6Vi0GabfEJ+ mm2q22qFQg047drO0pmyruiA7q46e6VhkrsnEwvPmtmVwMj3KrU3qz33d4fQd3X1 2IpOYZcvnWQUJjNENcw+WiwRCSBCu2bk8006RFNF1u5AaVbQ6OBmvjEYqk6aY1VS hieoJxCID6THJ53UXpUYlg8/f6kgc20dUwwFe5uiSPePLH4cR31dVKnCDxKIFdfR vv27f2CTjMCHwli6iCuv3GIpphHvRKThKg0GW8RUWi+BN30mWPUYokOKQWAN2kHl xLJKmNxxCzeD17pzrBZLtYngSnqzr+r6bBAynSg9M7Yc0CGmYKiGjWiC/OpzWtV9 vU0FT2a+vQcXiZGxHA0sEUfbUzja9hP8sH8CxjdIQ8gn8nSLDjggZsr1GG4ZCEqF DByHAE08ELGM47nukjw0vKkposg73ur033oMaWqfQTkMactMAAuTnf36cEtCzPwv J9iOZtg7zaZjk/2OxTLPpLpVutznzpp/OqJCTo26oVMFpmb26LydHZ+hSoroTt6i Z87asOD05bJ4lkra2PNHnXcu4Grhbh5AvcNwW8CVYl7z/E5xx3GHMba/eRHePfh9 5vhdSp0m9haQl8kAeoUbb+Tk7hpVEA+lDYGb+Dgs54pV1yG0gG3ocFcTL9jck8NX GNS3B7AGwE9ksvWkzS6H =wAhi -----END PGP SIGNATURE----- --s1t8fxJ4IewFt5AAtbk68Dsof4nj3RoB3--