Python module setup.py dependency updates by Renovate combined with GitLab Package Registry

92 views Asked by At

We have Python modules, which were referencing other Python modules from an internal GitLab Package Registry. The setup.py looks like the following:

import setuptools

setuptools.setup(
    name="dummy-module",
    version="0.1.0",
    author="Dummy User",
    author_email="[email protected]",
    description="Dumm module.",
    packages=setuptools.find_packages(),
    classifiers=[
        "Programming Language :: Python :: 3",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
    ],
    python_requires='>=3.6',
    install_requires=[
        "other-internal-module @ https://gitlab.local.com/api/v4/projects/1/packages/pypi/files/0635d9dc9b32911047c19d2814b0b574be7c91756de2283f5217d9e098f79bab/other-internal-module-0.1.0-py3-none-any.whl",
        "python-ldap==3.4.4"]
)

Our goal is to not use a separate requirements.txt with redundant content and also to install all dependencies directly when installing the Python module dummy-module. This works so far by using the setup.py with install_requires, as shown above.

Renovate is configured and also able to detect and update python-ldap inside the setup.py. However, the other-internal-module will not be updated. Might it's because of the "direct reference" (-> @ https://gitlab.local.com/api/v4/projects/1/packages/pypi/files/0635d9dc9b32911047c19d2814b0b574be7c91756de2283f5217d9e098f79bab/other-internal-module-0.1.0-py3-none-any.whl) or Renovate is not able to handle this kind of references.

enter image description here

So my question would be:

  • Does anyone have a hint, how it would be possible to get dependency updates by Renovate for other-internal-module in this kind of construct?
  • Or might another idea of how to define internal hosted (by GitLab Package Registry) Python modules inside the setup.py that during module dummy-module installation the module other-internal-module will also be installed from the local GitLab Package Registry?
1

There are 1 answers

0
Patrick On

As seen in this GitHub discussion, Renovate is at the moment not able to handle these kinds of dependency.

"other-internal-module @ https://gitlab.local.com/api/v4/projects/1/packages/pypi/files/0635d9dc9b32911047c19d2814b0b574be7c91756de2283f5217d9e098f79bab/other-internal-module-0.1.0-py3-none-any.whl"