Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sage
Path: blob/develop/src/sage_setup/autogen/flint/env.py
4086 views
1
#*****************************************************************************
2
# Copyright (C) 2023 Vincent Delecroix <[email protected]>
3
#
4
# This program is free software: you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation, either version 2 of the License, or
7
# (at your option) any later version.
8
# http://www.gnu.org/licenses/
9
#*****************************************************************************
10
11
import os
12
13
14
AUTOGEN_DIR = os.path.dirname(os.path.realpath(__file__))
15
FLINT_GIT_DIR = os.environ.get('FLINT_GIT_DIR', '')
16
FLINT_INCLUDE_DIR = os.path.join(FLINT_GIT_DIR, 'src')
17
FLINT_DOC_DIR = os.path.join(FLINT_GIT_DIR, 'doc/source')
18
19
if not os.path.isdir(FLINT_GIT_DIR) or not os.path.isdir(FLINT_INCLUDE_DIR) or not os.path.isdir(FLINT_DOC_DIR):
20
raise ValueError('FLINT_GIT_DIR (={}) environment variable must be set to the location of flint sources'.format(FLINT_GIT_DIR))
21
22