Hey everyone, I am currently working on the long-awaited Twine upload support [0] for pulp_python. To add this functionality a new upload endpoint is needed. Since this new endpoint will need to be able to accept POST requests I plan to make the Python endpoints apart of the Pulp API.
Proposed change: Have Python endpoints available at "/pulp_python/pypi/{base_path}/" API Current Location New Location Description simple $PULP_CONTENT_ADDR/pulp/content/{base_path}/simple/ $PULP_BASE_ADDR/pulp_python/pypi/{base_path}/simple/ Used for installing packages pypi $PULP_CONTENT_ADDR/pulp/content/{base_path}/pypi/ $PULP_BASE_ADDR/pulp_python/pypi/{base_path}/pypi/ Used for syncing repositories upload $PULP_BASE_ADDR/pulp_python/pypi/{base_path}/legacy/ **$PULP_BASE_ADDR/pulp_python/pypi/{base_path}/simple/* Used for uploading packages The current Python endpoints will still be available at their present locations (and will be used as the backbone for the new locations) and the new upload endpoint will be available at '/legacy/' since the default PyPI endpoint Twine uses is 'https://upload.pypi.org/legacy/'. Pip stores its index URLs in a 'pip.conf' file [1] and Twine stores its index URLs in the '.pypirc' file [2], so to have an easy setup across all Python tools I am thinking of also having the upload functionality available at the simple URL. This way one URL can be used for the Pulp Python index across all the Python tooling. An example workflow with these new changes: > pulp python repository create --name foo > pulp python distribution create --name foo --base-path foo --repository foo > export PULP_PYTHON_INDEX=$PULP_BASE_ADDR/pulp_python/pypi/foo/simple/ > twine upload --repository-url $PULP_PYTHON_INDEX dist/* --skip-existing > pip install -i $PULP_PYTHON_INDEX pulpcore > Do these changes concern anyone? Would a different name for the upload endpoint be preferred? Should the simple endpoint also support uploading packages? I plan on having this feature fully complete and ready for review by the end of the week, May 21st. Any feedback before then would be appreciated. [0] https://github.com/pulp/pulp_python/pull/367 [1] https://pip.pypa.io/en/stable/user_guide/#configuration [2] https://packaging.python.org/specifications/pypirc/ Thanks, Gerrod
_______________________________________________ Pulp-dev mailing list Pulp-dev@redhat.com https://listman.redhat.com/mailman/listinfo/pulp-dev