[Scons-dev] adding more configure tests to SCons
Carnë Draug
carandraug+dev at gmail.com
Thu Jan 29 07:23:54 EST 2015
On 26 January 2015 at 15:56, Russel Winder <russel at winder.org.uk> wrote:
> On Mon, 2015-01-26 at 13:41 +0000, Carnë Draug wrote:
>> Hi
>>
>> I have a set of configure tests which today I have copied and paste into
>> my 4th project. They are really simple and very general use-case [1], so
>> I am thinking of contributing them to SCons. They check for LaTeX document
>> class, package, availability of a program, and perl modules. At least the
>> last two have counterparts on autoconf.
>>
>> Can I contribute them to SCons? I am aware of the SCons autoconf recipes
>> wiki page [2] but that's far from ideal. I wonder if the existence of such
>> page means that such recipes are not desired on SCons.
>>
>> If not, is there any sort of SCons extras? autoconf has at least the
>> autoconf-archive [3].
>
> We are trying to build up a culture of people using DVCS (usually Git or
> Mercurial) to provide "rolling release" versions of tools and other
> extras. Wiki pages are good for many things, but storing software is not
> one of them. Many of the pages of the SCons wiki are there more for
> historical record than ongoing usefulness.
>
> So if you can structure you extra as a tool or general package and then
> publicize the repository, it can get added to the various publicized
> lists. If then people start saying "this should be in the distribution",
> that can initiate a process leading to the tool/package being absorbed
> into the main distribution.
I am not adding support for new languages to SCons, the contributions I
proposed are way to small for this. Specially in the case of the LaTeX
checks, SCons already has the builder, it is only missing the checks,
just like it has CheckCHeader and CheckCXXHeader. See
def CheckLaTeXPackage(context, package):
context.Message("Checking for LaTeX package %s..." % package)
is_ok = 0 == subprocess.call(["kpsewhich", package + ".sty"],
stdout = open(os.devnull, "wb"))
context.Result(is_ok)
return is_ok
def CheckLaTeXClass(context, doc_class):
context.Message("Checking for LaTeX document class %s..." % doc_class)
is_ok = 0 == subprocess.call(["kpsewhich", doc_class + ".cls"],
stdout = open(os.devnull, "wb"))
context.Result(is_ok)
return is_ok
Maybe the check for a perl module can be considered to specialized, but
certainly checking installation of a program is considered general enough?
See
def CheckProg(context, app_name):
context.Message("Checking for %s..." % app_name)
is_ok = context.env.WhereIs(app_name)
context.Result(is_ok)
return is_ok
Carnë
More information about the Scons-dev
mailing list