#4 Declined
Repository
nalog nalog
Branch
default
Repository
Ludia Ludia
Branch
default

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

Author
  1. Laurent Raufaste avatarLaurent Raufaste
Reviewers
Description

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
          96
    

    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).

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.