Skip to content
Snippets Groups Projects
Select Git revision
  • 878aa394a476f28cc9cb2b6c3a07487e7a82d2d3
  • main default protected
  • next
  • revert-31645-feat/rename-gradle-wrapper-validation-action
  • renovate/main-redis-5.x
  • fix/36615b-branch-reuse-no-cache
  • chore/punycode
  • fix/36615-branch-reuse-bug
  • refactor/pin-new-value
  • feat/36219--git-x509-signing
  • feat/structured-logger
  • hotfix/39.264.1
  • feat/skip-dangling
  • gh-readonly-queue/next/pr-36034-7a061c4ca1024a19e2c295d773d9642625d1c2be
  • hotfix/39.238.3
  • refactor/gitlab-auto-approve
  • feat/template-strings
  • gh-readonly-queue/next/pr-35654-137d934242c784e0c45d4b957362214f0eade1d7
  • fix/32307-global-extends-merging
  • fix/32307-global-extends-repositories
  • gh-readonly-queue/next/pr-35009-046ebf7cb84ab859f7fefceb5fa53a54ce9736f8
  • 41.34.1
  • 41.34.0
  • 41.33.0
  • 41.32.3
  • 41.32.2
  • 41.32.1
  • 41.32.0
  • 41.31.1
  • 41.31.0
  • 41.30.5
  • 41.30.4
  • 41.30.3
  • 41.30.2
  • 41.30.1
  • 41.30.0
  • 41.29.1
  • 41.29.0
  • 41.28.2
  • 41.28.1
  • 41.28.0
41 results

python.md

Blame
  • user avatar
    Álvaro Mondéjar authored and GitHub committed
    33b9ec86
    History
    title: Python Package Manager Support
    description: Python/pip dependencies support in Renovate

    Python package manager support

    Renovate supports the following Python package managers:

    • pip (e.g. requirements.txt, requirements.pip) files
    • pipenv (e.g. Pipfile)
    • setup.py file
    • setup.cfg file

    Versioning support

    The PEP440 versioning scheme has been rewritten for JavaScript for the purposes of use in this project is published as @renovatebot/pep440. It supports both pinned versions as well as ranges. Legacy versions (=== prefix) are ignored.

    How it works

    1. Renovate searches through each repository for package files
    2. Existing dependencies are extracted from the package files
    3. Renovate looks up the latest version on PyPI to determine if any upgrades are available
    4. If the source package includes a GitHub URL as its source, and has a "changelog" file or uses GitHub releases, a Release Note will be embedded in the generated PR

    Alternative file names

    The default file matching regex for requirements.txt aims to pick up the most popular conventions for file naming, but it's possible that some get missed. If you have a specific file or file pattern you want the Renovate bot to find, use the fileMatch field in the pip_requirements object. e.g.:

      "pip_requirements": {
        "fileMatch": ["my/specifically-named.file", "\.requirements$"]
      }

    Alternate registries

    By default Renovate performs all lookups on pypi.org, but you can configure alternative index URLs. There are two ways to do this:

    index-url in requirements.txt

    The index URL can be specified in the first line of the file. For example:

    --index-url http://example.com/private-pypi/
    some-package==0.3.1
    some-other-package==1.0.0

    Sources in Pipfile

    Renovate detects any custom-configured sources in Pipfile and uses them.

    Specify URL in configuration

    You can use the registryUrls array to configure alternate index URL(s). e.g.:

      "python": {
        "registryUrls": ["http://example.com/private-pypi/"]
      }

    Note: the index-url found in the requirements.txt file takes precedence over a registryUrl configured like the above. To override the URL found in requirements.txt, you need to configure it in packageRules, as they are applied after package file extraction.

    Disabling Python support

    The most direct way to disable all Python support in Renovate is like this:

      "python": {
        "enabled": false
      }

    Alternatively, maybe you only want one package manager, such as npm. In that case this would enable only npm:

      "enabledManagers": ["npm"]