Skip to content

plugins/sources/pip.py: Accomodate characters '-','.','_' for packages

Description

This MR fixes the regex in plugins/sources/pip.py used to parse out the package name and package version from a downloaded source distribution such that it accommodates the characters '-', '.' and '_' in package names.

Changes proposed in this merge request:

  • Modify _SDIST_RE to accommodate '-', '.' and '_' in package names
  • Move the code that actually does the regex-matching to a separate function
  • Add a regression test to tests/sources/pip.py for parsing the source distributions
  • Add a testutil for generating dummy pip packages in a dummy python repository
  • Remove tests/integration/files/pypi-repo as these test pip packages can now be generated
  • Generate and test exotically named packages in tests/integration/pip_source.py

Merge request reports

Loading