[Scons-users] Problem installing scons via pip

Eric Fahlgren ericfahlgren at gmail.com
Fri Sep 21 17:26:02 EDT 2018


It's a lot simpler than I thought it would be.  First "*pip install wheel*"
(already had it in my environment).  Next, change setup.py:509 to use
setuptools instead of distutils for the setup:

#distutils.core.setup(**arguments)
import setuptools
*setuptools*.setup(**arguments)

You're pretty much done.  I'm on Windows 10 x64, using Windows CPython
3.6.6, setuptools 40.0.0, wheel 0.31.1, and had to do a bit of hacking to
fix what appear to be platform-specific things, but since I don't have a
Linux or Mac box available, I really don't want to make any presumptions:

1) At setup.py:44, I manually replaced __VERSION__ with "3.0.1" so I could
run the setup script directly.
2) In setup.py:397 I had to add ".py" extensions to the four entries in the
"scripts" array.  This is because setup was complaining "can't find
'script/scons'", so apparently distutils knows to do this and setuptools
doesn't or something.
scripts = [
    'script/scons*.py*',
    'script/sconsign*.py*',
    'script/scons-time*.py*',
    'script/scons-configure-cache*.py*',
3) Corresponding to the above, I had to turn off adding the ".py" later at
line 327-329; I just commented out that whole if block:
#           if is_win32:
#               scons += '.py'
#               scons_ver += '.py'


Built it, ran pip, ran scons, it all worked.

> cd src
> python setup.py *bdist_wheel*
... blah blah blah for thousands of lines ...
> ll dist
-rwx------+ 1 efahlgren Domain Users 4181330 2018-09-21 14:03
scons-3.0.1-py2.py3-none-any.whl*

> pip install dist/scons-3.0.1-py2.py3-none-any.whl
Processing o:\scons\src\dist\scons-3.0.1-py2.py3-none-any.whl
Installing collected packages: scons
Successfully installed scons-3.0.1

> t:/Python36/Scripts/scons.py
scons: Reading SConscript files ...
Windows 10 build...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20180921/3926ac39/attachment.html>


More information about the Scons-users mailing list