[Scons-users] "pip install scons" result in a broken installation that is unusable

Bill Deegan bill at baddogconsulting.com
Thu Oct 11 13:45:10 EDT 2018


This issue is resolved by patch merged into master in may.
https://github.com/SCons/scons/pull/3134

You can try via package I just uploaded to testpypi
pip install --index-url https://test.pypi.org/simple/
scons==3.1.0.alpha.20181011

Please let me know if this works for you.
I tried in a freshly built python on my linux system.
Seems to work for me.

-Bill



On Thu, Oct 11, 2018 at 1:37 PM Mats Wichmann <mats at wichmann.us> wrote:

> On 10/11/2018 10:37 AM, Mats Wichmann wrote:
> > On 10/11/2018 10:19 AM, Bill Deegan wrote:
> >> It should work with recent pip.
> >> Let me take a look today.
> >> -Bill
> >
> > IMO, some of the paths are ready as they are and should not be joined
> > with further bits. a little reorg is needed there.
>
> to be a little less cryptic, it seems that the very first place a path
> could be added to prefs is here:
>
> # - running from egg check
> try:
>     import pkg_resources
> except ImportError:
>     pass
> else:
>     # when running from an egg add the egg's directory
>     try:
>         d = pkg_resources.get_distribution('scons')
>     except pkg_resources.DistributionNotFound:
>         pass
>     else:
>         prefs.append(d.location)
>
> This stanza succeeds on all kinds of installations, "running from egg"
> does not seem precise; whatever get_distribution looks for is found both
> in Linux distro packages and pip installed locations.  This gives you
> back a path that does not want 'lib' or 'lib/pythonX.Y/site-packages'
> appended. For example for a particular virtualenv that has pip-install'd
> scons, that stanza yields:
>
> /home/mats/.virtualenvs/py27+scons/lib/python2.7
>
> Further down, after the appending that happens in the two list
> comprehensions to all the paths in prefs, that expanded to these two:
>
> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib
>
> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib/python2.7/site-packages
>
> which are throwaways, engine will never be found in those after they are
> expanded to these four locations on the final round:
>
>
> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib/scons-3.0.1
>
> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib/python2.7/site-packages/scons-3.0.1
> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib/scons
>
> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/lib/python2.7/site-packages/scons
>
> there is no site-packages/lib and definitely no
> site-packages/lib/.../site-packages - really this is the problem Samuel
> is seeing.
>
> What we really wanted to generate from that original first path was:
>
> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/scons-3.0.1
> /home/mats/.virtualenvs/py27+scons/lib/python2.7/site-packages/scons
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20181011/6fcab6f5/attachment-0001.html>


More information about the Scons-users mailing list