Skip to content

Commit ee80577

Browse files
author
Erik Gomez
committed
Move python frameworks into their own Python folder
1 parent 1d83014 commit ee80577

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
# python
2-
A Python 3 framework that currently installs to `/Library/ManagedFrameworks/Python3.framework`.
2+
A Python 3 framework that currently installs to `/Library/ManagedFrameworks/Python/Python3.framework`.
33

44
Please see Apple's documentation on [file system basics](https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html) for more information on the thought process here.
55

66
This is an intended replacement for when Apple removes `/usr/bin/python`
77

88
## Using interactively
9-
After installing any of the packages, a symbolic link can be used within terminal for interactive Python sessions. At the time of this writing `/usr/local/bin/managed_python3` points to `/Library/ManagedFrameworks/Python3.framework/Versions/Current/bin/python3`
9+
After installing any of the packages, a symbolic link can be used within terminal for interactive Python sessions. At the time of this writing `/usr/local/bin/managed_python3` points to `/Library/ManagedFrameworks/Python/Python3.framework/Versions/Current/bin/python3`
1010

1111
## Using with scripts
1212
It is currently recommended to point directly to symbolic link provided by the Python framework.
1313

14-
At the time of this writing `/Library/ManagedFrameworks/Python3.framework/Versions/Current/bin/python3` points to `/Library/ManagedFrameworks/Python3.framework/Versions/3.8/bin/python3.8`
14+
At the time of this writing `/Library/ManagedFrameworks/Python/Python3.framework/Versions/Current/bin/python3` points to `/Library/ManagedFrameworks/Python/Python3.framework/Versions/3.8/bin/python3.8`
1515

1616
An example script would look like the following:
1717

1818
```
19-
#!/Library/ManagedFrameworks/Python3.framework/Versions/Current/bin/python3
19+
#!/Library/ManagedFrameworks/Python/Python3.framework/Versions/Current/bin/python3
2020
2121
print('This is an example script.')
2222
```
@@ -25,7 +25,7 @@ print('This is an example script.')
2525
#### zshenv global alias
2626
If you are calling `python` within `zsh` scripts, adding a global alias to `/etc/zshenv` may be appropriate.
2727

28-
`alias -g python3.framework='/Library/ManagedFrameworks/Python3.framework/Versions/Current/bin/python3'`
28+
`alias -g python3.framework='/Library/ManagedFrameworks/Python/Python3.framework/Versions/Current/bin/python3'`
2929

3030
For more information on this method, please see Armin Briegel's "Moving to Zsh" Part [II](https://scriptingosx.com/2019/06/moving-to-zsh-part-2-configuration-files/) and [IV](https://scriptingosx.com/2019/07/moving-to-zsh-part-4-aliases-and-functions/)
3131

build_python_framework_pkgs.zsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
RP_SHA="8bce58e91895978da6f238c1d2e1de3559ea4643"
1010
MP_SHA="71c57fcfdf43692adcd41fa7305be08f66bae3e5"
1111
# Hardcoded paths
12-
FRAMEWORKDIR="/Library/ManagedFrameworks"
12+
FRAMEWORKDIR="/Library/ManagedFrameworks/Python"
1313
PYTHON_BIN="$FRAMEWORKDIR/Python3.framework/Versions/Current/bin/python3"
1414
RP_BINDIR="/tmp/relocatable-python"
1515
MP_BINDIR="/tmp/munki-pkg"

example_python_script.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
#!/Library/ManagedFrameworks/Python3.framework/Versions/Current/bin/python3
1+
#!/Library/ManagedFrameworks/Python/Python3.framework/Versions/Current/bin/python3
22

33
print('This is an example script.')

0 commit comments

Comments
 (0)