1. Ludia
  2. Untitled project
  3. dynamodb-mock
  4. Pull requests

Pull requests

#4 Declined

Dependencies are not required to be setup at each install, they just need to be installed at some point

  1. Laurent Raufaste

Trying to pip install ddbmock with local downloaded files fails as the setup_requires force to download the dependencies.

Moving real deps to install_requires let the package management tool deal with dependencies.

For example those commands should not try to download dependencies:

pip install --no-deps --download /tmp ddbmock
pip install --no-deps --no-index --find-links=/tmp ddbmock

It's useful when trying to get a reproductible setup for automated production environments

Comments (6)

  1. Éric Araujo

    At Ludia we’ve had some back-and-forth on how we handle dependencies in our continuous integration and deployment system, and the current status is that test dependencies have to be mixed with setup dependencies. We do however separate runtime deps from build/test deps. We’ve started updating our tools to fix this, but it will take some time as we have other priorities and the current system mostly works. Thank you for wanting to help nonetheless!

    This PR seems to mix test deps and runtime deps, so I’m afraid I would reject it.

  2. Laurent Raufaste author

    Well the problem is that right now, dynamodb-mock and onctuous are the only 2 modules which give us trouble to deploy our codebase out of the 96 we use (we repackage custom versions of those 2 and replace the setup.py for now)

    grep -v ^# requirements.txt | grep -v "^$"| wc -l

    Mixing setup_requires and install_requires is intended to be used, and d2to1 needs to be setup. But the rest is not.

    When you add something in setup_requires you can't tell pip to install it from anywhere else than the original url, and it prevents any offline mode.

    I am certainly not as knowledgable on the subject as all of you, and I might miss some context, but I'm sure there is a way to make it behave like any other publicly available module.

    I'd just love to not have to hack the module each time there is an update =)

    Thanks for your time.

  3. Éric Araujo

    We’ve finally found some time to update our internal tools so that we can fix this. Only d2to1 will stay in setup-requires, and test dependencies will move to a pip requirements file. Runtime deps will stay in setup.py. Will that work for you?

  4. Éric Araujo

    Runtime dependencies are the distributions that are needed for the code itself to run (here Pyramid and onctuous), as opposed to build-time dependencies (i.e. build/tests/doc dependencies). I meant to say that these runtime deps will not move to a requirement file but stay in setup.cfg (and they get converted to install_requires equivalent when run by setup.py).