acsone / setuptools-odoo

A library to help packaging Odoo addons with setuptools. It mainly populates the usual setup.py keywords from the Odoo manifest files.
GNU Lesser General Public License v3.0
41 stars 46 forks source link

Installation by pip #38

Closed Kerrim- closed 5 years ago

Kerrim- commented 5 years ago

Hi, I'm not sure if we are missing something but recently our whl packages stopped recognizing the installed odoo version.

Installed is 12.0.postXXXXXXXX and the package checks for 12.0a <= odoo < 12.1dev. https://github.com/acsone/setuptools-odoo/blob/744dc7723423e015c664f19c849ccf1f065ad3ee/setuptools_odoo/core.py#L67

This started happening some days ago. We fixed it by providing a fake odoo package with the right version number.

So my question: is this a bug in setuptools or does anyone experience the same issue?

sbidoul commented 5 years ago

You mean the installed version is truly 12.0.postXXXXXXXX (with the X)? Or is it something like 12.0.post20190501.

Kerrim- commented 5 years ago

sorry the XXXs are a placeholder for the date :)

sbidoul commented 5 years ago

That's strange, I do not experience this, and these version work fine:

image

Can you provide detailed steps to reproduce?

Kerrim- commented 5 years ago

Ok I tested it and you are right. I get the same behavior on the system:

>>> from packaging import version, specifiers
>>> odoo12 = version.parse("12.0.post20190601")
>>> intervall = specifiers.SpecifierSet("<12.1dev,>=12.0a")
>>> intervall.contains(odoo12)
True

I could narrow my problem down to the force-reinstall parameter of pip. So I don't think that this is an setuptools issue anymore.

Thanks for the fast reply.