Re: Building plans .....

Christopher Barker <[email protected]> Mon, 16 Mar 2020 18:35:21 -0700
Newsgroups gmane.comp.python.apple
Message-ID <CALn7ch82kQj1gQqG0w2GxnhK0Oc+1RCkdDW6pjD9S9Xr0MUdAg@mail.gmail.com>
--===============3093300276188809197==
Content-Type: multipart/alternative; boundary="00000000000045cea605a102f395"

--00000000000045cea605a102f395
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Mon, Mar 16, 2020 at 3:55 PM Jack Jansen <[email protected]> wrote:

but "conda" is a package management tool, a bit like yum or apt in the
Linux world, or Brew, for that matter. except that:

* It provides management of isolated "environments", so you can have a
different collection of software and libraries, all with a different
combination of version on the same system, isolated from one another.

So how does conda handle things that must be installed in =E2=80=9Cspecial=
=E2=80=9D
> locations on some platforms? For example, if you install some package tha=
t
> contains a kernel driver, undoubtedly on windows this=E2=80=99ll have to =
go
> somewhere deep down in c:\system32 or something.
>

I expect that answer is "it doesn't" -- it's really not intended to support
things like kernel drivers. The point of conda is not just package
management, but  the ability to create isolated environments, with specific
versions of various inter-dependent packages.

An environment is essentially a directory tree with a loto f familiar (to
the *nix folks, anyway) directories. Here's what's in my primary working
environment, for example:
$ ls
bin                                phrasebooks
conda-meta                         plugins
doc                                qml
etc                                qsci
include                            resources
lib                                sbin
libexec                            share
man                                ssl
mkspecs                            translations

When you "activate" an environment, it sets up a bunch of environment
variables so that those "Versions" are found first. Here's $PATH by my
primarily working environment (called py3) is activated:

$ echo $PATH
/Users/chris.barker/miniconda3/envs/py3/bin:/Library/TeX/texbin:/Users/chri=
s.barker/miniconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/=
usr/local/sbin

It prepended the bin dir from the Environment on there. It does similar
things to all the other env variables.

Because in a way Python on the mac (if you want to use a
> framework/app/bundle Python) is like that: it has some platform-specific
> installation requirements (that bits of it go into /Library/Frameworks an=
d
> other bits in /Application), and in the end you setup a few symlinks in t=
he
> conda bin directory (or the conda per-environment bin directory, or howev=
er
> that works) and for a conda user the situation will be exactly the same o=
n
> Mac as on Linux=E2=80=A6..
>

So yes, you could install the entire Framework inside the environment, and
then have the various links to the "expected" places inside that
environment (conda uses relative paths wherever possible, so it wouldn't be
hard). And probably, it would end up looking just like a *nux install as
far as everything else is concerned, except for that extra Framework thing
in there somewhere that could be ignored.

I'm not sure why the conda folks decided not to do that in the first place,
but they didn't, and no one seems to want to do it now.

I suppose I could set it up and submit a PR and see what folks think, but
the big question is: what does a Framework Build by conda? ANd I think the
answer is nothing, except that we already know how to build the pythonw
executable that way.

-Chris
--=20
Christopher Barker, PhD

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython

--00000000000045cea605a102f395
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>On Mon, Mar 16, 2020 at 3:55 PM Jack Jansen &lt;<a hr=
ef=3D"mailto:[email protected]">[email protected]</a>&gt; wrote:<br><bloc=
kquote type=3D"cite"><div dir=3D"ltr"><div dir=3D"ltr"><div>but &quot;conda=
&quot; is a package management tool, a bit like yum or apt in the Linux wor=
ld, or Brew, for that matter. except that:</div><div><br></div><div>* It pr=
ovides management of isolated &quot;environments&quot;, so you can have a d=
ifferent collection of software and libraries, all with a different combina=
tion of version on the same system, isolated from one another.</div></div><=
/div></blockquote></div><div class=3D"gmail_quote"><blockquote class=3D"gma=
il_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,2=
04,204);padding-left:1ex"><div style=3D"overflow-wrap: break-word;"><div>So=
 how does conda handle things that must be installed in =E2=80=9Cspecial=E2=
=80=9D locations on some platforms? For example, if you install some packag=
e that contains a kernel driver, undoubtedly on windows this=E2=80=99ll hav=
e to go somewhere deep down in c:\system32 or something.</div></div></block=
quote><div><br></div><div>I expect that answer is &quot;it doesn&#39;t&quot=
; -- it&#39;s really not intended to support things like kernel drivers. Th=
e point of conda is not just package management, but=C2=A0 the ability to c=
reate isolated environments, with specific versions of various inter-depend=
ent packages.</div><div><br></div><div>An environment is essentially a dire=
ctory tree with a loto f familiar (to the *nix folks, anyway) directories. =
Here&#39;s what&#39;s in my primary working environment, for example:</div>=
<div><span style=3D"font-family:monospace">$ ls<br>bin =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0phrasebooks<br>conda-meta =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 plugins<br>doc =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0qml<br>etc =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0qsci<br>include =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0resources<br>lib =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0sbin<br>libexec =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0share<br>man =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ssl<br>mkspecs =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0translations</span></div><div><br></div><div>When you &quot;activate&quo=
t; an environment, it sets up a bunch of environment variables so that thos=
e &quot;Versions&quot; are found first. Here&#39;s $PATH by my primarily wo=
rking environment (called py3) is activated:</div><div><br></div><div><span=
 style=3D"font-family:monospace">$ echo $PATH<br>/Users/chris.barker/minico=
nda3/envs/py3/bin:/Library/TeX/texbin:/Users/chris.barker/miniconda3/condab=
in:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin</span></div=
><div><br></div><div>It prepended the bin dir from the Environment on there=
. It does similar things to all the other env variables. <br></div><div><br=
></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;=
border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style=3D"over=
flow-wrap: break-word;"><div>Because in a way Python on the mac (if you wan=
t to use a framework/app/bundle Python) is like that: it has some platform-=
specific installation requirements (that bits of it go into /Library/Framew=
orks and other bits in /Application), and in the end you setup a few symlin=
ks in the conda bin directory (or the conda per-environment bin directory, =
or however that works) and for a conda user the situation will be exactly t=
he same on Mac as on Linux=E2=80=A6..</div></div></blockquote><div><br></di=
v><div>So yes, you could install the entire Framework inside the environmen=
t, and then have the various links to the &quot;expected&quot; places insid=
e that environment (conda uses relative paths wherever possible, so it woul=
dn&#39;t be hard). And probably, it would end up looking just like a *nux i=
nstall as far as everything else is concerned, except for that extra Framew=
ork thing in there somewhere that could be ignored.</div><div><br></div><di=
v>I&#39;m not sure why the conda folks decided not to do that in the first =
place, but they didn&#39;t, and no one seems to want to do it now. <br></di=
v><div><br></div><div>I suppose I could set it up and submit a PR and see w=
hat folks think, but the big question is: what does a Framework Build by co=
nda? ANd I think the answer is nothing, except that we already know how to =
build the pythonw executable that way.</div></div><div class=3D"gmail_quote=
"><font size=3D"3"><font face=3D"Helvetica"><br></font></font></div>-Chris<=
br>-- <div dir=3D"ltr" class=3D"gmail_signature">Christopher Barker, PhD<br=
><br> Python Language Consulting<br>=C2=A0 - Teaching<br>=C2=A0 - Scientifi=
c Software Development<br>=C2=A0 - Desktop GUI and Web Development<br>=C2=
=A0 - wxPython, numpy, scipy, Cython<br></div></div>

--00000000000045cea605a102f395--

--===============3093300276188809197==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Pythonmac-SIG maillist  -  [email protected]
https://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG

--===============3093300276188809197==--