[RTFACT-20646] Support case insensitive include and exclude patterns for PyPi repositories Created: 18/Nov/19 Updated: 18/Nov/19
|Project:||Artifactory Binary Repository|
|Reporter:||Adi Vizgan (Inactive)||Assignee:||Unassigned|
As mentioned in the KB article https://jfrog.com/knowledge-base/how-do-i-use-include-and-exclude-patterns-on-a-pypi-repository/, since using the regular Include and Exclude patterns of names of artifacts will not work on PyPi repositories, in order to configure Include and Exclude patterns that will work on PyPi repositories you will need to use the Include and Exclude patterns to Include/Exclude the packages metadata (not its name).
In an opposite use case, if a customer wants to exclude all artifacts except for a few that he wants to include, it becomes harder to configure, since Artifactory uses the include and exclude patterns as case sensitive. If you have a package that you would like to include, for example - "Cython", since its name starts with an upper case letter in the remote repository, you will need to create 2 different include patterns for it:
Except for those two patterns you will need to make for each package you want to include, you will also need to create the pattern - "**/simple.html" to allow the index file for the repository to be pulled (if this is not present, no packages will be able to be pulled).
In the Python PEPS documentation (specifically PEP-426: https://www.python.org/dev/peps/pep-0426/#name) it says:
"All comparisons of distribution names MUST be case insensitive, and MUST consider hyphens and underscores to be equivalent."
In order to be aligned with the Python PEPS requirements, we need to make the include and exclude patterns (for PyPi repositories only) case insensitive.