Just one thought: I assume $PULP_BASE_ADDR is the part without "pulp/api/v3/". So why should you include the "pulp_python" segment? You could just host it as e.g. " http://localhost/pypi/foo/simple". The interfaces provided there should not be in any way specific to pulp_anything.
On Tue, May 18, 2021 at 11:44 PM Gerrod Ubben <gub...@redhat.com> wrote: > 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 >
_______________________________________________ Pulp-dev mailing list Pulp-dev@redhat.com https://listman.redhat.com/mailman/listinfo/pulp-dev