Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

A tall, dark stranger will have more fun than you.


comp / comp.lang.python / Re: Best Practice Virtual Environment

SubjectAuthor
o Re: Best Practice Virtual Environmenttransreductionist

1
Subject: Re: Best Practice Virtual Environment
From: transreductionist
Newsgroups: comp.lang.python
Date: Sun, 6 Oct 2024 17:30 UTC
References: 1 2 3 4
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!not-for-mail
From: transreductionist@gmail.com (transreductionist)
Newsgroups: comp.lang.python
Subject: Re: Best Practice Virtual Environment
Date: Sun, 6 Oct 2024 13:30:24 -0400
Lines: 43
Message-ID: <mailman.2.1728235839.4695.python-list@python.org>
References: <20241005222733.fd60f7e672e849aa63c8b360@fam-goebel.de>
<ZwG71fmSkKa2v3QY@hermes.hilbert.loc> <ZwKUIkU5zQLmIaWr@hermes.hilbert.loc>
<CAEM3OOv7aXBCOoDpXeL6TvTYU+eHrDAM1_LOkyx15hzxUOvigg@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de xoEfxE4+0fVr8oWLuTiSHQ1corDHNJYSnZHrGn1fV0jA==
Cancel-Lock: sha1:S1D9UydWW1+lv6gHsLAo5zstX3g= sha256:6Y1HGwC6nRrAP5bFNWrP28VUul+0JfTF1Ggs8l2NP/8=
Return-Path: <transreductionist@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=O7SBmHTs;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.000
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'pip': 0.04; 'repository':
0.05; 'modules': 0.07; 'scripts.': 0.07; 'sun,': 0.07; 'tests':
0.07; 'that?': 0.07; '+0200': 0.09; 'cc:addr:python-list': 0.09;
'debian': 0.09; 'email addr:python.org>': 0.09; 'environments':
0.09; 'gpg': 0.09; 'install,': 0.09; 'karsten': 0.09; 'schrieb':
0.09; '&gt;': 0.14; 'cc:no real name:2**0': 0.14; 'url:mailman':
0.15; '(even': 0.16; '1713': 0.16; '2024': 0.16; 'cleanly': 0.16;
'hilbert': 0.16; 'hint': 0.16; 'python3': 0.16; 'received:mail-
oi1-x235.google.com': 0.16; 'run,': 0.16; 'wrote:': 0.16;
'problem': 0.16; 'installing': 0.19; 'cc:addr:python.org': 0.20;
'sat,': 0.22; 'install': 0.23; 'url-ip:188.166.95.178/32': 0.25;
'url-ip:188.166.95/24': 0.25; 'url:listinfo': 0.25; 'cc:2**0':
0.25; 'url-ip:188.166/16': 0.25; 'seems': 0.26; 'else': 0.27;
'email addr:python.org&gt;': 0.28; 'environment': 0.29;
'packages': 0.31; 'url-ip:188/8': 0.31; "doesn't": 0.32; 'python-
list': 0.32; 'right,': 0.32; 'message-id:@mail.gmail.com': 0.32;
'but': 0.32; 'there': 0.33; 'someone': 0.34; 'header:In-Reply-
To:1': 0.34; 'received:google.com': 0.34; 'runs': 0.35;
'from:addr:gmail.com': 0.35; 'way': 0.38; 'means': 0.38; 'single':
0.39; 'handle': 0.39; 'use': 0.39; 'define': 0.40; 'skip:o 10':
0.61; 'down': 0.64; 'lock': 0.64; 'required': 0.65; 'let': 0.66;
'know.': 0.68; 'virtual': 0.71; 'skip:* 10': 0.71; 'manage': 0.73;
'email name:&lt;python-list': 0.84; 'subject:Virtual': 0.84;
'convenience': 0.91
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1728235835; x=1728840635; darn=python.org;
h=cc:to:subject:message-id:date:from:in-reply-to:references
:mime-version:from:to:cc:subject:date:message-id:reply-to;
bh=tNvn0kzeGLrqZhgLwS1iSocCTLic+HGgc+zqXpIXVA8=;
b=O7SBmHTs17nxzB6112B8GAj4YniYFiKbw9id67sBk51+TpCKLybR5ls9Tp1jqXQHUE
qAylMKaftKLLN4NJqh5jve5J8HuCXgIwyrNB20N+08ajqH9zaIpD6r6to398m09Khzno
7b/n5E9vJBA8QrxvudNKSzvaCuPEoSIum04mJPncupSxEW6o5rd3NWMkUEuK3Jpajv/h
G3ql4gOxjLfu013t7fN6UnylEH5Lcp3Fv3D/brskCJ6Edo5YBDXL6xGKNpA85rjPZvT6
bxnSa8icHxgQ/I6NxlW0lVA3cAKorWh4H7o44/XBfea98qUJJQ+qTv2XRjt26PcX9h7o
8XGw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1728235835; x=1728840635;
h=cc:to:subject:message-id:date:from:in-reply-to:references
:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=tNvn0kzeGLrqZhgLwS1iSocCTLic+HGgc+zqXpIXVA8=;
b=sHh/9G4KkCDiyHlG+5plrRmtnjdrA0DGRVxfr+iBDsHBbd8PUHy06m/yktFJQkY2AK
YdMZv+OyTvZ6EHQxUW+Vqw0WDO3RsHxoKKymp3uAx/lXP23NI0wjFz8BBwzL9eFs6J3m
o9XTF5FRMYVCZEvqfEUGRjX9XWrUY4qbYlp/SOPm7ywPf91BvfAf4ni2dutHT2hVdB0G
MZxupbcEzQWOg89XFKXiM109KsVjL2XQ2UVbsMYFJPpTKnuuGNiaQgDhJUFGPaZUI84m
nSkSdT8OFLCV+bOgn62ydbI6Gax6JJAvFDYvby6qbE4mSnXzyUB0b53QzoAye1ApYowI
w5FQ==
X-Gm-Message-State: AOJu0YyI4kC7hJQ6Hm5JQfLnyY72nFdiljzG0AW5ATh7wQqIvDPY/p9M
6uOBvhEnD8Nodd28Y5jg0FRZXm7ZBWJQxdb7HeHtKB7YLoBIu+7z5DtPrHg/ckM42TzfOJPCRKm
3I8o3ie6KGruvz90EnzoHtnF3n2WNrA==
X-Google-Smtp-Source: AGHT+IG45neeAmROkJu0QvPfQOOlrH9q6TgrzF0e2Frp+mpkcB26cH+G1/Or+deBCgLaAqpwxlP/FZW3tq30rapaWl0=
X-Received: by 2002:a05:6870:20e:b0:287:d8df:7c22 with SMTP id
586e51a60fabf-287d8df843emr2949201fac.23.1728235835402; Sun, 06 Oct 2024
10:30:35 -0700 (PDT)
In-Reply-To: <ZwKUIkU5zQLmIaWr@hermes.hilbert.loc>
X-Content-Filtered-By: Mailman/MimeDel 2.1.39
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <CAEM3OOv7aXBCOoDpXeL6TvTYU+eHrDAM1_LOkyx15hzxUOvigg@mail.gmail.com>
X-Mailman-Original-References: <20241005222733.fd60f7e672e849aa63c8b360@fam-goebel.de>
<ZwG71fmSkKa2v3QY@hermes.hilbert.loc> <ZwKUIkU5zQLmIaWr@hermes.hilbert.loc>
View all headers

This is how we handle this problem at a large organization.

In the repository there are a number of build scripts. For convenience we
use poetry (poetry.toml) to manage the virtual environment. A
pyproduct.toml is used to define dependencies, how tests are run, the
linter config, etc.

So there are scripts for poetry lock, poetry install, and whatever else is
needed.

A user pulls down the repository and runs
1. poetry lock
2. poetry install
And they have their environment with the proper dependencies.

On Sun, Oct 6, 2024, 09:47 Karsten Hilbert via Python-list <
python-list@python.org> wrote:

> Am Sun, Oct 06, 2024 at 12:21:09AM +0200 schrieb Karsten Hilbert via
> Python-list:
>
> > Am Sat, Oct 05, 2024 at 10:27:33PM +0200 schrieb Ulrich Goebel via
> Python-list:
> >
> > > Debian (or even Python3 itself) doesn't allow to pip install required
> packages system wide, so I have to use virtual environments even there. But
> is it right, that I have to do that for every single user?
> > >
> > > Can someone give me a hint to find an howto for that?
> >
> > If you do find how to cleanly install non-packaged modules
> > in a system-wide way (even if that means installing every
> > application into its own *system-wide* venv) - do let me
> > know.
>
> It seems dh-virtualenv is one way to do it. On Debian.
>
> Karsten
> --
> GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B
> --
> https://mail.python.org/mailman/listinfo/python-list
>

1

rocksolid light 0.9.8
clearnet tor