Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matthewdeanmartin/python3
Hack to handle a missing alias/symlink, for example when you're on windows or don't want to be bothered
https://github.com/matthewdeanmartin/python3
Last synced: 1 day ago
JSON representation
Hack to handle a missing alias/symlink, for example when you're on windows or don't want to be bothered
- Host: GitHub
- URL: https://github.com/matthewdeanmartin/python3
- Owner: matthewdeanmartin
- License: mit
- Created: 2024-10-15T20:38:44.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-10-16T02:51:32.000Z (2 months ago)
- Last Synced: 2024-12-20T00:13:06.121Z (3 days ago)
- Language: Python
- Size: 49.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# python3
Hack to handle a missing alias/symlink, for example when you're on windows or don't want to be botheredThis exists so that the following Makefile command will execute correctly on windows.
```Makefile
PLATFORM_ARCH := $(shell python3 -c "import platform; print(platform.machine())")
```## Installation
To get python3 everywhere and python3 means just some random isolated python3
```bash
pipx install python3-alias
```To get a known version of python3, install into the system or venv.
```bash
pip install python3-alias
```## Motivation
Yes, I know, one solution is for *you* to personally purchase a Macbook for everyone in the world. Please
include me when you do.### Things that don't work
In git bash, this isn't picked up.
```bash
alias python3=python
```Link python3 to python in bash
```bash
ln -s /c/Users/USER/AppData/Local/Programs/Python/Python312/python /usr/bin/python3
# ln: failed to create symbolic link '/usr/bin/python3': Permission denied
```Also adding `python3=python` to this file didn't work.
```bash
nano "/C/Program Files/Git/etc/profile.d/aliases.sh"
```Also, a shell file named `python3` didn't work.
Installing python from the Microsoft Store might work, I didn't try. I'd rather install from python.org.
## Limitations
At the moment, there are no features to configure the python3 alias to use a python executable other than
the system, pipx or venv depending on where you installed it.This alias isn't to replace pyenv, asdf or the like.