Content selector for pypi repository

Hello everyone,

I have created two pypi repository in nexus (for snapshot and release version) but nexus don’t accept version policy for pypi.

But snapshot version of pipy artifacts have “.dev” pattern in their name.

So I have created “content selectors” for the pypi artifacts (to prohibit to push in release repository artifacts with “.dev” pattern and only allow these one in snapshot repository)

The content selectors are:

  • format == “pypi” and path = ~ “(?! ^.dev.).*” (exclude “.dev” pattern)

  • format == “pypi” and path = ~ “.dev.” (Allow only “.dev” pattern)

(The preview result for the content selctors are good)

Unfortunately that doesn’t work!

I cannot push “.dev” pattern in snapshot repository, but the ban for release repository work.

Do you have an idea to fix that ?

Thanks

Nexus Version: OSS 3.15.2-01
Debian Version: Debian GNU/Linux 9.5 (stretch)

I think you want something like

format == "pypi" and path =~ ".*(\.dev)$"

In PyPi repository format an upload is done via a POST request to the root of the repository. Unfortunately, this means there isn’t any way to create a content selector in Nexus for uploads for this format. We have an issue open here for this: