Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix python3 references in python@3.10-dependent formulae #108008

Closed
carlocab opened this issue Aug 13, 2022 · 24 comments
Closed

Fix python3 references in python@3.10-dependent formulae #108008

carlocab opened this issue Aug 13, 2022 · 24 comments
Labels
good first issue A good candidate for your first contribution to Homebrew/homebrew-core help wanted Task(s) needing PRs from the community or maintainers outdated PR was locked due to age

Comments

@carlocab
Copy link
Member

carlocab commented Aug 13, 2022

Formulae which depend on python@3.10 and look for python3, either in PATH
or in python@3.10's bin directory will break when Python 3.11 is released in
October. This follows from #107517, since the release of 3.11 means we will
switch python@3.10 to using the altinstall target, at which point there will
no longer be a python3 in python@3.10's bin.

It would be good to have a standardised approach for this, but I'm not sure
there is one. I'll described some approaches currently in use below.

If the python3 reference is only in one of the install method or the test
block (and not both), then it may suffice to define

python3 = "python3.10"

in the appropriate method/block, and make sure the newly-defined python3
variable is used in succeeding calls to Python3. For examples of this, see
chapel, cython, or volk.

If the python3 reference is in both the install method and test block,
then it may be appropriate to define a method that can be reused in both. This
approach is currently used in formulae which build with multiple versions of
Python3 in order to allow usage with multiple versions of python (e.g. py3cairo
pillow, or numpy). For formulae that don't need this, it may suffice to
define a simpler method:

def python3
  "python3.10"
end

Feedback on approaches welcome.

Below is a tenative list of formulae that need fixing. This was generated with

rg --pcre2 -l 'python3(?!\.)' $(rg -l '(depends_on "python@3\.10"|uses_from_macos "python")')

so it may miss a few formulae, or include false positives.

@carlocab carlocab added help wanted Task(s) needing PRs from the community or maintainers good first issue A good candidate for your first contribution to Homebrew/homebrew-core labels Aug 13, 2022
carlocab added a commit to carlocab/homebrew-core that referenced this issue Aug 19, 2022
TBB has a bug in thread creation which is exposed with usage in mold.
See rui314/mold#410, rui314/mold#600. We apply a patch that has been
upstreamed to TBB at oneapi-src/oneTBB#824 to fix this.

The patch implements a mechanism similar to one used by Go [1], and has
been adopted in the Arch and OpenSUSE TBB packages.

While we're here, let's align the `cmake` invocation with other
formulae, fix references to `python3.10` (Homebrew#108008), and change the
`-rpath` flag so that it does not require relocation when pouring a
bottle (which should speed bottle pour times up slightly).

[1] https://go-review.googlesource.com/c/go/+/33894/
carlocab added a commit to carlocab/homebrew-core that referenced this issue Aug 19, 2022
@carlocab carlocab mentioned this issue Aug 19, 2022
6 tasks
carlocab added a commit to carlocab/homebrew-core that referenced this issue Aug 19, 2022
carlocab added a commit to carlocab/homebrew-core that referenced this issue Aug 19, 2022
BrewTestBot pushed a commit that referenced this issue Aug 19, 2022
TBB has a bug in thread creation which is exposed with usage in mold.
See rui314/mold#410, rui314/mold#600. We apply a patch that has been
upstreamed to TBB at oneapi-src/oneTBB#824 to fix this.

The patch implements a mechanism similar to one used by Go [1], and has
been adopted in the Arch and OpenSUSE TBB packages.

While we're here, let's align the `cmake` invocation with other
formulae, fix references to `python3.10` (#108008), and change the
`-rpath` flag so that it does not require relocation when pouring a
bottle (which should speed bottle pour times up slightly).

[1] https://go-review.googlesource.com/c/go/+/33894/

Closes #108431.

Signed-off-by: Sean Molenaar <1484494+SMillerDev@users.noreply.github.com>
Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
@carlocab carlocab mentioned this issue Aug 19, 2022
6 tasks
carlocab added a commit to Porkepix/homebrew-core that referenced this issue Aug 19, 2022
Also, clean up `python3` reference. See Homebrew#108008.
carlocab added a commit to carlocab/homebrew-core that referenced this issue Aug 19, 2022
carlocab added a commit to carlocab/homebrew-core that referenced this issue Aug 19, 2022
BrewTestBot pushed a commit that referenced this issue Aug 20, 2022
* emscripten 3.1.19
* emscripten: update resources
  Also, clean up `python3` reference. See #108008.
* emscripten: deduplicate `std_cmake_args`

Closes #108318.

Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
Signed-off-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
carlocab added a commit that referenced this issue Aug 20, 2022
carlocab added a commit that referenced this issue Aug 20, 2022
carlocab added a commit to carlocab/homebrew-core that referenced this issue Aug 20, 2022
carlocab added a commit to carlocab/homebrew-core that referenced this issue Aug 20, 2022
carlocab added a commit to carlocab/homebrew-core that referenced this issue Aug 20, 2022
See Homebrew#108008.

Also,
- we no longer need to add Python's `libexec/"bin"` to `PATH`. See
  Homebrew/brew#13677.
- `--install-lib` is now part of `setup_install_args`. See
  Homebrew/brew#13533.
carlocab pushed a commit that referenced this issue Sep 12, 2022
carlocab pushed a commit that referenced this issue Sep 12, 2022
carlocab pushed a commit that referenced this issue Sep 12, 2022
carlocab pushed a commit that referenced this issue Sep 12, 2022
carlocab pushed a commit that referenced this issue Sep 12, 2022
@carlocab
Copy link
Member Author

I've split the remaining formulae to a list in #110462 to ease tracking.

BrewTestBot pushed a commit that referenced this issue Sep 12, 2022
See #108008.

Closes #110442.

Signed-off-by: Michka Popoff <3406519+iMichka@users.noreply.github.com>
Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
BrewTestBot pushed a commit that referenced this issue Sep 12, 2022
See #108008.

Closes #110441.

Signed-off-by: Michka Popoff <3406519+iMichka@users.noreply.github.com>
Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
BrewTestBot pushed a commit that referenced this issue Sep 12, 2022
See #108008.

Closes #110428.

Signed-off-by: Michka Popoff <3406519+iMichka@users.noreply.github.com>
Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
BrewTestBot pushed a commit that referenced this issue Sep 12, 2022
See #108008.

Closes #110440.

Signed-off-by: Michka Popoff <3406519+iMichka@users.noreply.github.com>
Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
chenrui333 pushed a commit that referenced this issue Sep 13, 2022
miles170 added a commit to miles170/homebrew-core that referenced this issue Sep 13, 2022
miles170 added a commit to miles170/homebrew-core that referenced this issue Sep 17, 2022
See Homebrew#108008, and also update the license.
BrewTestBot pushed a commit that referenced this issue Sep 17, 2022
See #108008.

Closes #110385.

Signed-off-by: Daniel Nachun <9205048+danielnachun@users.noreply.github.com>
Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
iMichka added a commit to iMichka/homebrew-core that referenced this issue Sep 28, 2022
BrewTestBot pushed a commit that referenced this issue Sep 29, 2022
See #108008

Closes #110203.

Signed-off-by: Sean Molenaar <1484494+SMillerDev@users.noreply.github.com>
Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
danielnachun pushed a commit to miles170/homebrew-core that referenced this issue Oct 5, 2022
danielnachun added a commit that referenced this issue Oct 6, 2022
* libtorch: fix `python3` reference.

See #108008.

* libtorch: add patch for build on macOS

* libtorch: fix patch and remove unneeded deps

* libtorch: replace patch, fix python path and cmake

Co-authored-by: Michka Popoff <michkapopoff@gmail.com>
Co-authored-by: danielnachun <daniel.nachun@gmail.com>
@github-actions github-actions bot added the outdated PR was locked due to age label Oct 14, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue A good candidate for your first contribution to Homebrew/homebrew-core help wanted Task(s) needing PRs from the community or maintainers outdated PR was locked due to age
Projects
None yet
Development

No branches or pull requests

3 participants
@carlocab @miles170 and others