{"id":20940416,"url":"https://github.com/fedora-python/fedora-python-tox","last_synced_at":"2025-10-13T16:40:00.219Z","repository":{"id":25556165,"uuid":"104360598","full_name":"fedora-python/fedora-python-tox","owner":"fedora-python","description":"Docker image sources for testing with various Pythons using tox","archived":false,"fork":false,"pushed_at":"2025-02-20T14:18:49.000Z","size":59,"stargazers_count":10,"open_issues_count":0,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-20T15:25:34.006Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fedora-python.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2017-09-21T14:44:59.000Z","updated_at":"2025-02-20T14:18:53.000Z","dependencies_parsed_at":"2023-12-11T13:01:50.487Z","dependency_job_id":"a6a53f44-dcd8-42d7-9841-5fa79c9e657f","html_url":"https://github.com/fedora-python/fedora-python-tox","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/fedora-python%2Ffedora-python-tox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fedora-python%2Ffedora-python-tox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fedora-python%2Ffedora-python-tox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fedora-python%2Ffedora-python-tox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fedora-python","download_url":"https://codeload.github.com/fedora-python/fedora-python-tox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243332317,"owners_count":20274454,"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-11-18T23:10:16.975Z","updated_at":"2025-10-13T16:40:00.176Z","avatar_url":"https://github.com/fedora-python.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fedora + Pythons + Tox in docker image\n\n![CI/CD status](https://github.com/fedora-python/fedora-python-tox/actions/workflows/build-and-push.yml/badge.svg)\n\nThis repository contains source code for Docker image designed to help you\nrun your Tox tests with all available Python versions in Docker container.\n\n[Docker image is hosted on Docker Hub](https://hub.docker.com/r/fedorapython/fedora-python-tox/) and build automatically after every push to master branch.\n\n# Fedora base image version\n\nWe usually add the newest Pythons to all supported Fedora releases. We also have to remove the oldest ones\nfrom time to time. These are the reasons why we move this container image from Fedora N to N+1 when\nN goes EOL.\n\n# Installed packages\n\nOn top of stable Fedora, this Docker image contains:\n- Python 3.6, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.14\n- Pypy2, Pypy3.9, Pypy3.10 and Pypy3.11\n- python3-pip\n- gcc, gcc-c++, git-core and make\n- tox\n- virtualenv\n\n# Docker and Podman\n\nThe image works very well with both [Docker](https://www.docker.com/) and [Podman](https://podman.io/) so you can use containers management tool you prefer.\n\n# Example usage with local source code\n\nIf you want to use this Docker image as environmet for your test, use this command:\n\n```\ncd example_project\ndocker run --rm -it -v $PWD:/src -w /src fedorapython/fedora-python-tox\n\npy27 create: /src/.tox/py27\npy27 installdeps: pytest \u003c 3.3\npy27 installed: py==1.5.3,pytest==3.2.5\npy27 runtests: PYTHONHASHSEED='85819776'\npy27 runtests: commands[0] | pytest\n==== test session starts ====\nplatform linux2 -- Python 2.7.18, pytest-3.2.5, py-1.5.3, pluggy-0.4.0\nrootdir: /src, inifile:\ncollected 10 items\n\ntest_fac.py ..........\n\n==== 10 passed in 0.02 seconds ====\n\npy35 create: /src/.tox/py35\npy35 installdeps: pytest \u003c 3.3\npy35 installed: py==1.5.3,pytest==3.2.5\npy35 runtests: PYTHONHASHSEED='1223497559'\npy35 runtests: commands[0] | pytest\n==== test session starts ====\nplatform linux -- Python 3.5.10, pytest-3.2.5, py-1.5.3, pluggy-0.4.0\nrootdir: /src, inifile:\ncollected 10 items\n\ntest_fac.py ..........\n\n==== 10 passed in 0.04 seconds ====\n... etc ...\n```\n\nThis command will download an image from Docker hub for you\n\n```\nUnable to find image 'fedorapython/fedora-python-tox:latest' locally\nTrying to pull repository docker.io/fedorapython/fedora-python-tox ...\nsha256:d4b51931dd86a33552b6a08f39575db336b606f4ccebbc48f390d7f728367a6f: Pulling from docker.io/fedorapython/fedora-python-tox\n\n```\n\nCommand and argument description:\n\n- `docker run`    - run docker image\n- `--rm`          - automatically remove the container when it exits\n- `-i`            - keep STDIN open even if not attached\n- `-t`            - allocate a pseudo-TTY\n- `-v $PWD:/src`  - mount your current working directory to /src inside container\n- `-w`            - use /src (mountpoint) as working directory inside container\n- `fedorapython/fedora-python-tox` - name of Docker image\n\nTox is run automatically with this container. How cool!\n\nYou also can limit Tox tests by passing environment variable to Docker. For example:\n\n```\ncd example_project\ndocker run --rm -it -v $PWD:/src -w /src -e TOXENV=pypy3 fedorapython/fedora-python-tox\npypy3 create: /src/.tox/pypy3\npypy3 installdeps: pytest\npypy3 installed: cffi==1.10.1,greenlet==0.4.12,py==1.4.34,pytest==3.2.2,readline==6.2.4.1\npypy3 runtests: PYTHONHASHSEED='68938415'\npypy3 runtests: commands[0] | pytest\n==== test session starts ====\nplatform linux -- Python 3.5.3[pypy-5.8.0-beta], pytest-3.2.2, py-1.4.34, pluggy-0.4.0\nrootdir: /src, inifile:\ncollected 10 items\n\ntest_fac.py ..........\n\n==== passed in 0.24 seconds ====\n\n  pypy3: commands succeeded\n  congratulations :)\n```\n\n## Parallel run and other tox features\n\nYou can adjust the behavior of tox by setting TOX_PARAMS variable with any combination of CLI parameters. It's useful for example for parallel run of your tests.\n\n```\ndocker run --rm -it -v $PWD:/src -w /src -e TOX_PARAMS=\"-p auto\" fedorapython/fedora-python-tox\n✔ OK py37 in 1.664 seconds\n✔ OK py35 in 1.893 seconds\n✔ OK py27 in 1.902 seconds\n✔ OK py38 in 1.913 seconds\n✔ OK py36 in 1.987 seconds\n✔ OK pypy in 2.904 seconds\n✔ OK pypy3 in 3.688 seconds\n__________________________________________ summary ___________________________________________\n  py27: commands succeeded\n  py35: commands succeeded\n  py36: commands succeeded\n  py37: commands succeeded\n  py38: commands succeeded\n  pypy: commands succeeded\n  pypy3: commands succeeded\n  congratulations :)\n```\n\n# Example usage with GIT URL\n\nInstead of mounting local folder with source code into container, you can\nprovide HTTPS URL of your GIT repository and it will be cloned automatically.\n\nFor example:\n```\ndocker run --rm -it -e GIT_URL=https://github.com/fedora-python/pyp2rpm.git fedorapython/fedora-python-tox\nCloning into 'temp_project_dir'...\nremote: Counting objects: 3075, done.\nremote: Compressing objects: 100% (5/5), done.\nremote: Total 3075 (delta 1), reused 3 (delta 1), pack-reused 3069\nReceiving objects: 100% (3075/3075), 2.97 MiB | 2.57 MiB/s, done.\nResolving deltas: 100% (2188/2188), done.\nGLOB sdist-make: /temp_project_dir/setup.py\npy27 create: /temp_project_dir/.tox/py27\n\n... etc ...\n```\n\n# Installing RPM packages from Fedora\n\nSometimes, your tests need some system packages (such as C libraries).\nYou can install them via `dnf` by setting the `$DNF_INSTALL` environment variable:\n\n```\ndocker run --rm -it -v $PWD:/src -w /src -e DNF_INSTALL=\"libyaml-devel libgit2-devel\" fedorapython/fedora-python-tox\n...\nInstalled:\n  http-parser-2.9.3-2.fc32.x86_64    libgit2-1.0.1-2.fc32.x86_64\n  libgit2-devel-1.0.1-2.fc32.x86_64  libssh2-1.9.0-5.fc32.x86_64\n  libyaml-devel-0.2.2-3.fc32.x86_64  openssl-devel-1:1.1.1g-1.fc32.x86_64\n  pcre2-devel-10.35-4.fc32.x86_64    pcre2-utf16-10.35-4.fc32.x86_64\n  pcre2-utf32-10.35-4.fc32.x86_64    zlib-devel-1.2.11-21.fc32.x86_64\n\nComplete!\npy27 create: /src/.tox/py27\n...\n```\n\nYou can install packages by any RPM *Provides*, for example:\n\n* Fedora package names, e.g. `libgit2-devel`,\n* pkgconfig names, e.g. `pkgconfig(libgit2)`, or\n* commands, e.g. `/usr/bin/cowsay`.\n\nComplex specifications including spaces have to be enclosed in single quotes\ninside the double quotes. For example: `-e DNF_INSTALL=\"libyaml-devel 'pytest \u003e 7'\"`\n\n# WORKDIR\n\nIf your `tox.ini` file is not in the root directory of your project, set `WORKDIR` to the path you want to cd to before the tests are executed.\n\n```\ndocker run --rm -it -e TOXENV=py310-minimal -e GIT_URL=https://github.com/trezor/trezor-firmware.git -e WORKDIR=python fedora-python-tox\n```\n\n# License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffedora-python%2Ffedora-python-tox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffedora-python%2Ffedora-python-tox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffedora-python%2Ffedora-python-tox/lists"}