diff --git a/docker_dev_build/bin/Activate.ps1 b/docker_dev_build/bin/Activate.ps1 new file mode 100644 index 0000000..2fb3852 --- /dev/null +++ b/docker_dev_build/bin/Activate.ps1 @@ -0,0 +1,241 @@ +<# +.Synopsis +Activate a Python virtual environment for the current PowerShell session. + +.Description +Pushes the python executable for a virtual environment to the front of the +$Env:PATH environment variable and sets the prompt to signify that you are +in a Python virtual environment. Makes use of the command line switches as +well as the `pyvenv.cfg` file values present in the virtual environment. + +.Parameter VenvDir +Path to the directory that contains the virtual environment to activate. The +default value for this is the parent of the directory that the Activate.ps1 +script is located within. + +.Parameter Prompt +The prompt prefix to display when this virtual environment is activated. By +default, this prompt is the name of the virtual environment folder (VenvDir) +surrounded by parentheses and followed by a single space (ie. '(.venv) '). + +.Example +Activate.ps1 +Activates the Python virtual environment that contains the Activate.ps1 script. + +.Example +Activate.ps1 -Verbose +Activates the Python virtual environment that contains the Activate.ps1 script, +and shows extra information about the activation as it executes. + +.Example +Activate.ps1 -VenvDir C:\Users\MyUser\Common\.venv +Activates the Python virtual environment located in the specified location. + +.Example +Activate.ps1 -Prompt "MyPython" +Activates the Python virtual environment that contains the Activate.ps1 script, +and prefixes the current prompt with the specified string (surrounded in +parentheses) while the virtual environment is active. + +.Notes +On Windows, it may be required to enable this Activate.ps1 script by setting the +execution policy for the user. You can do this by issuing the following PowerShell +command: + +PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser + +For more information on Execution Policies: +https://go.microsoft.com/fwlink/?LinkID=135170 + +#> +Param( + [Parameter(Mandatory = $false)] + [String] + $VenvDir, + [Parameter(Mandatory = $false)] + [String] + $Prompt +) + +<# Function declarations --------------------------------------------------- #> + +<# +.Synopsis +Remove all shell session elements added by the Activate script, including the +addition of the virtual environment's Python executable from the beginning of +the PATH variable. + +.Parameter NonDestructive +If present, do not remove this function from the global namespace for the +session. + +#> +function global:deactivate ([switch]$NonDestructive) { + # Revert to original values + + # The prior prompt: + if (Test-Path -Path Function:_OLD_VIRTUAL_PROMPT) { + Copy-Item -Path Function:_OLD_VIRTUAL_PROMPT -Destination Function:prompt + Remove-Item -Path Function:_OLD_VIRTUAL_PROMPT + } + + # The prior PYTHONHOME: + if (Test-Path -Path Env:_OLD_VIRTUAL_PYTHONHOME) { + Copy-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME -Destination Env:PYTHONHOME + Remove-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME + } + + # The prior PATH: + if (Test-Path -Path Env:_OLD_VIRTUAL_PATH) { + Copy-Item -Path Env:_OLD_VIRTUAL_PATH -Destination Env:PATH + Remove-Item -Path Env:_OLD_VIRTUAL_PATH + } + + # Just remove the VIRTUAL_ENV altogether: + if (Test-Path -Path Env:VIRTUAL_ENV) { + Remove-Item -Path env:VIRTUAL_ENV + } + + # Just remove the _PYTHON_VENV_PROMPT_PREFIX altogether: + if (Get-Variable -Name "_PYTHON_VENV_PROMPT_PREFIX" -ErrorAction SilentlyContinue) { + Remove-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Scope Global -Force + } + + # Leave deactivate function in the global namespace if requested: + if (-not $NonDestructive) { + Remove-Item -Path function:deactivate + } +} + +<# +.Description +Get-PyVenvConfig parses the values from the pyvenv.cfg file located in the +given folder, and returns them in a map. + +For each line in the pyvenv.cfg file, if that line can be parsed into exactly +two strings separated by `=` (with any amount of whitespace surrounding the =) +then it is considered a `key = value` line. The left hand string is the key, +the right hand is the value. + +If the value starts with a `'` or a `"` then the first and last character is +stripped from the value before being captured. + +.Parameter ConfigDir +Path to the directory that contains the `pyvenv.cfg` file. +#> +function Get-PyVenvConfig( + [String] + $ConfigDir +) { + Write-Verbose "Given ConfigDir=$ConfigDir, obtain values in pyvenv.cfg" + + # Ensure the file exists, and issue a warning if it doesn't (but still allow the function to continue). + $pyvenvConfigPath = Join-Path -Resolve -Path $ConfigDir -ChildPath 'pyvenv.cfg' -ErrorAction Continue + + # An empty map will be returned if no config file is found. + $pyvenvConfig = @{ } + + if ($pyvenvConfigPath) { + + Write-Verbose "File exists, parse `key = value` lines" + $pyvenvConfigContent = Get-Content -Path $pyvenvConfigPath + + $pyvenvConfigContent | ForEach-Object { + $keyval = $PSItem -split "\s*=\s*", 2 + if ($keyval[0] -and $keyval[1]) { + $val = $keyval[1] + + # Remove extraneous quotations around a string value. + if ("'""".Contains($val.Substring(0, 1))) { + $val = $val.Substring(1, $val.Length - 2) + } + + $pyvenvConfig[$keyval[0]] = $val + Write-Verbose "Adding Key: '$($keyval[0])'='$val'" + } + } + } + return $pyvenvConfig +} + + +<# Begin Activate script --------------------------------------------------- #> + +# Determine the containing directory of this script +$VenvExecPath = Split-Path -Parent $MyInvocation.MyCommand.Definition +$VenvExecDir = Get-Item -Path $VenvExecPath + +Write-Verbose "Activation script is located in path: '$VenvExecPath'" +Write-Verbose "VenvExecDir Fullname: '$($VenvExecDir.FullName)" +Write-Verbose "VenvExecDir Name: '$($VenvExecDir.Name)" + +# Set values required in priority: CmdLine, ConfigFile, Default +# First, get the location of the virtual environment, it might not be +# VenvExecDir if specified on the command line. +if ($VenvDir) { + Write-Verbose "VenvDir given as parameter, using '$VenvDir' to determine values" +} +else { + Write-Verbose "VenvDir not given as a parameter, using parent directory name as VenvDir." + $VenvDir = $VenvExecDir.Parent.FullName.TrimEnd("\\/") + Write-Verbose "VenvDir=$VenvDir" +} + +# Next, read the `pyvenv.cfg` file to determine any required value such +# as `prompt`. +$pyvenvCfg = Get-PyVenvConfig -ConfigDir $VenvDir + +# Next, set the prompt from the command line, or the config file, or +# just use the name of the virtual environment folder. +if ($Prompt) { + Write-Verbose "Prompt specified as argument, using '$Prompt'" +} +else { + Write-Verbose "Prompt not specified as argument to script, checking pyvenv.cfg value" + if ($pyvenvCfg -and $pyvenvCfg['prompt']) { + Write-Verbose " Setting based on value in pyvenv.cfg='$($pyvenvCfg['prompt'])'" + $Prompt = $pyvenvCfg['prompt']; + } + else { + Write-Verbose " Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virutal environment)" + Write-Verbose " Got leaf-name of $VenvDir='$(Split-Path -Path $venvDir -Leaf)'" + $Prompt = Split-Path -Path $venvDir -Leaf + } +} + +Write-Verbose "Prompt = '$Prompt'" +Write-Verbose "VenvDir='$VenvDir'" + +# Deactivate any currently active virtual environment, but leave the +# deactivate function in place. +deactivate -nondestructive + +# Now set the environment variable VIRTUAL_ENV, used by many tools to determine +# that there is an activated venv. +$env:VIRTUAL_ENV = $VenvDir + +if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) { + + Write-Verbose "Setting prompt to '$Prompt'" + + # Set the prompt to include the env name + # Make sure _OLD_VIRTUAL_PROMPT is global + function global:_OLD_VIRTUAL_PROMPT { "" } + Copy-Item -Path function:prompt -Destination function:_OLD_VIRTUAL_PROMPT + New-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Description "Python virtual environment prompt prefix" -Scope Global -Option ReadOnly -Visibility Public -Value $Prompt + + function global:prompt { + Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) " + _OLD_VIRTUAL_PROMPT + } +} + +# Clear PYTHONHOME +if (Test-Path -Path Env:PYTHONHOME) { + Copy-Item -Path Env:PYTHONHOME -Destination Env:_OLD_VIRTUAL_PYTHONHOME + Remove-Item -Path Env:PYTHONHOME +} + +# Add the venv to the PATH +Copy-Item -Path Env:PATH -Destination Env:_OLD_VIRTUAL_PATH +$Env:PATH = "$VenvExecDir$([System.IO.Path]::PathSeparator)$Env:PATH" diff --git a/docker_dev_build/bin/aafigure b/docker_dev_build/bin/aafigure new file mode 100755 index 0000000..de49d4e --- /dev/null +++ b/docker_dev_build/bin/aafigure @@ -0,0 +1,11 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# +# This file is part of aafigure. https://github.com/aafigure/aafigure +# (C) 2007 Chris Liechti +# +# SPDX-License-Identifier: BSD-3-Clause + +# command line stub for aafigure + +import aafigure.aafigure +aafigure.aafigure.main() diff --git a/docker_dev_build/bin/activate b/docker_dev_build/bin/activate new file mode 100644 index 0000000..fe7a89e --- /dev/null +++ b/docker_dev_build/bin/activate @@ -0,0 +1,66 @@ +# This file must be used with "source bin/activate" *from bash* +# you cannot run it directly + +deactivate () { + # reset old environment variables + if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then + PATH="${_OLD_VIRTUAL_PATH:-}" + export PATH + unset _OLD_VIRTUAL_PATH + fi + if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then + PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}" + export PYTHONHOME + unset _OLD_VIRTUAL_PYTHONHOME + fi + + # This should detect bash and zsh, which have a hash command that must + # be called to get it to forget past commands. Without forgetting + # past commands the $PATH changes we made may not be respected + if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then + hash -r 2> /dev/null + fi + + if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then + PS1="${_OLD_VIRTUAL_PS1:-}" + export PS1 + unset _OLD_VIRTUAL_PS1 + fi + + unset VIRTUAL_ENV + if [ ! "${1:-}" = "nondestructive" ] ; then + # Self destruct! + unset -f deactivate + fi +} + +# unset irrelevant variables +deactivate nondestructive + +VIRTUAL_ENV="/home/deffuls/work/planetmint/docker_dev_build" +export VIRTUAL_ENV + +_OLD_VIRTUAL_PATH="$PATH" +PATH="$VIRTUAL_ENV/bin:$PATH" +export PATH + +# unset PYTHONHOME if set +# this will fail if PYTHONHOME is set to the empty string (which is bad anyway) +# could use `if (set -u; : $PYTHONHOME) ;` in bash +if [ -n "${PYTHONHOME:-}" ] ; then + _OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}" + unset PYTHONHOME +fi + +if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then + _OLD_VIRTUAL_PS1="${PS1:-}" + PS1="(docker_dev_build) ${PS1:-}" + export PS1 +fi + +# This should detect bash and zsh, which have a hash command that must +# be called to get it to forget past commands. Without forgetting +# past commands the $PATH changes we made may not be respected +if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then + hash -r 2> /dev/null +fi diff --git a/docker_dev_build/bin/activate.csh b/docker_dev_build/bin/activate.csh new file mode 100644 index 0000000..4958d90 --- /dev/null +++ b/docker_dev_build/bin/activate.csh @@ -0,0 +1,25 @@ +# This file must be used with "source bin/activate.csh" *from csh*. +# You cannot run it directly. +# Created by Davide Di Blasi . +# Ported to Python 3.3 venv by Andrew Svetlov + +alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; test "\!:*" != "nondestructive" && unalias deactivate' + +# Unset irrelevant variables. +deactivate nondestructive + +setenv VIRTUAL_ENV "/home/deffuls/work/planetmint/docker_dev_build" + +set _OLD_VIRTUAL_PATH="$PATH" +setenv PATH "$VIRTUAL_ENV/bin:$PATH" + + +set _OLD_VIRTUAL_PROMPT="$prompt" + +if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then + set prompt = "(docker_dev_build) $prompt" +endif + +alias pydoc python -m pydoc + +rehash diff --git a/docker_dev_build/bin/activate.fish b/docker_dev_build/bin/activate.fish new file mode 100644 index 0000000..f841836 --- /dev/null +++ b/docker_dev_build/bin/activate.fish @@ -0,0 +1,64 @@ +# This file must be used with "source /bin/activate.fish" *from fish* +# (https://fishshell.com/); you cannot run it directly. + +function deactivate -d "Exit virtual environment and return to normal shell environment" + # reset old environment variables + if test -n "$_OLD_VIRTUAL_PATH" + set -gx PATH $_OLD_VIRTUAL_PATH + set -e _OLD_VIRTUAL_PATH + end + if test -n "$_OLD_VIRTUAL_PYTHONHOME" + set -gx PYTHONHOME $_OLD_VIRTUAL_PYTHONHOME + set -e _OLD_VIRTUAL_PYTHONHOME + end + + if test -n "$_OLD_FISH_PROMPT_OVERRIDE" + functions -e fish_prompt + set -e _OLD_FISH_PROMPT_OVERRIDE + functions -c _old_fish_prompt fish_prompt + functions -e _old_fish_prompt + end + + set -e VIRTUAL_ENV + if test "$argv[1]" != "nondestructive" + # Self-destruct! + functions -e deactivate + end +end + +# Unset irrelevant variables. +deactivate nondestructive + +set -gx VIRTUAL_ENV "/home/deffuls/work/planetmint/docker_dev_build" + +set -gx _OLD_VIRTUAL_PATH $PATH +set -gx PATH "$VIRTUAL_ENV/bin" $PATH + +# Unset PYTHONHOME if set. +if set -q PYTHONHOME + set -gx _OLD_VIRTUAL_PYTHONHOME $PYTHONHOME + set -e PYTHONHOME +end + +if test -z "$VIRTUAL_ENV_DISABLE_PROMPT" + # fish uses a function instead of an env var to generate the prompt. + + # Save the current fish_prompt function as the function _old_fish_prompt. + functions -c fish_prompt _old_fish_prompt + + # With the original prompt function renamed, we can override with our own. + function fish_prompt + # Save the return status of the last command. + set -l old_status $status + + # Output the venv prompt; color taken from the blue of the Python logo. + printf "%s%s%s" (set_color 4B8BBE) "(docker_dev_build) " (set_color normal) + + # Restore the return status of the previous command. + echo "exit $old_status" | . + # Output the original/"old" prompt. + _old_fish_prompt + end + + set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV" +end diff --git a/docker_dev_build/bin/base58 b/docker_dev_build/bin/base58 new file mode 100755 index 0000000..7173d03 --- /dev/null +++ b/docker_dev_build/bin/base58 @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from base58.__main__ import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/docker_dev_build/bin/chardetect b/docker_dev_build/bin/chardetect new file mode 100755 index 0000000..eed199a --- /dev/null +++ b/docker_dev_build/bin/chardetect @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from chardet.cli.chardetect import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/docker_dev_build/bin/cm2html b/docker_dev_build/bin/cm2html new file mode 100755 index 0000000..bea1dba --- /dev/null +++ b/docker_dev_build/bin/cm2html @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from recommonmark.scripts import cm2html +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(cm2html()) diff --git a/docker_dev_build/bin/cm2latex b/docker_dev_build/bin/cm2latex new file mode 100755 index 0000000..6e03420 --- /dev/null +++ b/docker_dev_build/bin/cm2latex @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from recommonmark.scripts import cm2latex +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(cm2latex()) diff --git a/docker_dev_build/bin/cm2man b/docker_dev_build/bin/cm2man new file mode 100755 index 0000000..2dee90e --- /dev/null +++ b/docker_dev_build/bin/cm2man @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from recommonmark.scripts import cm2man +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(cm2man()) diff --git a/docker_dev_build/bin/cm2pseudoxml b/docker_dev_build/bin/cm2pseudoxml new file mode 100755 index 0000000..a710b26 --- /dev/null +++ b/docker_dev_build/bin/cm2pseudoxml @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from recommonmark.scripts import cm2pseudoxml +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(cm2pseudoxml()) diff --git a/docker_dev_build/bin/cm2xetex b/docker_dev_build/bin/cm2xetex new file mode 100755 index 0000000..b15f916 --- /dev/null +++ b/docker_dev_build/bin/cm2xetex @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from recommonmark.scripts import cm2xetex +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(cm2xetex()) diff --git a/docker_dev_build/bin/cm2xml b/docker_dev_build/bin/cm2xml new file mode 100755 index 0000000..ed74978 --- /dev/null +++ b/docker_dev_build/bin/cm2xml @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from recommonmark.scripts import cm2xml +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(cm2xml()) diff --git a/docker_dev_build/bin/cmark b/docker_dev_build/bin/cmark new file mode 100755 index 0000000..e403b54 --- /dev/null +++ b/docker_dev_build/bin/cmark @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from commonmark.cmark import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/docker_dev_build/bin/coverage b/docker_dev_build/bin/coverage new file mode 100755 index 0000000..889bb42 --- /dev/null +++ b/docker_dev_build/bin/coverage @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from coverage.cmdline import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/docker_dev_build/bin/coverage-3.9 b/docker_dev_build/bin/coverage-3.9 new file mode 100755 index 0000000..889bb42 --- /dev/null +++ b/docker_dev_build/bin/coverage-3.9 @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from coverage.cmdline import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/docker_dev_build/bin/coverage3 b/docker_dev_build/bin/coverage3 new file mode 100755 index 0000000..889bb42 --- /dev/null +++ b/docker_dev_build/bin/coverage3 @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from coverage.cmdline import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/docker_dev_build/bin/easy_install b/docker_dev_build/bin/easy_install new file mode 100755 index 0000000..928a5a5 --- /dev/null +++ b/docker_dev_build/bin/easy_install @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from setuptools.command.easy_install import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/docker_dev_build/bin/easy_install-3.9 b/docker_dev_build/bin/easy_install-3.9 new file mode 100755 index 0000000..928a5a5 --- /dev/null +++ b/docker_dev_build/bin/easy_install-3.9 @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from setuptools.command.easy_install import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/docker_dev_build/bin/flake8 b/docker_dev_build/bin/flake8 new file mode 100755 index 0000000..9a74725 --- /dev/null +++ b/docker_dev_build/bin/flake8 @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from flake8.main.cli import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/docker_dev_build/bin/flask b/docker_dev_build/bin/flask new file mode 100755 index 0000000..08e94ee --- /dev/null +++ b/docker_dev_build/bin/flask @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from flask.cli import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/docker_dev_build/bin/gunicorn b/docker_dev_build/bin/gunicorn new file mode 100755 index 0000000..07d1044 --- /dev/null +++ b/docker_dev_build/bin/gunicorn @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from gunicorn.app.wsgiapp import run +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(run()) diff --git a/docker_dev_build/bin/humanfriendly b/docker_dev_build/bin/humanfriendly new file mode 100755 index 0000000..22f5e5e --- /dev/null +++ b/docker_dev_build/bin/humanfriendly @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from humanfriendly.cli import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/docker_dev_build/bin/hypothesis b/docker_dev_build/bin/hypothesis new file mode 100755 index 0000000..5a8b41b --- /dev/null +++ b/docker_dev_build/bin/hypothesis @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from hypothesis.extra.cli import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/docker_dev_build/bin/identify-cli b/docker_dev_build/bin/identify-cli new file mode 100755 index 0000000..d75a16e --- /dev/null +++ b/docker_dev_build/bin/identify-cli @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from identify.cli import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/docker_dev_build/bin/ipdb3 b/docker_dev_build/bin/ipdb3 new file mode 100755 index 0000000..4e20688 --- /dev/null +++ b/docker_dev_build/bin/ipdb3 @@ -0,0 +1,12 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# EASY-INSTALL-ENTRY-SCRIPT: 'ipdb==0.13.9','console_scripts','ipdb3' +__requires__ = 'ipdb==0.13.9' +import re +import sys +from pkg_resources import load_entry_point + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit( + load_entry_point('ipdb==0.13.9', 'console_scripts', 'ipdb3')() + ) diff --git a/docker_dev_build/bin/ipython b/docker_dev_build/bin/ipython new file mode 100755 index 0000000..11b3f33 --- /dev/null +++ b/docker_dev_build/bin/ipython @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from IPython import start_ipython +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(start_ipython()) diff --git a/docker_dev_build/bin/ipython3 b/docker_dev_build/bin/ipython3 new file mode 100755 index 0000000..11b3f33 --- /dev/null +++ b/docker_dev_build/bin/ipython3 @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from IPython import start_ipython +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(start_ipython()) diff --git a/docker_dev_build/bin/jsonschema b/docker_dev_build/bin/jsonschema new file mode 100755 index 0000000..512b304 --- /dev/null +++ b/docker_dev_build/bin/jsonschema @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from jsonschema.cli import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/docker_dev_build/bin/nodeenv b/docker_dev_build/bin/nodeenv new file mode 100755 index 0000000..d9cfccb --- /dev/null +++ b/docker_dev_build/bin/nodeenv @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from nodeenv import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/docker_dev_build/bin/pep8 b/docker_dev_build/bin/pep8 new file mode 100755 index 0000000..b8222af --- /dev/null +++ b/docker_dev_build/bin/pep8 @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from pep8 import _main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(_main()) diff --git a/docker_dev_build/bin/pip b/docker_dev_build/bin/pip new file mode 100755 index 0000000..715500a --- /dev/null +++ b/docker_dev_build/bin/pip @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from pip._internal.cli.main import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/docker_dev_build/bin/pip3 b/docker_dev_build/bin/pip3 new file mode 100755 index 0000000..715500a --- /dev/null +++ b/docker_dev_build/bin/pip3 @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from pip._internal.cli.main import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/docker_dev_build/bin/pip3.9 b/docker_dev_build/bin/pip3.9 new file mode 100755 index 0000000..715500a --- /dev/null +++ b/docker_dev_build/bin/pip3.9 @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from pip._internal.cli.main import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/docker_dev_build/bin/planetmint b/docker_dev_build/bin/planetmint new file mode 100755 index 0000000..e883d72 --- /dev/null +++ b/docker_dev_build/bin/planetmint @@ -0,0 +1,12 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# EASY-INSTALL-ENTRY-SCRIPT: 'Planetmint','console_scripts','planetmint' +__requires__ = 'Planetmint' +import re +import sys +from pkg_resources import load_entry_point + +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) + sys.exit( + load_entry_point('Planetmint', 'console_scripts', 'planetmint')() + ) diff --git a/docker_dev_build/bin/planetmint-monit-config b/docker_dev_build/bin/planetmint-monit-config new file mode 100755 index 0000000..0181505 --- /dev/null +++ b/docker_dev_build/bin/planetmint-monit-config @@ -0,0 +1,199 @@ +#!/bin/bash + +set -o nounset + +# Check if directory for monit logs exists +if [ ! -d "$HOME/.planetmint-monit" ]; then + mkdir -p "$HOME/.planetmint-monit" +fi + +monit_pid_path=${MONIT_PID_PATH:=$HOME/.planetmint-monit/monit_processes} +monit_script_path=${MONIT_SCRIPT_PATH:=$HOME/.planetmint-monit/monit_script} +monit_log_path=${MONIT_LOG_PATH:=$HOME/.planetmint-monit/logs} +monitrc_path=${MONITRC_PATH:=$HOME/.monitrc} + +function usage() { + cat <${monit_script_path} < /dev/null 2>&1 & + + echo \$! > \$2 + popd + + ;; + + stop_planetmint) + + kill -2 \`cat \$2\` + rm -f \$2 + + ;; + + start_tendermint) + + pushd \$4 + + nohup tendermint node >> \$3/tendermint.out.log 2>> \$3/tendermint.err.log & + + echo \$! > \$2 + popd + + ;; + + stop_tendermint) + + kill -2 \`cat \$2\` + rm -f \$2 + + ;; + +esac +exit 0 +EOF +chmod +x ${monit_script_path} + +cat >${monit_script_path}_logrotate <${monitrc_path} < 200 MB then + exec "${monit_script_path}_logrotate rotate_tendermint_logs ${monit_log_path}/tendermint.out.log $monit_pid_path/tendermint.pid" + +check file tendermint.err.log with path ${monit_log_path}/tendermint.err.log + if size > 200 MB then + exec "${monit_script_path}_logrotate rotate_tendermint_logs ${monit_log_path}/tendermint.err.log $monit_pid_path/tendermint.pid" + +EOF + +# Setting permissions for control file +chmod 0700 ${monitrc_path} + +echo -e "Planetmint process manager configured!" +set -o errexit diff --git a/docker_dev_build/bin/pre-commit b/docker_dev_build/bin/pre-commit new file mode 100755 index 0000000..2189c71 --- /dev/null +++ b/docker_dev_build/bin/pre-commit @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from pre_commit.main import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/docker_dev_build/bin/pre-commit-validate-config b/docker_dev_build/bin/pre-commit-validate-config new file mode 100755 index 0000000..92846d7 --- /dev/null +++ b/docker_dev_build/bin/pre-commit-validate-config @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from pre_commit.clientlib import validate_config_main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(validate_config_main()) diff --git a/docker_dev_build/bin/pre-commit-validate-manifest b/docker_dev_build/bin/pre-commit-validate-manifest new file mode 100755 index 0000000..324387b --- /dev/null +++ b/docker_dev_build/bin/pre-commit-validate-manifest @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from pre_commit.clientlib import validate_manifest_main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(validate_manifest_main()) diff --git a/docker_dev_build/bin/py.test b/docker_dev_build/bin/py.test new file mode 100755 index 0000000..d069a0b --- /dev/null +++ b/docker_dev_build/bin/py.test @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from pytest import console_main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(console_main()) diff --git a/docker_dev_build/bin/pybabel b/docker_dev_build/bin/pybabel new file mode 100755 index 0000000..6d6fc3f --- /dev/null +++ b/docker_dev_build/bin/pybabel @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from babel.messages.frontend import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/docker_dev_build/bin/pycodestyle b/docker_dev_build/bin/pycodestyle new file mode 100755 index 0000000..ff6dcdc --- /dev/null +++ b/docker_dev_build/bin/pycodestyle @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from pycodestyle import _main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(_main()) diff --git a/docker_dev_build/bin/pyflakes b/docker_dev_build/bin/pyflakes new file mode 100755 index 0000000..fff92d0 --- /dev/null +++ b/docker_dev_build/bin/pyflakes @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from pyflakes.api import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/docker_dev_build/bin/pygmentize b/docker_dev_build/bin/pygmentize new file mode 100755 index 0000000..756ab53 --- /dev/null +++ b/docker_dev_build/bin/pygmentize @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from pygments.cmdline import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/docker_dev_build/bin/pytest b/docker_dev_build/bin/pytest new file mode 100755 index 0000000..d069a0b --- /dev/null +++ b/docker_dev_build/bin/pytest @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from pytest import console_main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(console_main()) diff --git a/docker_dev_build/bin/python b/docker_dev_build/bin/python new file mode 120000 index 0000000..b8a0adb --- /dev/null +++ b/docker_dev_build/bin/python @@ -0,0 +1 @@ +python3 \ No newline at end of file diff --git a/docker_dev_build/bin/python3 b/docker_dev_build/bin/python3 new file mode 120000 index 0000000..ae65fda --- /dev/null +++ b/docker_dev_build/bin/python3 @@ -0,0 +1 @@ +/usr/bin/python3 \ No newline at end of file diff --git a/docker_dev_build/bin/python3.9 b/docker_dev_build/bin/python3.9 new file mode 120000 index 0000000..b8a0adb --- /dev/null +++ b/docker_dev_build/bin/python3.9 @@ -0,0 +1 @@ +python3 \ No newline at end of file diff --git a/docker_dev_build/bin/rst2html.py b/docker_dev_build/bin/rst2html.py new file mode 100755 index 0000000..4cce4f1 --- /dev/null +++ b/docker_dev_build/bin/rst2html.py @@ -0,0 +1,23 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 + +# $Id: rst2html.py 4564 2006-05-21 20:44:42Z wiemann $ +# Author: David Goodger +# Copyright: This module has been placed in the public domain. + +""" +A minimal front end to the Docutils Publisher, producing HTML. +""" + +try: + import locale + locale.setlocale(locale.LC_ALL, '') +except: + pass + +from docutils.core import publish_cmdline, default_description + + +description = ('Generates (X)HTML documents from standalone reStructuredText ' + 'sources. ' + default_description) + +publish_cmdline(writer_name='html', description=description) diff --git a/docker_dev_build/bin/rst2html4.py b/docker_dev_build/bin/rst2html4.py new file mode 100755 index 0000000..0b12374 --- /dev/null +++ b/docker_dev_build/bin/rst2html4.py @@ -0,0 +1,26 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 + +# $Id: rst2html4.py 7994 2016-12-10 17:41:45Z milde $ +# Author: David Goodger +# Copyright: This module has been placed in the public domain. + +""" +A minimal front end to the Docutils Publisher, producing (X)HTML. + +The output conforms to XHTML 1.0 transitional +and almost to HTML 4.01 transitional (except for closing empty tags). +""" + +try: + import locale + locale.setlocale(locale.LC_ALL, '') +except: + pass + +from docutils.core import publish_cmdline, default_description + + +description = ('Generates (X)HTML documents from standalone reStructuredText ' + 'sources. ' + default_description) + +publish_cmdline(writer_name='html4', description=description) diff --git a/docker_dev_build/bin/rst2html5.py b/docker_dev_build/bin/rst2html5.py new file mode 100755 index 0000000..61a71fb --- /dev/null +++ b/docker_dev_build/bin/rst2html5.py @@ -0,0 +1,34 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf8 -*- +# :Copyright: © 2015 Günter Milde. +# :License: Released under the terms of the `2-Clause BSD license`_, in short: +# +# Copying and distribution of this file, with or without modification, +# are permitted in any medium without royalty provided the copyright +# notice and this notice are preserved. +# This file is offered as-is, without any warranty. +# +# .. _2-Clause BSD license: https://opensource.org/licenses/BSD-2-Clause +# +# Revision: $Revision: 8567 $ +# Date: $Date: 2020-09-30 13:57:21 +0200 (Mi, 30. Sep 2020) $ + +""" +A minimal front end to the Docutils Publisher, producing HTML 5 documents. + +The output is also valid XML. +""" + +try: + import locale # module missing in Jython + locale.setlocale(locale.LC_ALL, '') +except locale.Error: + pass + +from docutils.core import publish_cmdline, default_description + +description = (u'Generates HTML5 documents from standalone ' + u'reStructuredText sources.\n' + + default_description) + +publish_cmdline(writer_name='html5', description=description) diff --git a/docker_dev_build/bin/rst2latex.py b/docker_dev_build/bin/rst2latex.py new file mode 100755 index 0000000..cd0c4ef --- /dev/null +++ b/docker_dev_build/bin/rst2latex.py @@ -0,0 +1,26 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 + +# $Id: rst2latex.py 5905 2009-04-16 12:04:49Z milde $ +# Author: David Goodger +# Copyright: This module has been placed in the public domain. + +""" +A minimal front end to the Docutils Publisher, producing LaTeX. +""" + +try: + import locale + locale.setlocale(locale.LC_ALL, '') +except: + pass + +from docutils.core import publish_cmdline + +description = ('Generates LaTeX documents from standalone reStructuredText ' + 'sources. ' + 'Reads from (default is stdin) and writes to ' + ' (default is stdout). See ' + ' for ' + 'the full reference.') + +publish_cmdline(writer_name='latex', description=description) diff --git a/docker_dev_build/bin/rst2man.py b/docker_dev_build/bin/rst2man.py new file mode 100755 index 0000000..4b81477 --- /dev/null +++ b/docker_dev_build/bin/rst2man.py @@ -0,0 +1,26 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 + +# Author: +# Contact: grubert@users.sf.net +# Copyright: This module has been placed in the public domain. + +""" +man.py +====== + +This module provides a simple command line interface that uses the +man page writer to output from ReStructuredText source. +""" + +import locale +try: + locale.setlocale(locale.LC_ALL, '') +except: + pass + +from docutils.core import publish_cmdline, default_description +from docutils.writers import manpage + +description = ("Generates plain unix manual documents. " + default_description) + +publish_cmdline(writer=manpage.Writer(), description=description) diff --git a/docker_dev_build/bin/rst2odt.py b/docker_dev_build/bin/rst2odt.py new file mode 100755 index 0000000..c8fb0dd --- /dev/null +++ b/docker_dev_build/bin/rst2odt.py @@ -0,0 +1,30 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 + +# $Id: rst2odt.py 5839 2009-01-07 19:09:28Z dkuhlman $ +# Author: Dave Kuhlman +# Copyright: This module has been placed in the public domain. + +""" +A front end to the Docutils Publisher, producing OpenOffice documents. +""" + +import sys +try: + import locale + locale.setlocale(locale.LC_ALL, '') +except: + pass + +from docutils.core import publish_cmdline_to_binary, default_description +from docutils.writers.odf_odt import Writer, Reader + + +description = ('Generates OpenDocument/OpenOffice/ODF documents from ' + 'standalone reStructuredText sources. ' + default_description) + + +writer = Writer() +reader = Reader() +output = publish_cmdline_to_binary(reader=reader, writer=writer, + description=description) + diff --git a/docker_dev_build/bin/rst2odt_prepstyles.py b/docker_dev_build/bin/rst2odt_prepstyles.py new file mode 100755 index 0000000..2255228 --- /dev/null +++ b/docker_dev_build/bin/rst2odt_prepstyles.py @@ -0,0 +1,67 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 + +# $Id: rst2odt_prepstyles.py 8346 2019-08-26 12:11:32Z milde $ +# Author: Dave Kuhlman +# Copyright: This module has been placed in the public domain. + +""" +Fix a word-processor-generated styles.odt for odtwriter use: Drop page size +specifications from styles.xml in STYLE_FILE.odt. +""" + +# Author: Michael Schutte + +from __future__ import print_function + +from lxml import etree +import sys +import zipfile +from tempfile import mkstemp +import shutil +import os + +NAMESPACES = { + "style": "urn:oasis:names:tc:opendocument:xmlns:style:1.0", + "fo": "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" +} + + +def prepstyle(filename): + + zin = zipfile.ZipFile(filename) + styles = zin.read("styles.xml") + + root = etree.fromstring(styles) + for el in root.xpath("//style:page-layout-properties", + namespaces=NAMESPACES): + for attr in el.attrib: + if attr.startswith("{%s}" % NAMESPACES["fo"]): + del el.attrib[attr] + + tempname = mkstemp() + zout = zipfile.ZipFile(os.fdopen(tempname[0], "w"), "w", + zipfile.ZIP_DEFLATED) + + for item in zin.infolist(): + if item.filename == "styles.xml": + zout.writestr(item, etree.tostring(root)) + else: + zout.writestr(item, zin.read(item.filename)) + + zout.close() + zin.close() + shutil.move(tempname[1], filename) + + +def main(): + args = sys.argv[1:] + if len(args) != 1: + print(__doc__, file=sys.stderr) + print("Usage: %s STYLE_FILE.odt\n" % sys.argv[0], file=sys.stderr) + sys.exit(1) + filename = args[0] + prepstyle(filename) + + +if __name__ == '__main__': + main() diff --git a/docker_dev_build/bin/rst2pseudoxml.py b/docker_dev_build/bin/rst2pseudoxml.py new file mode 100755 index 0000000..175a1bf --- /dev/null +++ b/docker_dev_build/bin/rst2pseudoxml.py @@ -0,0 +1,23 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 + +# $Id: rst2pseudoxml.py 4564 2006-05-21 20:44:42Z wiemann $ +# Author: David Goodger +# Copyright: This module has been placed in the public domain. + +""" +A minimal front end to the Docutils Publisher, producing pseudo-XML. +""" + +try: + import locale + locale.setlocale(locale.LC_ALL, '') +except: + pass + +from docutils.core import publish_cmdline, default_description + + +description = ('Generates pseudo-XML from standalone reStructuredText ' + 'sources (for testing purposes). ' + default_description) + +publish_cmdline(description=description) diff --git a/docker_dev_build/bin/rst2s5.py b/docker_dev_build/bin/rst2s5.py new file mode 100755 index 0000000..dfde4c9 --- /dev/null +++ b/docker_dev_build/bin/rst2s5.py @@ -0,0 +1,24 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 + +# $Id: rst2s5.py 4564 2006-05-21 20:44:42Z wiemann $ +# Author: Chris Liechti +# Copyright: This module has been placed in the public domain. + +""" +A minimal front end to the Docutils Publisher, producing HTML slides using +the S5 template system. +""" + +try: + import locale + locale.setlocale(locale.LC_ALL, '') +except: + pass + +from docutils.core import publish_cmdline, default_description + + +description = ('Generates S5 (X)HTML slideshow documents from standalone ' + 'reStructuredText sources. ' + default_description) + +publish_cmdline(writer_name='s5', description=description) diff --git a/docker_dev_build/bin/rst2xetex.py b/docker_dev_build/bin/rst2xetex.py new file mode 100755 index 0000000..eea3b9e --- /dev/null +++ b/docker_dev_build/bin/rst2xetex.py @@ -0,0 +1,27 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 + +# $Id: rst2xetex.py 7847 2015-03-17 17:30:47Z milde $ +# Author: Guenter Milde +# Copyright: This module has been placed in the public domain. + +""" +A minimal front end to the Docutils Publisher, producing Lua/XeLaTeX code. +""" + +try: + import locale + locale.setlocale(locale.LC_ALL, '') +except: + pass + +from docutils.core import publish_cmdline + +description = ('Generates LaTeX documents from standalone reStructuredText ' + 'sources for compilation with the Unicode-aware TeX variants ' + 'XeLaTeX or LuaLaTeX. ' + 'Reads from (default is stdin) and writes to ' + ' (default is stdout). See ' + ' for ' + 'the full reference.') + +publish_cmdline(writer_name='xetex', description=description) diff --git a/docker_dev_build/bin/rst2xml.py b/docker_dev_build/bin/rst2xml.py new file mode 100755 index 0000000..7eaafb6 --- /dev/null +++ b/docker_dev_build/bin/rst2xml.py @@ -0,0 +1,23 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 + +# $Id: rst2xml.py 4564 2006-05-21 20:44:42Z wiemann $ +# Author: David Goodger +# Copyright: This module has been placed in the public domain. + +""" +A minimal front end to the Docutils Publisher, producing Docutils XML. +""" + +try: + import locale + locale.setlocale(locale.LC_ALL, '') +except: + pass + +from docutils.core import publish_cmdline, default_description + + +description = ('Generates Docutils-native XML from standalone ' + 'reStructuredText sources. ' + default_description) + +publish_cmdline(writer_name='xml', description=description) diff --git a/docker_dev_build/bin/rstpep2html.py b/docker_dev_build/bin/rstpep2html.py new file mode 100755 index 0000000..50c66bb --- /dev/null +++ b/docker_dev_build/bin/rstpep2html.py @@ -0,0 +1,25 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 + +# $Id: rstpep2html.py 4564 2006-05-21 20:44:42Z wiemann $ +# Author: David Goodger +# Copyright: This module has been placed in the public domain. + +""" +A minimal front end to the Docutils Publisher, producing HTML from PEP +(Python Enhancement Proposal) documents. +""" + +try: + import locale + locale.setlocale(locale.LC_ALL, '') +except: + pass + +from docutils.core import publish_cmdline, default_description + + +description = ('Generates (X)HTML from reStructuredText-format PEP files. ' + + default_description) + +publish_cmdline(reader_name='pep', writer_name='pep_html', + description=description) diff --git a/docker_dev_build/bin/sphinx-apidoc b/docker_dev_build/bin/sphinx-apidoc new file mode 100755 index 0000000..5b36fd3 --- /dev/null +++ b/docker_dev_build/bin/sphinx-apidoc @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from sphinx.ext.apidoc import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/docker_dev_build/bin/sphinx-autogen b/docker_dev_build/bin/sphinx-autogen new file mode 100755 index 0000000..43c0717 --- /dev/null +++ b/docker_dev_build/bin/sphinx-autogen @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from sphinx.ext.autosummary.generate import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/docker_dev_build/bin/sphinx-build b/docker_dev_build/bin/sphinx-build new file mode 100755 index 0000000..80cbe98 --- /dev/null +++ b/docker_dev_build/bin/sphinx-build @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from sphinx.cmd.build import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/docker_dev_build/bin/sphinx-quickstart b/docker_dev_build/bin/sphinx-quickstart new file mode 100755 index 0000000..1b663ca --- /dev/null +++ b/docker_dev_build/bin/sphinx-quickstart @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from sphinx.cmd.quickstart import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/docker_dev_build/bin/tox b/docker_dev_build/bin/tox new file mode 100755 index 0000000..16b5f31 --- /dev/null +++ b/docker_dev_build/bin/tox @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from tox import cmdline +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(cmdline()) diff --git a/docker_dev_build/bin/tox-quickstart b/docker_dev_build/bin/tox-quickstart new file mode 100755 index 0000000..6ac2f09 --- /dev/null +++ b/docker_dev_build/bin/tox-quickstart @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from tox._quickstart import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/docker_dev_build/bin/virtualenv b/docker_dev_build/bin/virtualenv new file mode 100755 index 0000000..39bd1ae --- /dev/null +++ b/docker_dev_build/bin/virtualenv @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from virtualenv.__main__ import run_with_catch +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(run_with_catch()) diff --git a/docker_dev_build/bin/watchmedo b/docker_dev_build/bin/watchmedo new file mode 100755 index 0000000..cb43d78 --- /dev/null +++ b/docker_dev_build/bin/watchmedo @@ -0,0 +1,8 @@ +#!/home/deffuls/work/planetmint/docker_dev_build/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from watchdog.watchmedo import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/docker_dev_build/include/site/python3.9/greenlet/greenlet.h b/docker_dev_build/include/site/python3.9/greenlet/greenlet.h new file mode 100644 index 0000000..830bef8 --- /dev/null +++ b/docker_dev_build/include/site/python3.9/greenlet/greenlet.h @@ -0,0 +1,146 @@ +/* -*- indent-tabs-mode: nil; tab-width: 4; -*- */ + +/* Greenlet object interface */ + +#ifndef Py_GREENLETOBJECT_H +#define Py_GREENLETOBJECT_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* This is deprecated and undocumented. It does not change. */ +#define GREENLET_VERSION "1.0.0" + +typedef struct _greenlet { + PyObject_HEAD + char* stack_start; + char* stack_stop; + char* stack_copy; + intptr_t stack_saved; + struct _greenlet* stack_prev; + struct _greenlet* parent; + PyObject* run_info; + struct _frame* top_frame; + int recursion_depth; + PyObject* weakreflist; +#if PY_VERSION_HEX >= 0x030700A3 + _PyErr_StackItem* exc_info; + _PyErr_StackItem exc_state; +#else + PyObject* exc_type; + PyObject* exc_value; + PyObject* exc_traceback; +#endif + PyObject* dict; +#if PY_VERSION_HEX >= 0x030700A3 + PyObject* context; +#endif +#if PY_VERSION_HEX >= 0x30A00B1 + CFrame* cframe; +#endif +} PyGreenlet; + +#define PyGreenlet_Check(op) PyObject_TypeCheck(op, &PyGreenlet_Type) +#define PyGreenlet_MAIN(op) (((PyGreenlet*)(op))->stack_stop == (char*)-1) +#define PyGreenlet_STARTED(op) (((PyGreenlet*)(op))->stack_stop != NULL) +#define PyGreenlet_ACTIVE(op) (((PyGreenlet*)(op))->stack_start != NULL) +#define PyGreenlet_GET_PARENT(op) (((PyGreenlet*)(op))->parent) + +/* C API functions */ + +/* Total number of symbols that are exported */ +#define PyGreenlet_API_pointers 8 + +#define PyGreenlet_Type_NUM 0 +#define PyExc_GreenletError_NUM 1 +#define PyExc_GreenletExit_NUM 2 + +#define PyGreenlet_New_NUM 3 +#define PyGreenlet_GetCurrent_NUM 4 +#define PyGreenlet_Throw_NUM 5 +#define PyGreenlet_Switch_NUM 6 +#define PyGreenlet_SetParent_NUM 7 + +#ifndef GREENLET_MODULE +/* This section is used by modules that uses the greenlet C API */ +static void** _PyGreenlet_API = NULL; + +# define PyGreenlet_Type \ + (*(PyTypeObject*)_PyGreenlet_API[PyGreenlet_Type_NUM]) + +# define PyExc_GreenletError \ + ((PyObject*)_PyGreenlet_API[PyExc_GreenletError_NUM]) + +# define PyExc_GreenletExit \ + ((PyObject*)_PyGreenlet_API[PyExc_GreenletExit_NUM]) + +/* + * PyGreenlet_New(PyObject *args) + * + * greenlet.greenlet(run, parent=None) + */ +# define PyGreenlet_New \ + (*(PyGreenlet * (*)(PyObject * run, PyGreenlet * parent)) \ + _PyGreenlet_API[PyGreenlet_New_NUM]) + +/* + * PyGreenlet_GetCurrent(void) + * + * greenlet.getcurrent() + */ +# define PyGreenlet_GetCurrent \ + (*(PyGreenlet * (*)(void)) _PyGreenlet_API[PyGreenlet_GetCurrent_NUM]) + +/* + * PyGreenlet_Throw( + * PyGreenlet *greenlet, + * PyObject *typ, + * PyObject *val, + * PyObject *tb) + * + * g.throw(...) + */ +# define PyGreenlet_Throw \ + (*(PyObject * (*)(PyGreenlet * self, \ + PyObject * typ, \ + PyObject * val, \ + PyObject * tb)) \ + _PyGreenlet_API[PyGreenlet_Throw_NUM]) + +/* + * PyGreenlet_Switch(PyGreenlet *greenlet, PyObject *args) + * + * g.switch(*args, **kwargs) + */ +# define PyGreenlet_Switch \ + (*(PyObject * \ + (*)(PyGreenlet * greenlet, PyObject * args, PyObject * kwargs)) \ + _PyGreenlet_API[PyGreenlet_Switch_NUM]) + +/* + * PyGreenlet_SetParent(PyObject *greenlet, PyObject *new_parent) + * + * g.parent = new_parent + */ +# define PyGreenlet_SetParent \ + (*(int (*)(PyGreenlet * greenlet, PyGreenlet * nparent)) \ + _PyGreenlet_API[PyGreenlet_SetParent_NUM]) + +/* Macro that imports greenlet and initializes C API */ +/* NOTE: This has actually moved to ``greenlet._greenlet._C_API``, but we + keep the older definition to be sure older code that might have a copy of + the header still works. */ +# define PyGreenlet_Import() \ + { \ + _PyGreenlet_API = (void**)PyCapsule_Import("greenlet._C_API", 0); \ + } + +#endif /* GREENLET_MODULE */ + +#ifdef __cplusplus +} +#endif +#endif /* !Py_GREENLETOBJECT_H */ diff --git a/docker_dev_build/lib64 b/docker_dev_build/lib64 new file mode 120000 index 0000000..7951405 --- /dev/null +++ b/docker_dev_build/lib64 @@ -0,0 +1 @@ +lib \ No newline at end of file diff --git a/docker_dev_build/pyvenv.cfg b/docker_dev_build/pyvenv.cfg new file mode 100644 index 0000000..5c102c1 --- /dev/null +++ b/docker_dev_build/pyvenv.cfg @@ -0,0 +1,3 @@ +home = /usr/bin +include-system-site-packages = false +version = 3.9.2 diff --git a/docker_dev_build/share/man/man1/ipython.1 b/docker_dev_build/share/man/man1/ipython.1 new file mode 100644 index 0000000..0f4a191 --- /dev/null +++ b/docker_dev_build/share/man/man1/ipython.1 @@ -0,0 +1,60 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH IPYTHON 1 "July 15, 2011" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) and groff_man(7) +.\" .SH section heading +.\" .SS secondary section heading +.\" +.\" +.\" To preview this page as plain text: nroff -man ipython.1 +.\" +.SH NAME +ipython \- Tools for Interactive Computing in Python. +.SH SYNOPSIS +.B ipython +.RI [ options ] " files" ... + +.B ipython subcommand +.RI [ options ] ... + +.SH DESCRIPTION +An interactive Python shell with automatic history (input and output), dynamic +object introspection, easier configuration, command completion, access to the +system shell, integration with numerical and scientific computing tools, +web notebook, Qt console, and more. + +For more information on how to use IPython, see 'ipython \-\-help', +or 'ipython \-\-help\-all' for all available command\(hyline options. + +.SH "ENVIRONMENT VARIABLES" +.sp +.PP +\fIIPYTHONDIR\fR +.RS 4 +This is the location where IPython stores all its configuration files. The default +is $HOME/.ipython if IPYTHONDIR is not defined. + +You can see the computed value of IPYTHONDIR with `ipython locate`. + +.SH FILES + +IPython uses various configuration files stored in profiles within IPYTHONDIR. +To generate the default configuration files and start configuring IPython, +do 'ipython profile create', and edit '*_config.py' files located in +IPYTHONDIR/profile_default. + +.SH AUTHORS +IPython is written by the IPython Development Team . diff --git a/docker_dev_build/share/python-wheels/CacheControl-0.12.6-py2.py3-none-any.whl b/docker_dev_build/share/python-wheels/CacheControl-0.12.6-py2.py3-none-any.whl new file mode 100644 index 0000000..6ef9423 Binary files /dev/null and b/docker_dev_build/share/python-wheels/CacheControl-0.12.6-py2.py3-none-any.whl differ diff --git a/docker_dev_build/share/python-wheels/appdirs-1.4.4-py2.py3-none-any.whl b/docker_dev_build/share/python-wheels/appdirs-1.4.4-py2.py3-none-any.whl new file mode 100644 index 0000000..2459003 Binary files /dev/null and b/docker_dev_build/share/python-wheels/appdirs-1.4.4-py2.py3-none-any.whl differ diff --git a/docker_dev_build/share/python-wheels/certifi-2020.6.20-py2.py3-none-any.whl b/docker_dev_build/share/python-wheels/certifi-2020.6.20-py2.py3-none-any.whl new file mode 100644 index 0000000..9f6ebc6 Binary files /dev/null and b/docker_dev_build/share/python-wheels/certifi-2020.6.20-py2.py3-none-any.whl differ diff --git a/docker_dev_build/share/python-wheels/chardet-4.0.0-py2.py3-none-any.whl b/docker_dev_build/share/python-wheels/chardet-4.0.0-py2.py3-none-any.whl new file mode 100644 index 0000000..c120243 Binary files /dev/null and b/docker_dev_build/share/python-wheels/chardet-4.0.0-py2.py3-none-any.whl differ diff --git a/docker_dev_build/share/python-wheels/colorama-0.4.4-py2.py3-none-any.whl b/docker_dev_build/share/python-wheels/colorama-0.4.4-py2.py3-none-any.whl new file mode 100644 index 0000000..d38d3a0 Binary files /dev/null and b/docker_dev_build/share/python-wheels/colorama-0.4.4-py2.py3-none-any.whl differ diff --git a/docker_dev_build/share/python-wheels/contextlib2-0.6.0.post1-py2.py3-none-any.whl b/docker_dev_build/share/python-wheels/contextlib2-0.6.0.post1-py2.py3-none-any.whl new file mode 100644 index 0000000..d1dca5f Binary files /dev/null and b/docker_dev_build/share/python-wheels/contextlib2-0.6.0.post1-py2.py3-none-any.whl differ diff --git a/docker_dev_build/share/python-wheels/distlib-0.3.1-py2.py3-none-any.whl b/docker_dev_build/share/python-wheels/distlib-0.3.1-py2.py3-none-any.whl new file mode 100644 index 0000000..6503b96 Binary files /dev/null and b/docker_dev_build/share/python-wheels/distlib-0.3.1-py2.py3-none-any.whl differ diff --git a/docker_dev_build/share/python-wheels/distro-1.5.0-py2.py3-none-any.whl b/docker_dev_build/share/python-wheels/distro-1.5.0-py2.py3-none-any.whl new file mode 100644 index 0000000..3708fe7 Binary files /dev/null and b/docker_dev_build/share/python-wheels/distro-1.5.0-py2.py3-none-any.whl differ diff --git a/docker_dev_build/share/python-wheels/html5lib-1.1-py2.py3-none-any.whl b/docker_dev_build/share/python-wheels/html5lib-1.1-py2.py3-none-any.whl new file mode 100644 index 0000000..fb5e80c Binary files /dev/null and b/docker_dev_build/share/python-wheels/html5lib-1.1-py2.py3-none-any.whl differ diff --git a/docker_dev_build/share/python-wheels/idna-2.10-py2.py3-none-any.whl b/docker_dev_build/share/python-wheels/idna-2.10-py2.py3-none-any.whl new file mode 100644 index 0000000..0ba1dda Binary files /dev/null and b/docker_dev_build/share/python-wheels/idna-2.10-py2.py3-none-any.whl differ diff --git a/docker_dev_build/share/python-wheels/ipaddr-2.2.0-py2.py3-none-any.whl b/docker_dev_build/share/python-wheels/ipaddr-2.2.0-py2.py3-none-any.whl new file mode 100644 index 0000000..98157fa Binary files /dev/null and b/docker_dev_build/share/python-wheels/ipaddr-2.2.0-py2.py3-none-any.whl differ diff --git a/docker_dev_build/share/python-wheels/msgpack-1.0.0-py2.py3-none-any.whl b/docker_dev_build/share/python-wheels/msgpack-1.0.0-py2.py3-none-any.whl new file mode 100644 index 0000000..e761172 Binary files /dev/null and b/docker_dev_build/share/python-wheels/msgpack-1.0.0-py2.py3-none-any.whl differ diff --git a/docker_dev_build/share/python-wheels/packaging-20.9-py2.py3-none-any.whl b/docker_dev_build/share/python-wheels/packaging-20.9-py2.py3-none-any.whl new file mode 100644 index 0000000..e6598ec Binary files /dev/null and b/docker_dev_build/share/python-wheels/packaging-20.9-py2.py3-none-any.whl differ diff --git a/docker_dev_build/share/python-wheels/pep517-0.9.1-py2.py3-none-any.whl b/docker_dev_build/share/python-wheels/pep517-0.9.1-py2.py3-none-any.whl new file mode 100644 index 0000000..d870913 Binary files /dev/null and b/docker_dev_build/share/python-wheels/pep517-0.9.1-py2.py3-none-any.whl differ diff --git a/docker_dev_build/share/python-wheels/pip-20.3.4-py2.py3-none-any.whl b/docker_dev_build/share/python-wheels/pip-20.3.4-py2.py3-none-any.whl new file mode 100644 index 0000000..51cafb9 Binary files /dev/null and b/docker_dev_build/share/python-wheels/pip-20.3.4-py2.py3-none-any.whl differ diff --git a/docker_dev_build/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl b/docker_dev_build/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl new file mode 100644 index 0000000..72e02ff Binary files /dev/null and b/docker_dev_build/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl differ diff --git a/docker_dev_build/share/python-wheels/progress-1.5-py2.py3-none-any.whl b/docker_dev_build/share/python-wheels/progress-1.5-py2.py3-none-any.whl new file mode 100644 index 0000000..7f58777 Binary files /dev/null and b/docker_dev_build/share/python-wheels/progress-1.5-py2.py3-none-any.whl differ diff --git a/docker_dev_build/share/python-wheels/pyparsing-2.4.7-py2.py3-none-any.whl b/docker_dev_build/share/python-wheels/pyparsing-2.4.7-py2.py3-none-any.whl new file mode 100644 index 0000000..9ff2e00 Binary files /dev/null and b/docker_dev_build/share/python-wheels/pyparsing-2.4.7-py2.py3-none-any.whl differ diff --git a/docker_dev_build/share/python-wheels/requests-2.25.1-py2.py3-none-any.whl b/docker_dev_build/share/python-wheels/requests-2.25.1-py2.py3-none-any.whl new file mode 100644 index 0000000..eb382f7 Binary files /dev/null and b/docker_dev_build/share/python-wheels/requests-2.25.1-py2.py3-none-any.whl differ diff --git a/docker_dev_build/share/python-wheels/resolvelib-0.5.4-py2.py3-none-any.whl b/docker_dev_build/share/python-wheels/resolvelib-0.5.4-py2.py3-none-any.whl new file mode 100644 index 0000000..cd8f0de Binary files /dev/null and b/docker_dev_build/share/python-wheels/resolvelib-0.5.4-py2.py3-none-any.whl differ diff --git a/docker_dev_build/share/python-wheels/retrying-1.3.3-py2.py3-none-any.whl b/docker_dev_build/share/python-wheels/retrying-1.3.3-py2.py3-none-any.whl new file mode 100644 index 0000000..e2f8ffa Binary files /dev/null and b/docker_dev_build/share/python-wheels/retrying-1.3.3-py2.py3-none-any.whl differ diff --git a/docker_dev_build/share/python-wheels/setuptools-44.1.1-py2.py3-none-any.whl b/docker_dev_build/share/python-wheels/setuptools-44.1.1-py2.py3-none-any.whl new file mode 100644 index 0000000..e3d6e08 Binary files /dev/null and b/docker_dev_build/share/python-wheels/setuptools-44.1.1-py2.py3-none-any.whl differ diff --git a/docker_dev_build/share/python-wheels/six-1.16.0-py2.py3-none-any.whl b/docker_dev_build/share/python-wheels/six-1.16.0-py2.py3-none-any.whl new file mode 100644 index 0000000..574b3ab Binary files /dev/null and b/docker_dev_build/share/python-wheels/six-1.16.0-py2.py3-none-any.whl differ diff --git a/docker_dev_build/share/python-wheels/toml-0.10.1-py2.py3-none-any.whl b/docker_dev_build/share/python-wheels/toml-0.10.1-py2.py3-none-any.whl new file mode 100644 index 0000000..3b1cbcb Binary files /dev/null and b/docker_dev_build/share/python-wheels/toml-0.10.1-py2.py3-none-any.whl differ diff --git a/docker_dev_build/share/python-wheels/urllib3-1.26.5-py2.py3-none-any.whl b/docker_dev_build/share/python-wheels/urllib3-1.26.5-py2.py3-none-any.whl new file mode 100644 index 0000000..b17a8e8 Binary files /dev/null and b/docker_dev_build/share/python-wheels/urllib3-1.26.5-py2.py3-none-any.whl differ diff --git a/docker_dev_build/share/python-wheels/webencodings-0.5.1-py2.py3-none-any.whl b/docker_dev_build/share/python-wheels/webencodings-0.5.1-py2.py3-none-any.whl new file mode 100644 index 0000000..0a83fdd Binary files /dev/null and b/docker_dev_build/share/python-wheels/webencodings-0.5.1-py2.py3-none-any.whl differ diff --git a/docker_dev_build/share/python-wheels/wheel-0.34.2-py2.py3-none-any.whl b/docker_dev_build/share/python-wheels/wheel-0.34.2-py2.py3-none-any.whl new file mode 100644 index 0000000..3fcb11b Binary files /dev/null and b/docker_dev_build/share/python-wheels/wheel-0.34.2-py2.py3-none-any.whl differ diff --git a/planetmint/backend/tarantool/__init__.py b/planetmint/backend/tarantool/__init__.py index 70f792a..31dfc2e 100644 --- a/planetmint/backend/tarantool/__init__.py +++ b/planetmint/backend/tarantool/__init__.py @@ -1,5 +1,5 @@ # Register the single dispatched modules on import. -from planetmint.backend.tarantool import query, connection # noqa +from planetmint.backend.tarantool import query, connection, schema # noqa # MongoDBConnection should always be accessed via # ``planetmint.backend.connect()``. diff --git a/planetmint/backend/tarantool/schema.py b/planetmint/backend/tarantool/schema.py new file mode 100644 index 0000000..69665ce --- /dev/null +++ b/planetmint/backend/tarantool/schema.py @@ -0,0 +1,10 @@ +from planetmint.backend.utils import module_dispatch_registrar +from planetmint import backend +from planetmint.backend.tarantool.connection import TarantoolDB + +register_schema = module_dispatch_registrar(backend.schema) + + +@register_schema(TarantoolDB) +def drop_database(connection): + connection.drop_database() diff --git a/planetmint/backend/tarantool/transaction/tools.py b/planetmint/backend/tarantool/transaction/tools.py index 840dfee..8ee4211 100644 --- a/planetmint/backend/tarantool/transaction/tools.py +++ b/planetmint/backend/tarantool/transaction/tools.py @@ -196,14 +196,10 @@ class TransactionCompose: def convert_to_dict(self): transaction = {k: None for k in list(self._map.keys())} transaction["id"] = self._get_transaction_id() - if "asset" in transaction: - transaction["asset"] = self._get_asset() - if "metadata" in transaction: - transaction["metadata"] = self._get_metadata() + transaction["asset"] = self._get_asset() + transaction["metadata"] = self._get_metadata() transaction["version"] = self._get_transaction_version() transaction["operation"] = self._get_transaction_operation() transaction["inputs"] = self._get_inputs() transaction["outputs"] = self._get_outputs() - # test = transaction["asset"] - # print(f"compose asset : {test}") return transaction diff --git a/planetmint/commands/planetmint.py b/planetmint/commands/planetmint.py index 7bcd2fa..ae9ed66 100644 --- a/planetmint/commands/planetmint.py +++ b/planetmint/commands/planetmint.py @@ -269,8 +269,10 @@ def run_drop(args): return from planetmint.backend.connection import Connection + from planetmint.backend import schema conn = Connection() - conn.drop_database() + # conn.drop_database() + schema.drop_database(connection=conn) def run_recover(b): diff --git a/planetmint/lib.py b/planetmint/lib.py index 4d44c8c..d92a799 100644 --- a/planetmint/lib.py +++ b/planetmint/lib.py @@ -297,7 +297,6 @@ class Planetmint(object): def get_spent(self, txid, output, current_transactions=[]): transactions = backend.query.get_spent(self.connection, txid, output) - # print(f"spent TX: {transactions}") transactions = list(transactions) if transactions else [] if len(transactions) > 1: raise core_exceptions.CriticalDoubleSpend( diff --git a/tests/assets/test_divisible_assets.py b/tests/assets/test_divisible_assets.py index d3707ff..b700b4e 100644 --- a/tests/assets/test_divisible_assets.py +++ b/tests/assets/test_divisible_assets.py @@ -529,7 +529,6 @@ def test_threshold_same_public_key(alice, b, user_pk, user_sk): tx_transfer = Transaction.transfer(tx_create.to_inputs(), [([alice.public_key], 100)], asset_id=tx_create.id) tx_transfer_signed = tx_transfer.sign([user_sk, user_sk]) - print("TX " + str(tx_transfer.to_dict())) b.store_bulk_transactions([tx_create_signed]) assert tx_transfer_signed.validate(b) == tx_transfer_signed diff --git a/tests/commands/test_commands.py b/tests/commands/test_commands.py index ac4147b..f97a2e1 100644 --- a/tests/commands/test_commands.py +++ b/tests/commands/test_commands.py @@ -74,7 +74,7 @@ def test_bigchain_show_config(capsys): run_show_config(args) output_config = json.loads(capsys.readouterr()[0]) sorted_output_config = json.dumps(output_config, indent=4, sort_keys=True) - print( f"config : {sorted_output_config}") + print(f"config : {sorted_output_config}") # Note: This test passed previously because we were always # using the default configuration parameters, but since we # are running with docker-compose now and expose parameters like @@ -85,19 +85,20 @@ def test_bigchain_show_config(capsys): from planetmint.config import Config _config = Config().get() sorted_config = json.dumps(_config, indent=4, sort_keys=True) - print( f"_config : {sorted_config}") - #del sorted_config['CONFIGURED'] + print(f"_config : {sorted_config}") + # del sorted_config['CONFIGURED'] assert sorted_output_config == sorted_config + def test__run_init(mocker): init_db_mock = mocker.patch( 'planetmint.backend.tarantool.connection.TarantoolDB.init_database') from planetmint.backend.connection import Connection - + conn = Connection() conn.init_database() - + init_db_mock.assert_called_once_with() @@ -183,7 +184,7 @@ def test_run_configure_when_config_does_exist(monkeypatch, @pytest.mark.skip @pytest.mark.parametrize('backend', ( - 'localmongodb', + 'localmongodb', )) def test_run_configure_with_backend(backend, monkeypatch, mock_write_config): import planetmint @@ -232,14 +233,14 @@ def test_calling_main(start_mock, monkeypatch): help='Prepare the config file.') subparsers.add_parser.assert_any_call('show-config', help='Show the current ' - 'configuration') + 'configuration') subparsers.add_parser.assert_any_call('init', help='Init the database') subparsers.add_parser.assert_any_call('drop', help='Drop the database') subparsers.add_parser.assert_any_call('start', help='Start Planetmint') subparsers.add_parser.assert_any_call('tendermint-version', help='Show the Tendermint supported ' - 'versions') + 'versions') assert start_mock.called is True @@ -269,14 +270,14 @@ def test_run_recover(b, alice, bob): [([alice.public_key], 1)], asset={'cycle': 'hero'}, metadata={'name': 'hohenheim'}) \ - .sign([alice.private_key]) + .sign([alice.private_key]) tx2 = Transaction.create([bob.public_key], [([bob.public_key], 1)], asset={'cycle': 'hero'}, metadata={'name': 'hohenheim'}) \ - .sign([bob.private_key]) - print( tx1.id) - print( tx2.id) + .sign([bob.private_key]) + print(tx1.id) + print(tx2.id) # store the transactions b.store_bulk_transactions([tx1, tx2]) @@ -513,8 +514,8 @@ def test_election_approve_called_with_bad_key(caplog, b, bad_validator_path, new with caplog.at_level(logging.ERROR): assert not run_election_approve(args, b) - assert caplog.records[0].msg == 'The key you provided does not match any of '\ - 'the eligible voters in this election.' + assert caplog.records[0].msg == 'The key you provided does not match any of ' \ + 'the eligible voters in this election.' @pytest.mark.bdb @@ -538,19 +539,19 @@ def test_chain_migration_election_show_shows_inconclusive(b): b.store_bulk_transactions([election]) assert run_election_show(Namespace(election_id=election.id), b) == \ - 'status=ongoing' + 'status=ongoing' b.store_block(Block(height=1, transactions=[], app_hash='')._asdict()) b.store_validator_set(2, [v['storage'] for v in validators]) assert run_election_show(Namespace(election_id=election.id), b) == \ - 'status=ongoing' + 'status=ongoing' b.store_block(Block(height=2, transactions=[], app_hash='')._asdict()) # TODO insert yet another block here when upgrading to Tendermint 0.22.4. assert run_election_show(Namespace(election_id=election.id), b) == \ - 'status=inconclusive' + 'status=inconclusive' @pytest.mark.bdb @@ -574,7 +575,7 @@ def test_chain_migration_election_show_shows_concluded(b): Election.process_block(b, 1, [election]) assert run_election_show(Namespace(election_id=election.id), b) == \ - 'status=ongoing' + 'status=ongoing' b.store_abci_chain(1, 'chain-X') b.store_block(Block(height=1, @@ -583,7 +584,7 @@ def test_chain_migration_election_show_shows_concluded(b): Election.process_block(b, 2, votes) assert run_election_show(Namespace(election_id=election.id), b) == \ - f'''status=concluded + f'''status=concluded chain_id=chain-X-migrated-at-height-1 app_hash=last_app_hash validators=[{''.join([f""" @@ -618,7 +619,6 @@ def mock_get_validators(height): def call_election(b, new_validator, node_key): - def mock_write(tx, mode): b.store_bulk_transactions([tx]) return (202, '')