示例#1
0
def _init_posix(vars):
    """Initialize the module as appropriate for POSIX systems."""
    # _sysconfigdata is generated at build time, see _generate_posix_vars()
    #
    # GraalPython patch: following commented out code would import module named,
    # e.g., _sysconfigdata__linux_x86_64-linux-gnu, which should contain the
    # configuration data. We would need to distribute such module for all supported
    # systems, instead, we reuse the logic from our patch of distutils.
    #
    # name = _get_sysconfigdata_name()
    # _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
    # build_time_vars = _temp.build_time_vars
    #
    import _sysconfig
    vars.update(_sysconfig._get_posix_vars())
示例#2
0
# (a) the Software, and
#
# (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
# one is included with the Software each a "Larger Work" to which the Software
# is contributed by such licensors),
#
# without restriction, including without limitation the rights to copy, create
# derivative works of, display, perform, and distribute the Software and make,
# use, sell, offer for sale, import, export, have made, and have sold the
# Software and the Larger Work(s), and to sublicense the foregoing rights on
# either these or other terms.
#
# This license is subject to the following condition:
#
# The above copyright notice and either this complete permission notice or at a
# minimum a reference to the UPL must be included in all copies or substantial
# portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.


from _sysconfig import _get_posix_vars

build_time_vars = _get_posix_vars()
def _init_posix():
    """Initialize the module as appropriate for POSIX systems."""
    global _config_vars
    _config_vars = _sysconfig._get_posix_vars()