#11906: PolyBoRi should obey some standard environment variables
-------------------------------+--------------------------------------------
   Reporter:  AlexanderDreyer  |          Owner:  AlexanderDreyer               
             
       Type:  defect           |         Status:  new                           
             
   Priority:  major            |      Milestone:  sage-4.7.3                    
             
  Component:  algebra          |       Keywords:                                
             
Work_issues:                   |       Upstream:  Not yet reported upstream; 
Will do shortly.
   Reviewer:                   |         Author:                                
             
     Merged:                   |   Dependencies:  #11575                        
             
-------------------------------+--------------------------------------------

Comment(by AlexanderDreyer):

 There are two kind of environment variables.
 First, there are {{{PATH}}}, {{{LD_LIBRARY_PATH}}}, {{{CPATH}}} (used by
 gcc} and similar ones. Those just have to be imported to the build
 environment, for instance by the following patch to !PolyBoRi's
 {{{SConstruct}}} file:

 {{{
 #!diff -u

 @@ -377,17 +377,12 @@

  tools +=  ["disttar", "doxygen"]

 -# Get paths an related things from current environment
 -# note: we cannot avoid those due to non-standard system setups
 -getenv = dict()
 -for key in ['PATH', 'HOME', 'LD_LIBRARY_PATH'] :
 -    try:
 -        getenv[key] = os.environ[key]
 -    except KeyError:
 -        pass
 +# Get paths and related things from current environment os.environ
 +# note: We cannot avoid those due to non-standard system setups,
 +#       also we do not know which variables are used in general

 -
 -env = Environment(ENV = getenv, options = opts, tools = tools, toolpath =
 '.')
 +env = Environment(ENV = os.environ, options = opts, tools = tools,
 +                  toolpath = '.')

  env['RPATH'] = env.Literal('\\$$ORIGIN/')
 }}}

 On the other hand, there are variables like {{{CFLAGS}}}, {{{LDFLAGS}}}...
 Those are not used by the compiler directly, but by {{{make}}}-based build
 systems. So we have to tell {{{scons}}} what we intended with them. For
 instance, we have to add a line like the following to the configuration
 file {{{custom.py}}} in the spkg:

 {{{
 #!python
 CXXFLAGS=os.environ['CXXFLAGS']
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11906#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to