tis-r-project icon

R Project

Silent install package for R Project

4.4.3-2

  • package: tis-r-project
  • name: R Project
  • version: 4.4.3-2
  • categories: Utilities
  • maintainer: WAPT Team,Tranquil IT,Pierre Cosson,Jimmy PELE
  • locale: all
  • target_os: darwin
  • impacted_process: R,Rscript,R,Rcmd,Rfe,Rgui,Rscript,RSetReg,Rterm
  • architecture: x64
  • signature_date:
  • size: 104.47 Mo
  • installed_size: 172.45 Mo
  • homepage : https://cloud.r-project.org/

package           : tis-r-project
version           : 4.4.3-2
architecture      : x64
section           : base
priority          : optional
name              : R Project
categories        : Utilities
maintainer        : WAPT Team,Tranquil IT,Pierre Cosson,Jimmy PELE
description       : R is a free software environment for statistical computing and graphics
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : darwin
min_wapt_version  : 2.3
sources           : https://cloud.r-project.org/
installed_size    : 172450090
impacted_process  : R,Rscript,R,Rcmd,Rfe,Rgui,Rscript,RSetReg,Rterm
description_fr    : R est un environnement logiciel libre pour le calcul statistique et les graphiques
description_pl    : R to darmowe środowisko programistyczne do obliczeń statystycznych i grafiki
description_de    : R ist eine freie Softwareumgebung für statistische Berechnungen und Grafiken
description_es    : R es un entorno de software libre para el cálculo estadístico y los gráficos
description_pt    : R é um ambiente de software livre para computação estatística e gráfica
description_it    : R è un ambiente di software libero per il calcolo statistico e la grafica
description_nl    : R is een vrije softwareomgeving voor statistische berekeningen en grafieken
description_ru    : R - это свободная программная среда для статистических вычислений и графики
audit_schedule    : 
editor            : 
keywords          : r,free,software,environment,statistical,computing,graphics
licence           : 
homepage          : https://cloud.r-project.org/
package_uuid      : ae8a7b96-21d2-45dd-acae-050b815e2cb1
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 11
max_os_version    : 
icon_sha256sum    : 887962500a833b24cf37935a44f8a01589b66cf1e464e1d2b4909dd17c52ab8d
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2025-03-06T07:07:55.000000
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
signature         : Yi1LoS8+sudszVkhfcprpkdXZH4KrtiOxpoNHCuW03ei9Apy40pRw8cBacS556xvxWwLFDzJPNoWGqC3ygB2Ma6qAaqCFrhLHsf17pXqi0/l/Baqi6lb1jBkH28d4iBV/u7n6CuNWwtzdSxheWzTJnOoWAwqEtYECAMmUIiVXI5JKaUxXxVsSS85m/j/G4qjtixeaK1D7M+JRHYRG8mc7o/qfOM0LIt/Cf4PE8lwZrwrQW/IFEaHhrwuJDU2Taz2RySIZKU/mQrBIeqSXT5cJS6ymsAaK4tc5g0dutqjq/mK/41bEvChCWq6s2/KXrArvQ00V2cn0QFw9nPQxeb9tg==

# -*- coding: utf-8 -*-
from setuphelpers import *

bin_contains = "R-"
app_path = "/Applications/R.app"


def install():
    # Declaring local variables
    package_version = control.get_software_version()
    bin_name = glob.glob("*%s*.pkg" % bin_contains)[0]

    # check if app is already installed
    if isdir(app_path):
        if is_local_app_installed(app_path, check_version=package_version):
            print("App already installed or newer version present")
        else:
            # remove previous version
            print("Removing old app")
            remove_tree(app_path)
            # Installing the package
            print("Installing: %s" % bin_name)
            install_pkg(bin_name, re)

    else:
        # Installing the package
        print("Installing: %s" % bin_name)
        install_pkg(bin_name)


def uninstall():
    # Uninstalling package
    print("Uninstalling: %s" % app_path)
    remove_tree(app_path)
    uninstall_pkg("org.R-project.R.GUI.pkg")
    uninstall_pkg("org.r-project.x86_64.texinfo")
    uninstall_pkg("org.R-project.R.fw.pkg")
    uninstall_pkg("org.r-project.x86_64.tcltk")
    uninstall_pkg("org.R-project.x86_64.R.fw.pkg")
    uninstall_pkg("org.R-project.x86_64.R.GUI.pkg")


def audit():
    package_version = control.get_software_version()
    if isdir(app_path):
        if is_local_app_installed(app_path, check_version=package_version):
            print("%s is present with proper version" % app_path)
            return "OK"
        else:
            print("%s version is outdated " % app_path)
            return "WARNING"
    else:
        print("%s is missing " % app_path)
        return "ERROR"

# -*- coding: utf-8 -*-
from setuphelpers import *


def update_package():
    # Declaring local variables
    package_updated = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    url = "https://cloud.r-project.org/bin/macosx/"

    # Getting latest version from official sources
    print("URL used is: %s" % url)
    for bs_search in bs_find_all(url, "a", proxies=proxies):
        if not "arm64" in bs_search["href"] and ".pkg" in bs_search["href"]:
            latest_bin = bs_search["href"].split("/")[-1]
            version = latest_bin.split("-")[1]
            download_url = url + bs_search["href"]
            break

    # Downloading latest binaries
    print("Latest %s version is: %s" % (control.name, version))
    print("Download URL is: %s" % download_url)
    if not isfile(latest_bin):
        print("Downloading: %s" % latest_bin)
        wget(download_url, latest_bin, proxies=proxies)
    else:
        print("Binary is present: %s" % latest_bin)

    # Changing version of the package
    if Version(version) > Version(control.get_software_version()):
        print("Software version updated (from: %s to: %s)" % (control.get_software_version(), Version(version)))
        package_updated = True
    else:
        print("Software version up-to-date (%s)" % Version(version))
    control.set_software_version(version)
    control.save_control_to_wapt()

    # Deleting outdated binaries
    remove_outdated_binaries(version)

    # Validating or not update-package-sources
    return package_updated

d941c8f05f9c7a3de0add1724e9de8ed1638f9d344d7e94e8cfb7fbb3d31c088 : R-4.4.3-x86_64.pkg
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
f288681217595e20be03ff56d2a3fd50e0952a1b5acfd0e5bcee75df5e46b20a : WAPT/control
887962500a833b24cf37935a44f8a01589b66cf1e464e1d2b4909dd17c52ab8d : WAPT/icon.png
15d0a88b68b22b96cfd80fc83520196ff78767b9af32bd34f55b7cdcc8e0fdc2 : luti.json
476b3d7dfbae51600096c2d9abfc5837863c1f0b52853b647aa424d496960ca1 : setup.py
e68ec804ced24bc0ac64c2108b28d103fbac15cb8431fc67f0800f4adc40bbdf : update_package.py