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

Allow PKG-INFO/METADATA files of Pypi package to be in the root of the archive

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Done
    • Priority: 4 - Normal
    • Resolution: Done
    • Affects Version/s: 6.0.3
    • Fix Version/s: 6.9.0
    • Component/s: Metadata, PyPI
    • Labels:
      None

      Description

      Based on Python spec (https://www.python.org/dev/peps/pep-0314/ and https://packaging.python.org/tutorials/packaging-projects/), the structure of a Python package should be, for example: (note the depth of PKG-INFO)

      └── fasteners-0.14.1.tar.gz
          └──fasteners-0.14.1
             ├── ChangeLog
             ├── LICENSE
             ├── MANIFEST.in
             ├── PKG-INFO
             ├── README.rst
             ├── fasteners
             │   ├── __init__.py
             │   ├── _utils.py
             │   └── test.py
             ├── setup.cfg
             └── setup.py
      

      However, some packages are structured like this: (for example: https://pypi.org/project/patch/1.16/#files)

      └── patch-1.16.zip
          ├── PKG-INFO
          ├── __main__.py
          ├── patch.py
          └── setup.py
      

      Therefore, Artifactory can't calculate its metadata, since Artifactory is looking for the PKG-INFO file inside a directory which is inside the zip, based on a regex pattern. (And you will see NPE in the artifactory.log).

      As a result, users might not be able to install such packages from the client, since the metadata is not getting calculated and the package has no reference in the simple file.

      Artifactory should accept this kind of structure in order to always allow users to download these packages.

       

      There is a workaround that can be implemented, but it's not recommended for production:

      You can extract the package locally into a new folder and compress this folder. Then, the PKG-INFO location will comply with the spec rules.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Dudim Dudi Morad (Inactive)
              Reporter:
              avivb Aviv Blonder
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Sync Status

                  Connection: RTFACT Sync
                  RTMID-17032 -
                  SYNCHRONIZED
                  • Last Sync Date: