asdf-community / asdf-community/asdf-python

[macOS] install framework Python to custom Applications directory

Aperta
#86 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Shell
Stelle
729
Fork
65
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia riproducendo `asdf install python 3.9.1` con `PYTHON_CONFIGURE_OPTS="--enable-framework=/Users/dilum/Desktop"`, quindi esamina il log di python-build e confrontalo con la build normale. Il lavoro è completato quando l’installazione del framework non tenta più di creare `/Applications/Python 3.9` e viene completata nella directory personalizzata richiesta.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
macos, python, shell
Ambito
tooling
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.