asdf-community / asdf-community/asdf-python

[macOS] install framework Python to custom Applications directory

Offen
#86 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Shell
Sterne
729
Forks
65
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

I want to build a framework Python, but I do not want to write to `/Applications`.

I tried setting `PYTHON_CONFIGURE_OPTS="--enable-framework=/Users/dilum/Desktop"`, but it still tries to write to `/Applications`

Is there a way to build a framework Python without writing to `/Applications`?

For example, here is the log:
```bash
$ export PYTHON_CONFIGURE_OPTS="--enable-framework=/Users/dilum/Desktop"
$ asdf install python 3.9.1
python-build 3.9.1 /Users/dilum/.asdf/installs/python/3.9.1
python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.9.1.tar.xz...
-> https://www.python.org/ftp/python/3.9.1/Python-3.9.1.tar.xz
Installing Python-3.9.1...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk

BUILD FAILED (OS X 11.1 using python-build 1.2.21-6-g2bf6111f)

Inspect or clean up the working tree at /var/folders/jy/7hh5zyw95cg2lh66lfpthqq80000gn/T/python-build.20210108043524.65081
Results logged to /var/folders/jy/7hh5zyw95cg2lh66lfpthqq80000gn/T/python-build.20210108043524.65081.log

Last 10 log lines:
cp ./../Icons/PythonLauncher.icns "Python Launcher.app/Contents/Resources"
cp ./../Icons/PythonSource.icns "Python Launcher.app/Contents/Resources"
cp ./../Icons/PythonCompiled.icns "Python Launcher.app/Contents/Resources"
cp ./factorySettings.plist "Python Launcher.app/Contents/Resources"
cp -R ./English.lproj "Python Launcher.app/Contents/Resources"
test -d "/Applications/Python 3.9" || mkdir -p "/Applications/Python 3.9"
mkdir: /Applications/Python 3.9: Permission denied
make[2]: *** [install] Error 1
make[1]: *** [install_PythonLauncher] Error 2
make: *** [frameworkinstallapps] Error 2
```

In contrast, a regular (non-framework) build works just fine. In a brand-new Bash session:
```bash
$ asdf install python 3.9.1
python-build 3.9.1 /Users/dilum/.asdf/installs/python/3.9.1
python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.9.1.tar.xz...
-> https://www.python.org/ftp/python/3.9.1/Python-3.9.1.tar.xz
Installing Python-3.9.1...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
Installed Python-3.9.1 to /Users/dilum/.asdf/installs/python/3.9.1

$ asdf shell python 3.9.1
$ python --version
Python 3.9.1
$ asdf list
python
3.9.1
```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Beginne damit, `asdf install python 3.9.1` mit `PYTHON_CONFIGURE_OPTS="--enable-framework=/Users/dilum/Desktop"` zu reproduzieren, inspiziere dann das python-build-Protokoll und vergleiche es mit dem regulären Build. Als erledigt gilt die Aufgabe, wenn die Framework-Installation nicht mehr versucht, `/Applications/Python 3.9` zu erstellen, und unter dem angeforderten benutzerdefinierten Verzeichnis abgeschlossen wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
macos, python, shell
Bereich
tooling
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.