Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-20646

Support case insensitive include and exclude patterns for PyPi repositories

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      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:

      1. "*/cython" (this pattern will allow to include the metadata file for this package which is always saved with lower case letters no matter the package name).
      2. "*/Cython" (this pattern will allow to include the package itself since it is saved with an upper case).

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              adiv Adi Vizgan (Inactive)
            • Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: