Search
SailfishOS Open Build Service
>
Projects
>
home:nodevel
:
python3-pandas
>
python3-buildservice-tweak
> sitecustomize.py
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File sitecustomize.py of Package python3-buildservice-tweak
# monkey-patch os.urandom to return all zeroes import sys,os import traceback warning = """\ ***************** ** WARNING ** ***************** This instance of Python is configured not to produce random numbers. THAT IS VERY DANGEROUS. Unless you know for sure that this is what you want, make sure that you remove the package `python3-buildservice-tweak`, or the file /usr/lib64/python3.5/site-packages/sitecustomize.py If this message is showing up in the buildservice, don't worry; the purpose of removing randomness is making builds reproducible even in the weird case that they're using random numbers. (also as of python 3.5, gathering randomness through os.urandom will block on buildservice VMs because it requires true entropy. see bsc#949816) *****************\ """ print(warning, file=sys.stderr) def os_urandom_patch(x): print("detected call to os.urandom", file=sys.stderr) traceback.print_stack() return b"\0" * x os.urandom = os_urandom_patch