tis-r-project icon

R Project

Paquet d’installation silencieuse pour R Project

4.4.0-2

  • package: tis-r-project
  • name: R Project
  • version: 4.4.0-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: 99.96 Mo
  • installed_size: 172.45 Mo
  • homepage : https://cloud.r-project.org/

package           : tis-r-project
version           : 4.4.0-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      : 978620cf-1f23-4e2d-b59e-c3446b05930e
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         : Ck/aIFUQRFQhgBl/mPAunMR1sJwK8GylXIDAz+mHuXDBQ42a7BH0TkPysDsiAZuNk0dG+8CFHIZO/i7okTmbhnVzQfdnwgaV3OmstBIbzL/P+lIJ/4ZD2QlcvKhK10GICFPJNgyshzu74O68VSj+4tnW3VsID9Z+QhsxFfC56d+ARiwuofH/gvRwG2HNFk8TP8pA4Uqu1GmaQvo7kAprnqjtHEQl4gz40sDd0PjgWKVHleVx0e64PCwThP2ISs5wsQNFvSHNbvtYGUgxV+UVMPxfDQP62ae0onHWMi1Ws4nIlodylKix+joURWK9tUFG4tXy3fK+bcDjmPs4f5UlyA==
signature_date    : 2024-04-30T01:00:34.094646
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

# -*- 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

476b3d7dfbae51600096c2d9abfc5837863c1f0b52853b647aa424d496960ca1 : setup.py
e68ec804ced24bc0ac64c2108b28d103fbac15cb8431fc67f0800f4adc40bbdf : update_package.py
887962500a833b24cf37935a44f8a01589b66cf1e464e1d2b4909dd17c52ab8d : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
5243c795d379103f5d88f9776b31637add927483b9773e822e9af930a0808b2c : R-4.4.0-x86_64.pkg
2ecd37f03dba2c3faf74b39893870d490c9e0c212d464143141b6c1b8b196ad1 : luti.json
c69b75e806f36a53190291ca73197fc225d28cf0e597c75c60d6fb8ecdc8ddac : WAPT/control