Files
chromebrew/packages/miniconda3.rb
Satadru Pramanik, DO, MPH, MEng 22d986c981 Py updates, fix env variable for timeout, add option to skip remote updates in build_updates script (#10503)
* Update py3_setuptools

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Fix Agree timeout env variable, add pip updates, fixup build_updated_packages script and add functionality to skip remote update checks.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Add documentation for the --skip command.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Handle compatibility with commas

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Handle empty conpatibility.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Fixup compatibility sections of package files.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Rebuild parted to handle missing binaries, and update build_updated_packages to notice binary_compression and not ask to rebuild if bimaries already exist.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Fix hash for nconvert.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

---------

Signed-off-by: Satadru Pramanik <satadru@gmail.com>
2024-09-19 22:22:33 -05:00

40 lines
1.6 KiB
Ruby

require 'package'
class Miniconda3 < Package
description 'Anaconda is the world\'s most popular Python data science platform.'
homepage 'https://conda.io/miniconda.html'
version '4.5.11'
license 'BSD-3'
compatibility 'i686 x86_64'
source_url 'https://raw.githubusercontent.com/conda/conda/4.5.11/README.rst'
source_sha256 '9a5d4e87325a5015bfc00167a0eb41d53e1e7a7f47f2078e50f5fb7ab3082b11'
binary_compression 'tar.xz'
binary_sha256({
i686: 'f42040d6e439e545bf80a372bd277e0e12370a995425b50cdfdc1fe0fb9dc491',
x86_64: '18f8b5c8e75dc03a441358616eb17c9000425d720df45cb446bbbfe7f84c94f9'
})
def self.install
case ARCH
when 'i686'
system 'curl -Ls -o miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-4.5.11-Linux-x86.sh'
abort 'Checksum mismatch. :/ Try again.'.lightred unless Digest::SHA256.hexdigest(File.read('miniconda.sh')) == '5dca8f7aaeeab9506f801c7c8b561a1e7e00aadc3a21008f3c72f82766f6fec6'
when 'x86_64'
system 'curl -Ls -o miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-4.5.11-Linux-x86_64.sh'
abort 'Checksum mismatch. :/ Try again.'.lightred unless Digest::SHA256.hexdigest(File.read('miniconda.sh')) == 'ea4594241e13a2671c5b158b3b813f0794fe58d514795fbf72a1aad24db918cf'
end
system "bash miniconda.sh -b -p #{CREW_PREFIX}/share/miniconda3"
FileUtils.mkdir_p %W[#{CREW_DEST_PREFIX}/bin #{CREW_DEST_PREFIX}/share]
File.write "#{CREW_DEST_PREFIX}/bin/conda", <<~EOF, perm: 0o755
#!/bin/bash
cd #{CREW_PREFIX}/share/miniconda3
bin/conda "$@"
EOF
FileUtils.cp "#{CREW_PREFIX}/share/miniconda3", "#{CREW_DEST_PREFIX}/share"
end
end