Using the argument provides the keyword in python setup.py

I am working on a fork of a python project ( tryton ) that uses setuptools for packaging. I am trying to expand the server side of the project and would like to be able to use existing modules with my plug.

These modules are distributed with setuptools packaging and require a basic installation project.

I need a way to make my plug an acceptable requirement for these 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 install have the following requirements:

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

As with installing my package, an attempt to install the module starts the installation of the trytond package.

+4
source share
2 answers

It is not recommended to use, it proceeds from the packaging specification (PEP metadata), which is not implemented by any tool. The requirement in the install_requires argument maps to name in another setup.py file. IOW, replace provides with setup(name='trytond', version='2.8.2') .

+3
source

If you create rpms, you can use setup.cfg as follows:

 [bdist_rpm] provides = your-package = 0.8 obsoletes = your-package 
0
source

Source: https://habr.com/ru/post/1501474/


All Articles