[Scons-users] Regression? GetOption('prefix') does not seem to work in SConscript files since Python 3.10

Mats Wichmann mats at wichmann.us
Tue Jun 21 09:59:16 EDT 2022


On 6/21/22 07:04, Robert-André Mauchin wrote:
> Hi Scons people,
> 
> 
> So I'm trying to build rmlint https://github.com/sahib/rmlint
> It worked normally on Python 3.9, but since 3.10 and 3.11, I can't
> install it in the location I want.
> 
> In the SConstruct file we have
> ```
> AddOption(
>      '--prefix', default='/usr/local',
>      dest='prefix', type='string', nargs=1,
>      action='store', metavar='DIR', help='installation prefix'
> )
> ```
> 
> which I set to /usr instead of /usr/local with `scons config --prefix=/usr`

couple of questions about the setup:


> `scons config -m 16  --prefix=/usr --actual-prefix=/usr --libdir=lib64
> DEBUG=1 SYMBOLS=1 VERBOSE=1`

-m 16 ?  was that intended to be -j 16 ?

> scons`
> 
> -> Builds correctly.
> 
> `scons install`

Those two would have to repeat the --prefix setting.  Was the above just
shorthand?

> 
> -> Install the gui sublibrary in the weong place (/usr/local instead of
> /usr/)
> 
> See a build log here:
> https://koji.fedoraproject.org/koji/taskinfo?taskID=88548801

So can see this:


cd gui && python3 setup.py install --prefix
/builddir/build/BUILDROOT/rmlint-2.10.1-10.fc37.x86_64/usr --record
.files.txt
/usr/lib/python3.11/site-packages/setuptools/dist.py:519: UserWarning:
The version specified ('2.10.1 Ludicrous Lemur') is an invalid version,
this may not work as expected with newer versions of setuptools, pip,
and PyPI. Please see PEP 440 for more details.

aside from the setuptools complaint, that looks ok, no? the "setup.py"
line has on execution expanded to a path ending in /usr, not /usr/local

What am I missing?



More information about the Scons-users mailing list