Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-23835: Support conda compilers and conda third parties #76

Merged
merged 27 commits into from
Apr 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e375b81
Update table file for third parties
brianv0 Aug 7, 2019
a4a286b
Support configs directory for external third parties
gcomoretto Aug 22, 2018
cc6a5fa
Add fftw config
brianv0 Aug 7, 2019
4f48c96
Added ndarray.cfg
gcomoretto Oct 18, 2018
787c845
Added minuit2 cfg file
gcomoretto Oct 30, 2018
6abaa02
Added log4cxx.cfg file
gcomoretto Oct 26, 2018
e8548b7
Added apr_util.cfg
gcomoretto Oct 25, 2018
0695c65
Add gsl.cfg file
gcomoretto Oct 22, 2018
bc2ab2c
Added cfitsio config file
gcomoretto Oct 22, 2018
1cb529a
Added apr.cfg
gcomoretto Sep 6, 2018
3baffca
added numpy.cfg
gcomoretto Aug 30, 2018
b749bd6
Added config folder for 3rd party cfg files
gcomoretto Aug 28, 2018
18963ef
Add starlink_ast config
brianv0 Aug 5, 2019
573a169
Add pybind11 to configs
brianv0 Aug 5, 2019
234b5eb
Add python config
brianv0 Aug 5, 2019
775f112
Add eigen config
brianv0 Aug 14, 2019
0cb0673
Update for minuit2_standalone
brianv0 Aug 14, 2019
94cfc67
Add galsim config
brianv0 Sep 5, 2019
b95a975
Added minuit2 cfg file
gcomoretto Oct 30, 2018
325302f
Update for minuit2_standalone
brianv0 Aug 14, 2019
853d5dc
Fix Minuit2 for minuit2_standalone
brianv0 Sep 13, 2019
0adcb06
Add use_conda_compilers and Preserve CONDA_BUILD_SYSROOT
brianv0 Mar 11, 2020
91a2959
Add xpa config
brianv0 Mar 11, 2020
df9eef9
Remove unused anaconda3 table prepends
brianv0 Apr 25, 2020
8e7a200
Add eigen to ndarray config
brianv0 Apr 27, 2020
a2d92fa
Use conda helper methods in config files
brianv0 Apr 27, 2020
48994a5
Add rpath fixes back for darwin
brianv0 Apr 27, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 13 additions & 0 deletions configs/apr.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# -*- python -*-

import lsst.sconsUtils

dependencies = {
"required": [],
}

config = lsst.sconsUtils.ExternalConfiguration(
__file__,
headers=["apr-1/apr.h"],
libs=["apr-1"],
)
13 changes: 13 additions & 0 deletions configs/apr_util.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# -*- python -*-

import lsst.sconsUtils

dependencies = {
"required": ["apr"],
}

config = lsst.sconsUtils.ExternalConfiguration(
__file__,
headers=[],
libs=["aprutil-1", "iconv"],
)
12 changes: 12 additions & 0 deletions configs/boost.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# -*- python -*-

import lsst.sconsUtils

dependencies = {}

config = lsst.sconsUtils.ExternalConfiguration(
__file__,
headers=["boost/version.hpp"],
libs=["pthread"],
eupsProduct="boost"
)
15 changes: 15 additions & 0 deletions configs/boost_filesystem.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

# -*- python -*-

import lsst.sconsUtils

dependencies = {
"required": ["boost", "boost_system"],
}

config = lsst.sconsUtils.ExternalConfiguration(
__file__,
headers=["boost/filesystem.hpp"],
libs=["boost_filesystem"],
eupsProduct="boost",
)
14 changes: 14 additions & 0 deletions configs/boost_math.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# -*- python -*-

import lsst.sconsUtils

dependencies = {
"required": ["boost"],
}

config = lsst.sconsUtils.ExternalConfiguration(
__file__,
headers=["boost/math/tr1.hpp"],
libs=["boost_math_c99"],
eupsProduct="boost",
)
14 changes: 14 additions & 0 deletions configs/boost_program_options.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# -*- python -*-

import lsst.sconsUtils

dependencies = {
"required": ["boost"],
}

config = lsst.sconsUtils.ExternalConfiguration(
__file__,
headers=["boost/program_options.hpp"],
libs=["boost_program_options"],
eupsProduct="boost",
)
14 changes: 14 additions & 0 deletions configs/boost_regex.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# -*- python -*-

import lsst.sconsUtils

dependencies = {
"required": ["boost"],
}

config = lsst.sconsUtils.ExternalConfiguration(
__file__,
headers=["boost/regex.hpp"],
libs=["boost_regex"],
eupsProduct="boost",
)
14 changes: 14 additions & 0 deletions configs/boost_serialization.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# -*- python -*-

import lsst.sconsUtils

dependencies = {
"required": ["boost"],
}

config = lsst.sconsUtils.ExternalConfiguration(
__file__,
headers=["boost/serialization/serialization.hpp"],
libs=["boost_serialization"],
eupsProduct="boost",
)
15 changes: 15 additions & 0 deletions configs/boost_system.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# -*- python -*-

import lsst.sconsUtils

dependencies = {
"required": ["boost"],
}

config = lsst.sconsUtils.ExternalConfiguration(
__file__,
headers=["boost/system/config.hpp"],
libs=["boost_system"],
eupsProduct="boost",
)

14 changes: 14 additions & 0 deletions configs/boost_test.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# -*- python -*-

import lsst.sconsUtils

dependencies = {
"required": ["boost"],
}

config = lsst.sconsUtils.ExternalConfiguration(
__file__,
headers=["boost/test/unit_test.hpp"],
libs={"main": [], "test": ["boost_unit_test_framework"]},
eupsProduct="boost",
)
14 changes: 14 additions & 0 deletions configs/boost_thread.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# -*- python -*-

import lsst.sconsUtils

dependencies = {
"required": ["boost", "boost_system"],
}

config = lsst.sconsUtils.ExternalConfiguration(
__file__,
headers=["boost/thread.hpp"],
libs=["boost_thread"],
eupsProduct="boost",
)
18 changes: 18 additions & 0 deletions configs/cfitsio.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# -*- python -*-

import lsst.sconsUtils

dependencies = {
"required": [],
}

class Configuration(lsst.sconsUtils.ExternalConfiguration):

def configure(self, conf, packages, check=False, build=True):
lsst.sconsUtils.ExternalConfiguration.configure(self, conf, packages, check)
if check:
return conf.checkLib("cfitsio", "ffopen", "fitsio.h", language="C", autoadd=False)
conf.env.libs["main"].append("cfitsio")
return True

config = Configuration(__file__)
26 changes: 26 additions & 0 deletions configs/eigen.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# -*- python -*-

import os
import lsst.sconsUtils
from lsst.sconsUtils import ExternalConfiguration
from lsst.sconsUtils.utils import use_conda_compilers, get_conda_prefix

dependencies = {
"required": [],
}

class EigenConfiguration(ExternalConfiguration):

def configure(self, conf, packages, check=False, build=True):
configured = ExternalConfiguration.configure(self, conf, packages, check, build)
if use_conda_compilers():
# Support header namespaces in conda-forge
includePath = os.path.join(get_conda_prefix(), "include/eigen3")
conf.env.AppendUnique(XCPPPATH=includePath)
return configured

config = EigenConfiguration(
__file__,
headers=["Eigen/Core"],
libs=[],
)
13 changes: 13 additions & 0 deletions configs/fftw.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# -*- python -*-

import lsst.sconsUtils

dependencies = {
"required": [],
}

config = lsst.sconsUtils.ExternalConfiguration(
__file__,
headers=["fftw3.h"],
libs=["fftw3","fftw3f"],
)
13 changes: 13 additions & 0 deletions configs/galsim.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# -*- python -*-

import lsst.sconsUtils

dependencies = {
"required": ["numpy", "fftw", "eigen"],
}

config = lsst.sconsUtils.ExternalConfiguration(
__file__,
headers=["GalSim.h"],
libs=["galsim"],
)
13 changes: 13 additions & 0 deletions configs/gsl.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# -*- python -*-

import lsst.sconsUtils

dependencies = {
"required": [],
}

config = lsst.sconsUtils.ExternalConfiguration(
__file__,
headers=["gsl/gsl_rng.h"],
libs=["gslcblas", "gsl"],
)
13 changes: 13 additions & 0 deletions configs/log4cxx.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# -*- python -*-

import lsst.sconsUtils

dependencies = {
"required": [],
}

config = lsst.sconsUtils.ExternalConfiguration(
__file__,
headers=["log4cxx/logger.h"],
libs=["log4cxx"],
)
26 changes: 26 additions & 0 deletions configs/minuit2.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# -*- python -*-

import lsst.sconsUtils
from lsst.sconsUtils import ExternalConfiguration
from lsst.sconsUtils.utils import use_conda_compilers, get_conda_prefix
import os

dependencies = {
"required": [],
}

class Minuit2Configuration(ExternalConfiguration):

def configure(self, conf, packages, check=False, build=True):
configured = ExternalConfiguration.configure(self, conf, packages, check, build)
if use_conda_compilers():
# Support header namespaces in conda-forge
includePath = os.path.join(get_conda_prefix(), "include/Minuit2")
conf.env.AppendUnique(XCPPPATH=includePath)
return configured

config = Minuit2Configuration(
__file__,
headers=["Minuit2/FCNBase.h"],
libs=["Minuit2"],
)
17 changes: 17 additions & 0 deletions configs/ndarray.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# -*- python -*-

import lsst.sconsUtils

dependencies = {
"required": ["boost", "numpy", "fftw", "eigen"],
"buildRequired": ["boost_test", "pybind11"],
}

config = lsst.sconsUtils.Configuration(
__file__,
headers=["lsst/ndarray.h"],
libs=[],
hasDoxygenInclude=False,
hasDoxygenTag=False,
hasSwigFiles=False
)
31 changes: 31 additions & 0 deletions configs/numpy.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# -*- python -*-

import lsst.sconsUtils
import subprocess

dependencies = {}


class Configuration(lsst.sconsUtils.Configuration):

def __init__(self):
self.name, self.root = self.parseFilename(__file__)
try:
version, productDir = self.getEupsData(self.name)
self.version = version
except:
pass

def configure(self, conf, packages, check=False, build=True):
lsst.sconsUtils.log.info("Configuring package '%s'." % self.name)
try:
# Returns the path to a single include directory
output = subprocess.check_output(["python", "-c",
"import numpy; print(numpy.get_include())"]).decode()
output = output.strip()
except subprocess.CalledProcessError:
return False
conf.env.AppendUnique(XCPPPATH=[output])
return True

config = Configuration()
13 changes: 13 additions & 0 deletions configs/pybind11.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# -*- python -*-

import lsst.sconsUtils

dependencies = {
"required": ["python"],
}

config = lsst.sconsUtils.ExternalConfiguration(
__file__,
headers=["pybind11/pybind11.h"],
libs=[],
)