[Scons-users] Text suffix in VERSION attribute of Package not supported ?

Nils Olav Selåsdal noselasd at fiane.mooo.com
Sun Feb 15 15:27:57 EST 2015


I'm trying to use a non-number suffix in the VERSION of a Package(), 
below is a small SConstruct example:

env = Environment(tools = ['default', 'packaging'])

dummy = env.Command('dummy', None, 'touch dummy')
env.Install('/tmp', dummy)

env.Package(NAME           = 'pkg-test',
             VERSION        = '1.0-alpha',
             PACKAGEVERSION = 1,
             PACKAGETYPE    = 'targz',
)

This works fine if VERSION ends with a digit, e.g. '1.0' Or even 'alpha1.0'.

But as is it fails:

$ scons
scons: Reading SConscript files ...
TypeError: Tried to lookup Dir 'pkg-test-1.0-alpha' as a File.:
   File "/home/noselasd/dev/pkg_test/SConstruct", line 9:
     PACKAGETYPE    = 'targz',
   File "/usr/lib/scons/SCons/Environment.py", line 260:
     return MethodWrapper.__call__(self, target, source, *args, **kw)
   File "/usr/lib/scons/SCons/Environment.py", line 224:
     return self.method(*nargs, **kwargs)
   File "/usr/lib/scons/SCons/Tool/packaging/__init__.py", line 155:
     t=packager.package(env,t,source, **kw)
   File "/usr/lib/scons/SCons/Tool/packaging/targz.py", line 38:
     return bld(env, target, source, TARFLAGS='-zc')
   File "/usr/lib/scons/SCons/Builder.py", line 633:
     return self._execute(env, target, source, OverrideWarner(kw), ekw)
   File "/usr/lib/scons/SCons/Builder.py", line 554:
     tlist, slist = self._create_nodes(env, target, source)
   File "/usr/lib/scons/SCons/Builder.py", line 501:
     tlist = env.arg2nodes(target, target_factory, target=target, 
source=source)
   File "/usr/lib/scons/SCons/Environment.py", line 486:
     v = node_factory(self.subst(v, **kw))
   File "/usr/lib/scons/SCons/Node/FS.py", line 1340:
     return self._lookup(name, directory, File, create)
   File "/usr/lib/scons/SCons/Node/FS.py", line 1319:
     return root._lookup_abs(p, fsclass, create)
   File "/usr/lib/scons/SCons/Node/FS.py", line 2224:
     result.must_be_same(klass)
   File "/usr/lib/scons/SCons/Node/FS.py", line 627:
     (self.__class__.__name__, self.path, klass.__name__))


Can I not end the VERSION with non-digits, what's the restrictions ? Or 
is this a bug ?

I'm using scons as packaged in Fedora 21
$ scons --version
SCons by Steven Knight et al.:
	script: v2.3.4, 2014/09/27 12:51:43, by garyo on lubuntu
	engine: v2.3.4, 2014/09/27 12:51:43, by garyo on lubuntu
	engine path: ['/usr/lib/scons/SCons']
Copyright (c) 2001 - 2014 The SCons Foundation




More information about the Scons-users mailing list