| Conditions | 1 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | from coalib.bears.requirements.PackageRequirement import PackageRequirement |
||
| 14 | def __init__(self, package, version=""): |
||
| 15 | """ |
||
| 16 | Constructs a new ``PipRequirement``, using the ``PackageRequirement`` |
||
| 17 | constructor. |
||
| 18 | |||
| 19 | >>> pr = PipRequirement('setuptools', '19.2') |
||
| 20 | >>> pr.manager |
||
| 21 | 'pip' |
||
| 22 | >>> pr.package |
||
| 23 | 'setuptools' |
||
| 24 | >>> pr.version |
||
| 25 | '19.2' |
||
| 26 | |||
| 27 | :param package: A string with the name of the package to be installed. |
||
| 28 | :param version: A version string. Leave empty to specify latest version. |
||
| 29 | """ |
||
| 30 | PackageRequirement.__init__(self, 'pip', package, version) |
||
| 31 | |||
| 50 |