{"id":13815256,"url":"https://github.com/uranusjr/pythonup-posix","last_synced_at":"2025-04-11T11:31:24.572Z","repository":{"id":44866738,"uuid":"116168251","full_name":"uranusjr/pythonup-posix","owner":"uranusjr","description":"The Python Runtime Manager for POSIX systems","archived":false,"fork":false,"pushed_at":"2022-01-21T19:05:19.000Z","size":56,"stargazers_count":11,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T13:21:13.771Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uranusjr.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-03T18:20:33.000Z","updated_at":"2021-04-20T01:45:49.000Z","dependencies_parsed_at":"2022-09-04T15:23:59.964Z","dependency_job_id":null,"html_url":"https://github.com/uranusjr/pythonup-posix","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uranusjr%2Fpythonup-posix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uranusjr%2Fpythonup-posix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uranusjr%2Fpythonup-posix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uranusjr%2Fpythonup-posix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uranusjr","download_url":"https://codeload.github.com/uranusjr/pythonup-posix/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248383942,"owners_count":21094638,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T04:03:13.211Z","updated_at":"2025-04-11T11:31:24.238Z","avatar_url":"https://github.com/uranusjr.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"=============================================\nPythonUp — The Python Runtime Manager (POSIX)\n=============================================\n\nPythonUp helps your install and manage Python runtimes on your computer. This\nis the POSIX version.\n\n.. highlights::\n\n    Windows user? Check out `PythonUp-Windows`_.\n\n.. _`PythonUp-Windows`: https://github.com/uranusjr/pythonup-windows\n\n.. highlights::\n    This is a work in progress. You are welcomed to try it, and I’ll try to\n    resolve any problems you have using it. I’m still experimenting much of the\n    internals, however, so anything can break when you upgrade without\n    backward-compatibility in mind.\n\n\nDistribution\n============\n\n1. Clone the repository somethere.\n2. Create a Python environment for the project.\n3. Create a shim to run `pythonup` withe the environment.\n4. Add locations PythonUp installs scripts into to your PATH.\n\nThis is the steps I use::\n\n    mkdir -p ~/.local/libexec/pythonup-posix\n    cd ~/.local/libexec/pythonup-posix\n    git clone https://github.com/uranusjr/pythonup-posix.git repo\n    python3.6 -m venv --prompt=pythonup-posix venv\n    ./venv/bin/python -m pip install --upgrade setuptools pip\n    ./venv/bin/python -m pip install click dataclasses packaging\n    ln -s $PWD/repo/pythonup ./venv/lib/python3.6/site-packages\n\nShim to invoke PythonUp::\n\n    #!/bin/sh\n    exec $HOME/.local/libexec/pythonup-posix/venv/bin/python -m pythonup $*\n\nAside from usual Python dependencies, PythonUp also requires\n\n1. `python-build` from pyenv_. You don’t need to install pyenv, only the\n   ``python-build`` command. Clone the repository, and ``ln -s`` the command\n   (in ``pyenv/plugins/python-build/bin``) into your ``PATH``.\n\n2. Build dependencies for Python. pyenv maintains lists for common package\n   managers: https://github.com/pyenv/pyenv/wiki#suggested-build-environment\n\n.. _pyenv: https://github.com/pyenv/pyenv\n\n\nQuick Start\n===========\n\nInstall Python 3.6::\n\n    $ pythonup install 3.6\n\nRun Python::\n\n    $ python3\n\nInstall Pipenv to Python 3.6::\n\n    $ pip3.6 install pipenv\n\nAnd use it immediately (DOES NOT WORK YET, see TODO below)::\n\n    $ pipenv --version\n    pipenv, version 9.0.1\n\nInstall Python 2.7::\n\n    $ pythonup install 3.5-32\n\nSwitch to a specific version::\n\n    $ pythonup use 3.5\n    $ python3 --version\n    Python 3.5.4\n\nSwitch back to 3.6::\n\n    $ pythonup use 3.6\n    $ python3 --version\n    Python 3.6.4\n    $ python3.5 --version\n    Python 3.5.4\n\nUninstall Python::\n\n    $ pythonup uninstall 3.5\n\nUse ``--help`` to find more::\n\n    $ pythonup --help\n    $ pythonup install --help\n\n\nInternals\n=========\n\nPythonUp uses pyenv’s ``python-build`` command to build the best match, and\ninstall it into ``$HOME/Library/PythonUp/versions/X.Y``. Unlike pyenv, PythonUp\nonly lets you specify X.Y, not the micro part, so you can upgrade within a\nminor version without breaking all your existing virtual environments.\n\n\nTodo\n====\n\nShims\n-----\n\nSimilar to pyenv (and PythonUp on Windows), ``pip`` and ``easy_install``\ncommands should be shimmed to allow auto-publishing hooks after you install a\npackage. Unlike the Windows implementation, some simple shell scripts will\nsuffice, fortunately. The script will be generated dynamically, when the user\n``use`` versions, to point to the correct version.\n\n\nBundle python-build\n-------------------\n\nThere are several disadvantages depending on Homebrew’s pyenv:\n\n* pyenv does not release a new version to add a new Python definition.\n* Homebrew does not always update the pyenv formula when pyenv releases.\n\nPython 3.6.4, for example, was released on 2017-12-19. The python-build\ndefinition landed a few hours later, but is still not available as a versioned\nrelease (as of 2018-01-05). Judging from recent release patterns, availability\nof new Python versions can be delayed to up to one month after their official\ndistribution.\n\nI’m personally working around this by using the ``HEAD`` version of pyenv (\n``brew install --HEAD pyenv``), but this is not a good long-term solution. It\nwould be better to vendor python-build (maybe as a Git subtree), and update\nwhen user queries Python versions (e.g. with ``install`` and ``list``).\n\nAnother benefit of vendoring is that we don’t need the ``python-build`` command\nto be globally available.\n\n\nExplain things\n--------------\n\nObvious question: Why not just use pyenv? Because you always want to use the\nlatest micro of a Python version, but pyenv doesn’t let you do that easily\nwithout breaking all your virtual environments and globally installed tools.\nAlso the shims are a terrible idea.\n\n\nTests\n-----\n\nI always say this, but all my projects are under-tested. Hashtag help-wanted.\n\n\nDocumentation\n-------------\n\nIt *might* be a good idea to unify the documentation? It makes sense from a\nuser’s perspective because the interfaces are almost identical. The\nimplementation and all underlying parts are different though. This would\nrequire some very careful planning.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furanusjr%2Fpythonup-posix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Furanusjr%2Fpythonup-posix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furanusjr%2Fpythonup-posix/lists"}