[Scons-users] Windows installer for SCons 3.0.1

Bill Deegan bill at baddogconsulting.com
Tue Jun 12 10:09:35 EDT 2018


Steve,

There no reason your script can't be modified to work with virtualenvs.

Just create a virtualenv at:

c:\scons\3.0.1
c:\scons\2.5.1

And then modify your script to use c:\scons as the base instead of <python
install>\scripts\...
If you want a version per python version, similar path nameing should also
do the trick.

-Bill

On Tue, Jun 12, 2018 at 12:53 AM, Steve Hill (Wireless) <
Steve.Hill1 at viavisolutions.com> wrote:

> Thanks Bill.
>
>
>
> I don’t think that virtualenv is going to work for us. As Mats said, we
> have different projects using different SCons versions and we have a switch
> over period between two versions of SCons for any given project, where
> multiple version are permitted. The standard script that implements this is:
>
>
>
> #! /usr/bin/env python
>
> import os, sys
>
>
>
> # Define the list of allowed SCons versions, in priority order - with the
> preferred versions first
>
> versions = [
>
>     ("2.5.1", ""),
>
>     ("3.0.1", ""),
>
>     ]
>
>
>
> forced = False
>
>
>
> # The first argument maybe the specific version of SCons to use so check
> for that...
>
> if len(sys.argv) > 1:
>
>     for version, flags in versions:
>
>         if sys.argv[1] == version:
>
>             print "Forcing to SCons version", version
>
>            forced = True
>
>             versions = [
>
>                     (version, flags)
>
>                     ]
>
>             del sys.argv[1]
>
>             break
>
>
>
> for version, flags in versions:
>
>     batchFile = os.path.join(os.path.dirname(sys.executable), 'Scripts',
> 'scons-%s.bat' % version)
>
>     if os.path.exists(batchFile):
>
>         cmd = '\"%s\" %s ' % (batchFile, flags) + ' '.join(defaults +
> sys.argv[1:])
>
>         sys.exit(os.system(cmd))
>
> else:
>
>     if forced:
>
>         print "SCons version", versions[0][0], "is not installed"
>
>     else:
>
>         print "No supported version of SCons is installed"
>
>
>
> This allows all the users to have multiple versions of SCons installed and
> each project will use the version that is to be used for that project – or
> fail if it is not currently installed. I’ll have to look at whether I can
> create a .zip file for each version of SCons 3.x.x that we end up using to
> allow multiple concurrent installations…
>
>
>
> Thanks,
>
>
>
> S.
>
>
>
> *From:* Scons-users [mailto:scons-users-bounces at scons.org] *On Behalf Of *Bill
> Deegan
> *Sent:* 11 June 2018 16:25
> *To:* SCons users mailing list
> *Subject:* Re: [Scons-users] Windows installer for SCons 3.0.1
>
>
>
> Steve,
>
>
>
> Downloads page updated.
>
>
>
> -Bill
>
>
>
> On Mon, Jun 11, 2018 at 8:14 AM, Mats Wichmann <mats at wichmann.us> wrote:
>
> On 06/11/2018 09:04 AM, Bill Deegan wrote:
> > Steve,
> >
> > In that case, virtualenv is your friend
> >
> > virtualenv scons-#.#.#
> > scons-#.#.#\scripts\activate.bat
> > pip install -U pip
> > pip install scons
> >
> > You can create one virtualenv per scons version.
> >
> > -Bill
>
> my relatively rarely-used Windows setup has one py2+scons3 setup and one
>  p3+scons3 setup, and this works well.
>
> on the other hand, if the issue is different projects using different
> scons versions, adding a local-install scons to the project could also
> work.  that way you're sure to have the right one - have done that
> experimentally and it seems to work fine too.
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
>
> _______________________________________________
> 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/20180612/7f16133e/attachment.html>


More information about the Scons-users mailing list