Story #3197
closedAs a User, I can create a PythonPackageContent from an Artifact uploaded to Pulp
100%
Description
The upload workflow in Pulp 3 is:
- Use pulpcore REST API to upload bits and create an Artifact
- POST to a Detail ContentUnit (api/v3/content/python/) to create a PythonPackageContent from a specified Artifact
This story is to make sure that (2) works. (1) Does not require anything from the plugin.
In Pulp 2, we create Uploaded Python ContentUnits here [0] by using twine, but we should move away from doing it that way. [1] We only use a small part of twine (which isn't really supposed to be used as a library), so we will need to implement that functionality. [2]
Extra credit: Put at least 1 of each upload type in https://github.com/PulpQE/pulp-fixtures (half extra credit, provide a link to 1 of each here)
[0]: https://github.com/pulp/pulp_python/blob/master/plugins/pulp_python/plugins/models.py#L125-L150
[1]: https://pulp.plan.io/issues/3157
[2]: https://github.com/pypa/twine/blob/3efd3b5d2715f537096b95cb2e6853e02990b059/twine/package.py
Related issues
Create a PythonPackageContent from an Artifact uploaded to Pulp Update content unit creation so it takes only a filename and artifact href
closes #3197, #3604
https://pulp.plan.io/issues/3197 https://pulp.plan.io/issues/3604