1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] How to automatically download or warn about a non-PyPi dependency of a Python package?

Discussão em 'Python' iniciado por Stack, Setembro 14, 2024.

  1. Stack

    Stack Membro Participativo

    I have a Python package, which is distributed on PyPi. It depends on number of other packages available on PyPi and on Psi4, which is only distributed on Conda repositories (https://anaconda.org/psi4/psi4), not on PyPi.

    Now, my package is distributed as wheel package via hatchling, so my pyproject.toml looks similar to this:

    [build-system]
    requires = ["hatchling"]
    build-backend = "hatchling.build"

    [project]
    name = "My project"
    version = "1.0.0"
    authors = [ ]
    description = "New method"
    readme = "README.md" requires-python = ">=3.12"
    classifiers = [
    "Programming Language :: Python :: 3",
    "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
    "Operating System :: POSIX :: Linux", ]

    dependencies = [
    "qiskit==1..0",
    "qiskit-nature>=0.5.1",
    "numpy>=1.23.0",
    "deprecated>=1.2.0"]


    Is there any way to deal with such an external dependency automatically? Ideally it'd download and install Psi4 from its repositories, but if not, is there any way to get at least a warning before the download from PyPi starts?

    I had a look around and found this related question, which, unfortunately, got no answers:


    Continue reading...

Compartilhe esta Página