Skip to content

build of swigged library fails if build_dir is used #1703

Closed

Description

@bdbaddog

This issue was originally created at: 2007-08-07 09:14:16.
This issue was reported by: joe_maruszewski.
joe_maruszewski said at 2007-08-07 09:14:16

Hi,

I'm trying to build a shared lib to load into python using swig. The following
is used:

lib = env.SharedLibrary("_linalg",
"linalg.i",
SHLIBPREFIX = "",
SHLIBSUFFIX = ".pyd")

which works fine if I try to build in the source directory. It fails though if
I specify a build directory:

#SConscript("source/SConscript") # this works...
SConscript("source/SConscript", build_dir = "build") # this does not...

with the error:

scons: Reading SConscript files ...
IOError: [Errno 2] No such file or directory: 'linalg.i':

It appears that it is trying to use the ".i" file before it has been copied over
to the build directory.

Is there a workaround for this issue? A zip file demonstrating the problem will
be attached.
Thanks,
Joe

joe_maruszewski said at 2007-08-07 09:15:57

Created an attachment (id=206)
zip file that demonstrates problem

stevenknight said at 2007-08-07 16:03:30

Resolved for next release. Many thanks for the test case.

joe_maruszewski attached Build-Dir.zip at 2007-08-07 09:15:57.

zip file that demonstrates problem

stevenknight said this issue blocks #1664 at 2007-08-07 16:03:30.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions