
RPM and pip compare versions differently, and this used to lead to lots problems, pain and sorrows. The most visible outcome of the difference is that from RPM's point of view version '2' != '2.0', as well as '2.0' != '2.0.0', but for pip it's same version. This change implements new workaround for this. It works as follows: if python module requires module of some version, (like 2.0.0), the actual RPM version of the module will have the same non-zero beginning and some '.0's at the end ('2', '2.0', '2.0.0', '2.0.0.0' ...). Thus, we can calculate lower bound for requirement by trimming '.0' from the version (we get '2'), and then set upper bound to lower bound plus tail of '.0' repeated several times. Luckily, '2.0' and '2.00' is the same version for RPM. Then, exact requirements (like 'pysendfile==2.0.0') are replaced with range (pysendfile >= 2, pysendfile <= 2.0.0.0.0.0.0.0.0.0.0.0), while for '<=' and '>=' we use only upper or lower bound correspondingly. Also, we do not trim zeroes from versions that we put in Version: tag, as we don't need to do that any more. Closes-bug: #1254991 Change-Id: Idb142d0f85d60183e79964baece52e0128cf9d7b
We want more information!
Please check out: http://anvil.readthedocs.org.
Licensing
Anvil is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Some tools are licensed under different terms; see tools/README.rst for more information.
Description
RETIRED, A set of python scripts and utilities to forge raw OpenStack into a productive tool!