문제

I am working on a fork of a python projet (tryton) which uses setuptools for packaging. I am trying to extend the server part of the project, and would like to be able to use the existing modules with my fork.

Those modules are distributed with setuptools packaging, and are requiring the base project for installation.

I need a way to make it so that my fork is considered an acceptable requirement for those modules.

EDIT : Here is what I used in my setup.py :

from setuptools import setup

setup(
    ...
    provides=["trytond (2.8.2)"],
    ...
)

The modules I want to be able to install have those requirements :

from setuptools import setup

setup(
    ...
    install_requires=["trytond>=2.8"]
    ...
)

As it is, with my package installed, trying to install a module triggers the installation of the trytond package.

도움이 되었습니까?

해결책

Don’t use provides, it comes from a packaging specification (a metadata PEP) that is not implemented by any tool. The requiremens in the install_requires argument map to the name in your other setup.py. IOW, replace your provides with setup(name='trytond', version='2.8.2').

다른 팁

If you are building rpms, it is possible to use the setup.cfg as follows:

[bdist_rpm]
provides = your-package  =    0.8
obsoletes = your-package
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top