Opened 19 years ago

Closed 19 years ago

#122 closed defect (fixed)

target-os not always set up?

Reported by: Dave Abrahams Owned by: ghost
Priority: major Milestone:
Component: component1 Version:
Keywords: Cc: rene@…

Description

In order to get the right suffix on python extensions built for cygwin, it seems to me that the following ought to have been enough:

type.set-generated-target-suffix PYTHON_EXTENSION : : so ;
type.set-generated-target-suffix PYTHON_EXTENSION : <target-os>windows : pyd ;
type.set-generated-target-suffix PYTHON_EXTENSION : <target-os>cygwin : dll ;

but if I do that, cygwin PYTHON_EXTENSIONs end up with a .so extension

Instead, I had to do:

type.set-generated-target-suffix PYTHON_EXTENSION : : so ;
type.set-generated-target-suffix PYTHON_EXTENSION : <os>windows : pyd ;
type.set-generated-target-suffix PYTHON_EXTENSION : <os>cygwin : dll ;
type.set-generated-target-suffix PYTHON_EXTENSION : <os>cygwin <target-os>windows : pyd ;
type.set-generated-target-suffix PYTHON_EXTENSION : <os>windows <target-os>cygwin : dll ;

Change History (5)

comment:1 by grafik, 19 years ago

Note, the target-os feature is declared as propagated and link-incompatible, with an explicit default value. So as far as I understand the feature mechanics it's not a problem with the declaration, i.e. it's not an optional feature.

comment:2 by Dave Abrahams, 19 years ago

This is doubly weird because there is no <os> feature AFAICT; the proper selection would have been <host-os>

comment:3 by Dave Abrahams, 19 years ago

Cc: rene@… added

OK, there is an <os> feature, but it has the same format as the result of [ os.name ]. As it turns out, however, [ default-host-os] is returning "unix" from cygwin builds of bjam.

comment:4 by grafik, 19 years ago

So the problem is that [ os.name ] returns something other than "cygwin" for the cygwin built bjam? I say this because the default-host-os logic is to try and match that name if it's in the known list. What does os.name return for a cygwin bjam?

comment:5 by Dave Abrahams, 19 years ago

Resolution: fixed
Status: newclosed

Fixed locally and I will check it in, but please see #124

Note: See TracTickets for help on using tickets.