[openstack-dev] [infra][project-config][oslo.messaging] Pre-driver requirements split-up initiative

Donald Stufft donald at stufft.io
Fri Feb 6 14:16:27 UTC 2015


> On Feb 6, 2015, at 9:00 AM, Jeremy Stanley <fungi at yuggoth.org> wrote:
> 
> On 2015-02-06 14:37:08 +0200 (+0200), Denis Makogon wrote:
>> As part of oslo.messaging initiative to split up requirements into
>> certain list of per messaging driver dependencies
> [...]
> 
> I'm curious what the end goal is here... when someone does `pip
> install oslo.messaging` what do you/they expect to get installed?
> Your run-parts style "requirements.d" plan is sort of
> counter-intuitive to me in that I would expect it to contain
> number-prefixed sublists of requirements which should be processed
> collectively in an alphanumeric sort order, but I get the impression
> this is not the goal of the mechanism (I'll be somewhat relieved if
> you tell me I'm mistaken in that regard).
> 
>> Taking into account suggestion from Monty Taylor i’m bringing this
>> discussion to much wider audience. And the question is: aren’t we
>> doing something complex or are there any less complex ways to
>> accomplish the initial idea of splitting requirements?
> 
> As for taking this to a wider audience we (OpenStack) are already
> venturing into special snowflake territory with PBR, however
> requirements.txt is a convention used at least somewhat outside of
> OpenStack-related Python projects. It might make sense to get input
> from the broader Python packaging community on something like this
> before we end up alienating ourselves from them entirely.

I’m not sure what exactly is trying to be achieved here, but I still assert
that requirements.txt is the wrong place for pbr to be looking and it should
instead look for dependencies specified inside of a setup.cfg.

More on topic, I'm not sure what "inner" dependencies are, but if what you're
looking for is optional dependencies that only are needed in specific situation
then you probably want extras, defined like:

    setup(
        extras_require={
            "somename": [
                "dep1",
                "dep2",
            ],
        },
    )

Then if you do ``pip install myproject[somename]`` it'll include dep1 and dep2
in the list of dependencies, you can also depend on this in other projects
like:

    setup(
        install_requires=["myproject[somename]>=1.0"],
    )

---
Donald Stufft
PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA




More information about the OpenStack-dev mailing list