Open jankatins opened 8 years ago
I've no clue how Linux/OSX handle this...
lib is the place for binaries there.
On Windows this is a problem for conda as discussed in https://github.com/ContinuumIO/anaconda-issues/issues/509 and https://github.com/ContinuumIO/anaconda-issues/issues/233.
Anything that is intended to be executable or shared (i.e. a DLL) by an executable, should live in the %SCRIPTS%
directory.
I agree though. Clear policy on this would be an excellent addition, and would go above and beyond what has already been documented for conda-build.
On Mon, Feb 15, 2016 at 1:09 AM, Phil Elson notifications@github.com wrote:
I've no clue how Linux/OSX handle this...
lib is the place for binaries there.
really? I thought lib was for libs, and bin for binaries (or executable scripts.)
On Windows
Windows is a mess because it looks for both executables AND dlls on PATH. so I suppose you might as well put dlls in Scripts.
this is a problem for conda as discussed in ContinuumIO/anaconda-issues#509
https://github.com/ContinuumIO/anaconda-issues/issues/509 and ContinuumIO/anaconda-issues#233 https://github.com/ContinuumIO/anaconda-issues/issues/233.
Anything that is intended to be executable or shared (i.e. a DLL) by an executable, should live in the %SCRIPTS% directory.
509 make it look like they are going sup support Libary dir of some sort
-- but I lost track...
I agree though. Clear policy on this would be an excellent addition, and would go above and beyond what has already been documented for conda-build.
for sure.
-CHB
Christopher Barker, Ph.D. Oceanographer
Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov
really? I thought lib was for libs, and bin for binaries (or executable scripts.)
Re-reading the original post, I agree with you. In this context, binaries meant "executables", which should live in bin. Luckily it is only Windows where this is ambiguous.
Exactly-- as Windows searches for both dlls and executables (and scripts) on %PATH%, it doesn't make a difference if you mix them up.
Is there anything else to be answered here or can this be closed?
I think this is just a documentation issue now. Might not even live in conda-forge. It could be a conda-build docs issue...
cc-ing @msarahan in regards to the documentation issue.
@jakirkham @pelson Doesn't seem like this ever went anywhere. I'm happy to create an issue in conda-build for this, if I can just get some help narrowing down what is needed. We can also put a note somewhere in the conda-forge docs. Is this knowledge for package creators or packages users? Or both?
Hey @kathatherine, the gist of the issue is that on Windows directories containing scripts, executables and libraries are added to the same PATH
environment variable. Windows uses this environment variable both when searching for a script or an executable to run and when searching for libraries to link to. Unix-y OSes don't do this. So there is an ambiguity around where scripts, executables, and libraries should be placed. It would be good to have this clarified in the conda-build docs. One answer to this would be:
LIBRARY_BIN
LIBRARY_LIB
(only used at build time)SCRIPTS
Windows uses this environment variable both when searching for a script or an executable to run and when searching for libraries to link to
Executables and DLLs in LIBRARY_BIN
Windows also looks for dlls "next to" an executable or other library -- so putting them together makes sense.
This leads to DLL Hell, but that comes with the territory.
@jakirkham: what's the difference in this contect between Scripts and Executables? Is a script a Python (opr other interpreted language) script, and therefor not linked directly to any DLLs?
Yeah exactly.
@jakirkham So just to clarify, this is for package builders to know better where to place things so that users of their packages won't have to do it manually?
I'm currently assuming this is what needs more information: https://docs.conda.io/projects/conda-build/en/latest/user-guide/environment-variables.html#environment-variables-set-during-the-build-process
Yes
That could be a natural place to include this
E.g. if a environment should contain a binary which should be available to python apps which run in that enviroment. E.g. pandoc, whichshould be available for
nbconvert
orpypandoc
.This isn't handled consitently in the conda-recipe repo: a linux is isnatleld into
PREFIX/bin
, but windows sometimes intoLIBRARY_BIN
and sometimes intoSCRIPTS
.In my windows python,
LIBRARY_BIN
is automatically added to the path (os.environ["PATH"]
containsLIBRARY_BIN
) but not scripts. For this I would prefer that such apps go intoLIBRARY_LIB
, so that they are available even if I don't activate the env but call python there directly.I've no clue how Linux/OSX handle this...