{"id":21017959,"url":"https://github.com/sthysel/raspian-python-build","last_synced_at":"2026-05-08T11:34:59.878Z","repository":{"id":138851898,"uuid":"194034493","full_name":"sthysel/raspian-python-build","owner":"sthysel","description":"Ansible playbook to build and install Python on raspian","archived":false,"fork":false,"pushed_at":"2019-06-27T06:41:56.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T04:59:48.661Z","etag":null,"topics":["ansible","python","python37","raspberrypi"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sthysel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-27T06:19:00.000Z","updated_at":"2019-06-27T09:28:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"ac8184c6-b8e8-4f7a-9390-c8dc34ffd32c","html_url":"https://github.com/sthysel/raspian-python-build","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/sthysel%2Fraspian-python-build","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sthysel%2Fraspian-python-build/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sthysel%2Fraspian-python-build/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sthysel%2Fraspian-python-build/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sthysel","download_url":"https://codeload.github.com/sthysel/raspian-python-build/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243447641,"owners_count":20292452,"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":["ansible","python","python37","raspberrypi"],"created_at":"2024-11-19T10:22:52.546Z","updated_at":"2026-05-08T11:34:54.851Z","avatar_url":"https://github.com/sthysel.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible playbooks to build and install Python 3.n on raspian\n\nThis is why you should use Arch on your pi.\n\nRunning playbook directly on target needs ansible locally installed:\n\n```sh\n$ sudo apt install ansible\n```\n\nIf ansible is already available on the 'master' box just run it from there and\npoint to the target using -i as usual.\n\n```sh\n$ ansible-playbook --ask-become-pass -i localhost, python3.7.yml\n```\n\n## Playbook\n\nBe sure to use the playbook in the repo, below is just advertising.\n\n```ansible\n\n# An ansible role to configure python3.7 on a Raspberry Pi.\n# Ensure ansible is here: $ sudo apt install ansible\n# Use the playbook: $ ansible-playbook -i localhost python3.7.yml\n#\n---\n- hosts: all\n  vars:\n    version: 3.7.3\n    threads: 4\n  tasks:\n    - name: \"Python-{{version}} run\u0026build dependencies\"\n      become: yes\n      apt: name={{item}}\n      with_items:\n        - build-essential\n        - tk-dev\n        - libncurses5-dev\n        - libncursesw5-dev\n        - libreadline6-dev\n        - libdb5.3-dev\n        - libgdbm-dev\n        - libsqlite3-dev\n        - libssl-dev\n        - libbz2-dev\n        - libexpat1-dev\n        - liblzma-dev\n        - zlib1g-dev\n        - libffi-dev\n    - name: \"Download Python-{{version}}\"\n      get_url:\n        url=\"https://www.python.org/ftp/python/{{version}}/Python-{{version}}.tar.xz\"\n        dest=\"/tmp/Python-{{version}}.tar.xz\"\n    - name: \"Unarchive Python-{{version}}\"\n      unarchive:\n        src=\"/tmp/Python-{{version}}.tar.xz\"\n        dest=\"/tmp/\"\n        copy=no\n        creates=\"/tmp/Python-{{version}}\"\n    - name: \"Configure Python-{{version}} build\"\n      command: ./configure --enable-optimizations\n      args:\n        chdir: \"/tmp/Python-{{version}}\"\n        creates: \"/tmp/Python-{{version}}/Makefile\"\n    - name: \"Build Python-{{version}}\"\n      # not using make module to be able to use -j and creates option to fully skip step\n      command: make -j{{threads}}\n      args:\n        chdir: \"/tmp/Python-{{version}}\"\n        creates: \"/tmp/Python-{{version}}/python\"\n    - name: \"Install Python-{{version}}\"\n      become: yes\n      make:\n        chdir: \"/tmp/Python-{{version}}\"\n        target: altinstall\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsthysel%2Fraspian-python-build","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsthysel%2Fraspian-python-build","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsthysel%2Fraspian-python-build/lists"}