示例#1
0
文件: setup.py 项目: octwanna/pyCGNS
incs = []
libs = []

args, unknown = pr.parse_known_args()

if args.incs is not None:
    incs = [
        os.path.expanduser(path) for path in args.incs.split(os.path.pathsep)
    ]
if args.libs is not None:
    libs = [
        os.path.expanduser(path) for path in args.libs.split(os.path.pathsep)
    ]

try:
    (CONFIG, status) = setuputils.search(incs, libs)
except setuputils.ConfigException as val:
    print('Cannot build pyCGNS without:', val)
    sys.exit(1)

print(setuputils.pfx + '-' * 65)

new_args = []
for arg in sys.argv:
    if (not ('-I=' in arg or '--includes=' in arg)
            and not ('-U' in arg or '--update' in arg)
            and not ('-g' in arg or '--generate' in arg)
            and not ('-L=' in arg or '--libraries=' in arg)):
        new_args += [arg]
sys.argv = new_args
示例#2
0
    deps = ['Cython', 'HDF5', 'numpy', 'vtk', 'qtpy']

RUN_REQUIRES = ['numpy', 'future']
SETUP_REQUIRES = RUN_REQUIRES + ['cython>=0.25', 'pkgconfig']

# Remove crashing deps test
if 'sdist' in sys.argv:
    deps = ['Cython', 'numpy', 'vtk', 'qtpy']

# Dirty patch
# Get required EGG if needed
import setuptools.dist

dist = setuptools.dist.Distribution(dict({'setup_requires': SETUP_REQUIRES}))
try:
    (CONFIG, status) = search(incs, libs, deps=deps)
except ConfigException as e:
    log('***** Cannot build pyCGNS without: {}'.format(e))
    sys.exit(1)

# Fake HDF5 Config
if 'sdist' in sys.argv:
    CONFIG.HDF5_HST = 1
    CONFIG.HDF5_H64 = 1
    CONFIG.HDF5_HUP = 1
    CONFIG.HDF5_VERSION = "1.10.4"
    CONFIG.HDF5_PARALLEL = 0

line()

new_args = []