Package: yoyopkg
YoyoWant a better cross platform way to install program ?
Yoyo help you to do this thanks to little.yoyofiles containing easy to made instructionsHow does it work ?Just typeyoyo install PACKAGE_NAMEYoyo will then resolve dependencies and install itLater you can also customize yoyo install files to create installations for your own softwareYoyo CLIusage: yoyo.py [-h] [--local] [--force] [--nocache] {install,remove,update,list,details,verify} [package]Modes:install [package name]Install a package--localto install it locally--forceto install it even if already installed--nocacheto download it again and dont use cacheremove [package name]Remove a packagelistList all packagesdetailsList all packages with details (desc and req)updateUpdate list of packagesverify {package name}Verify than all package (or one if specified) are installedInstructions to write ayoyofileCreate a.yoyofile and store it in:~/.yoyo/store/y_local/modules/You will have to put in:NAME (name)Set a install name. Name used foryoyo install.NAME anacondaAUTHOR (name)Set a author name. Only use for information.AUTHOR anaconda teamINFO (informations)Set a description. Only use for information.INFO Anaconda is a package manager for pythonVERSION (version)Set a version.VERSION 3.5.2.0REQ (req1, reqX,...)Set requirements. Requirements are the name of other packages.REQ python, curlThen you will have to fillfunctions[INSTALL]Inside, write all methods to install the package.[VERIFY]Inside, write all methods to verify the package is well installedInstruction for these functions:LET (name, value)Create a variable and assign it valueLET url https://repo.anaconda.com/archive/Anaconda3-5.2.0-Linux-x86_64.shTo access a variable just type#name.To concatenate them use#var1+#var2SAVEDIRSave the current dir in memorySAVEDIRCHDIR (dir)Change current dir to dirCHDIR /tmp/anacondaRESTOREDIRRestore current dir to the savedir oneRESTOREDIRDL (url, folder, name)Download url and save it to folder/nameDL #url #INSTALLDIR __anaconda_install.tar.gzCMD (command)Execute commandCMD sh #INSTALLDIR+__anaconda_install.tar.gzYou can set some options likeNOCHECK dont check the command return code. In normal time if return code != 0, install will be stopped.
HIDE hide the command outputThese options must be placed before the commandCMD NOCHECK exit 1
CMD HIDE NOCHECK tree /PRINT (str)Print a stringPRINT Installing anaconda... it can takes some time. Install to #INSTALLDIRYou can haveiflike statementsLOCALWindowsMacOSLinuxAnd combine this withELSEEND- LOCAL
PRINT User want a local install
- ELSE
CMD sudo install
- END

- Windows
PRINT Windows user
CMD chocolatey install #choco_name
- END// Is use to comment a lineDEFAULTIs use to use default command to verify or install[VERIFY]
DEFAULT -> This will call `which #NAME` on linux

[INSTALL]
DEFAULT -> This will call `sudo apt install #NAME` on linuxGlobal varsThere is some global vars you can access:INSTALLDIRDirectory where binary are installed~.yoyo/installed/DLDIRcache directory for downloaded files~.yoyo/cache/dlEXTRACTDIRcache directory for extracted files~.yoyo/cache/extractMAINDIRmain directory ofyoyoconf and cache~.yoyo/installedExample of Yoyo filecat ~/.yoyo/store/y_local/modules/fastlane.yoyo

NAME fastlane
AUTHOR fastlane
INFO fastlane is an open source platform aimed at simplifying Android and iOS deployment. fastlane lets you automate every aspect of your development and release workflow.
VERSION 2.99.1
REQ gem, gem-dev

[INSTALL]

- MacOS
PRINT You can also install fastlane using: brew cask install fastlane
- END

CMD sudo gem install fastlane -NV

[VERIFY]
DEFAULTcat ~/.yoyo/store/y_local/modules/anaconda.yoyo

NAME anaconda
AUTHOR anaconda team
INFO Anaconda package manager
VERSION 3.5.2.0
REQ python, curl

[INSTALL]

LET url https://repo.anaconda.com/archive/Anaconda3-5.2.0-Linux-x86_64.sh
LET name __anaconda3-5.2.0-Linux-x86_64.sh

PRINT Installing at #DLDIR+#name

SAVEDIR

DL #url #DLDIR #name
CMD sh #DLDIR+#name

RESTOREDIR

[VERIFY]
DEFAULTTODOCross platform
Update
Package version
Online stores
Better handling of /lib etc...
URGENT !!!!!! RENAME SRC TO YOYOSRC IN .local/lib/python3.6/site-package/
#TODO only load store needed !!!!!