Macaulay2 / homebrew-tap

The Macaulay2 tap for Homebrew
7 stars 6 forks source link

Build and upload bottle for Apple M1 #142

Closed mahrud closed 2 years ago

mahrud commented 2 years ago

From the brew documentation:

Bottles are produced by installing a formula with brew install --build-bottle <formula> and then bottling it with brew bottle <formula>. This generates a bottle file in the current directory and outputs the bottle DSL for insertion into the formula file.

Anyone with a standard Apple M1 machine can produce bottles for Macaulay2 and its dependencies, which we can then upload as release files on Github and update the formula file so that others can install Macaulay2 without the need to compile anything.

The following formulas need to be bottled:

mahrud commented 2 years ago

@mikestillman if you or someone else with an M1 machine can build and upload the bottles for M1, David and others would benefit from it.

As an example, you can try:

brew install --build-bottle normaliz
brew bottle normaliz

Then upload it in the Github release and update the bottle section here: https://github.com/Macaulay2/homebrew-tap/blob/ac93ca5ff9bc9be65373d012c538285070cca62a/Formula/normaliz.rb#L8-L13 At that point you should be able to uninstall normaliz and reinstall it, and it should just use the bottle from Github.

mahrud commented 2 years ago

@mikestillman I think if you now try:

brew uninstall --ignore-dependencies normaliz
brew install normaliz

it should use the bottled version.