asdf-community / asdf-community/asdf-python
[macOS] install framework Python to custom Applications directory
- Lenguaje dominante
- Shell
- Estrellas
- 729
- Forks
- 65
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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
```
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Comienza reproduciendo `asdf install python 3.9.1` con `PYTHON_CONFIGURE_OPTS="--enable-framework=/Users/dilum/Desktop"`, luego inspecciona el registro de python-build y compáralo con la compilación normal. Se considera terminado cuando la instalación del framework ya no intenta crear `/Applications/Python 3.9` y se completa en el directorio personalizado solicitado.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- macos, python, shell
- Área
- tooling
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100