#distutils

/

      • koobs
        dstufft; ping when youre around
      • dstufft
        koobs: pong
      • koobs
        dstufft; we've moved our ports system to support a staging area pre-install, to ensure packages dont pollute the users environment. most things support a notion of a --distdir, and it seems we're covered for python ports that use pure distutils, but not those that use setuptools/easy_install. a) I want to check to make sure we arent missing some obvious functionality b) If setuptools doesnt
      • currently support it, id like to define/brainstorm what is it that we might need under your prior offer of 'wed love to know how to make OS installer/packagers lives easier'
      • dstufft; sorry for verbose :)
      • dstufft
        koobs: refresh my memory what --distdir does
      • koobs
        dstufft; So at the moment, the best one liner description i can offer is something like 'setuptools/easy_install supports installing python modules/eggs/packages/whatever-terminology-de-jour-is into a system/user supplied directory (DESTDIR)
      • sorry, i meant --destdir
      • ala like what configure/make and other build systems have
      • dstufft
        you might want --root
      • koobs
        is that setuptools/easy_install usable?
      • dstufft
        and distutils
      • it'll just prefix the install paths
      • koobs
        i see.
      • hmm.
      • available via cli arg to easy_install?
      • sounds odd that we'd miss an obvious arg like that
      • dstufft
        so /whatever/the/path with --root /foo/bar/ becomes /foo/bar/whatever/the/path
      • koobs
        hmmmmmmm
      • dstufft
        not sure about easy_install
      • koobs
        dstufft; let me get back to you!
      • dstufft
        it is to setup.py and pip
      • koobs
        dstufft; and thanks
      • dstufft
        and in pip 1.5 it even works with wheel!
      • koobs: sure
      • koobs
        not sure we can use wheel :]
      • dont forget, we need to chase the setuptools merge (this is a blocker to that) which will them let us start looking at pip as the frontend
      • oh shit, ive been shaped :|
      • dstufft
        "been shaped" ?
      • koobs
        internet cap
      • or google is down
      • :)
      • dstufft
        oh
      • thought it was some of your aussie slang again :]
      • koobs
        can never be too sure ;)
      • will get back to you on root
      • dstufft
        looks like --root
      • koobs
        roger
      • ill find out whether we noticeed that, or where we might have had issues using it
      • dstufft
        koobs: i'm not sure what flag you're using
      • --destdir isn't an option to distutils
      • I just looked?
      • koobs
        yeh i know, that link was just to give you a description of what destdir is
      • not as it relates to python
      • let me see how we do it with distutils pure
      • ahh, here we are
      • PYDISTUTILS_INSTALLARGS+= --root=${STAGEDIR}
      • dstufft
        :]
      • koobs
        so we use --root for pure distutils ports
      • so that must mean it doesnt work (or is not usable via easy_install)
      • ill confirm and get info
      • dstufft
        ah
      • looks like easy_install doesn't have
      • --root
      • koobs
        ah!
      • correct me where im imprecise in my understanding, pip uses setuptools which uses distutils+ more, right?
      • easy_install = cli to setuptools
      • dstufft
        correct
      • koobs
      • --prefix, or is that different (or a subset?)
      • dstufft
        looks like --prefix overrides the default prefix
      • koobs
        default ?
      • dstufft
        python -c "import sys; print(sys.prefix)"
      • so --root is like --destdir, it is prepended to the front of the complete path
      • koobs
        hmm, so it doesnt just affect install location?
      • dstufft
        --prefix is like --prefix, it changes the root
      • koobs tries to grok the diff between root & prefix
      • koobs
        root/prefix/path ?
      • dstufft
        koobs: yea
      • prefix is always appended, and your python has a default one
      • it's probably /usr
      • or /usr/local
      • koobs
        hmm, easy_install also has --install-dir=DIR, -d DIR
      • dstufft
        --prefix changes that
      • koobs
        oh.
      • o_O
      • dstufft
        I'm pretty sure you want --root, but it might mean you can't use easy_install, with --root you can just cp -r the files from the root dir onto /
      • and it'll be just like you installed them
      • without --root
      • koobs
        so we have --prefix, --install-dir (and distutils but not easy_install has --root) - and none of the former are like --root (or can used to emulate a --root)
      • dstufft; we dont get a choice of what the developer/upstream uses, strictly speaking, without patch fanfare
      • sound slike --root in easy_install is whats needed (naming for consistency with distutils, rather than --destdir)
      • dstufft; if that above is the case, what are your thoughts on supporting it ?
      • dstufft
        I don't have any control over easy_install
      • koobs
        the question is not whether you can do it for us :)
      • setuptools is packaging territory no?
      • given the work to merge/deprecate distribute, rah rah
      • dstufft
        koobs: yea it is, I'm +1 on easy_install getting --root, but it's jaraco you'd have ro convince to accept the PR
      • koobs
        roger
      • ill prep a non-pep-pep for background, context + high level prop
      • i want to see how the 'other' OS's work around it, and if there's value for them
      • dstufft; question, is there an equivalent 'python setup.py <foo>' equivalent to easy_install frontend ?
      • could we get around it like that?
      • dstufft
        python setup.py install --root
      • let me show you what pip does
      • koobs
        and that will keep the setuptoolsey bits of the module ?
      • ta
      • dstufft
      • ^ the forces everything to use setuptools for consitency, even if they use distutils
      • koobs
        danke
      • dstufft
        and it just calls a subshell to execute it
      • koobs
        oh?
      • :D
      • if not self.as_egg:
      • install_args += ['--single-version-externally-managed']
      • how does that work without having to provide full module namespaces?
      • isnt that the issue there?
      • dstufft
        I don't understand the question
      • koobs
        Also, Q: Does easy_install just end up invoking 'setup.py install' anyway ? (thinking about PR/patch complexity here)
      • dstufft
        yea I think it does
      • i'm lik e95% sure
      • koobs
        rog
      • just writing down summary options
      • hmmm
      • fscking confusing.
      • --single-version-externally-managed must be used with --root or --record
      • *ponders where bdist_egg comes in*
      • does pip use bdist_egg or egg-based builds?
      • dstufft
        koobs: no
      • qwcode joined the channel
      • qwcode_ joined the channel
      • qwcode_ has quit
      • qwcode has quit
      • qwcode joined the channel
      • koobs
        dstufft; hmm, so what is the term used for setuptools-based modules when you dont use bdist_* to package/install it ?
      • dstufft
        sdist
      • koobs
        jees i feel like a noob :)
      • right, and thats what pip uses ?
      • of course, not incl wheel stuff
      • dstufft; sorry for the obvious questions, im trying to formulate a question that will expose what it is thats causing the ambiguity for me
      • dstufft
        yea
      • thats what pip uses
      • koobs
        could you point me to a file/line please?
      • dstufft
        for what?
      • koobs
        where pip uses it
      • dstufft
        that's spread all over the code base
      • koobs
        ah ok, thanks
      • ill do some grepping and more reading
      • dstufft; one immediate question, when using sdist, how to you deal with compiling c extensions ?
      • dstufft
        distutils does it
      • we just called setup.py install
      • koobs
        ah!
      • dstufft
        distutils handles the heavy machinary
      • koobs
        nice
      • makes a little more sense
      • qwcode has quit
      • carljm_ joined the channel
      • carljm has quit
      • hardwire has quit