0

Silly question here.

Let's say I want to structure my project into multiple sub-projects. I wish to specify dependencies for each of the projects, but wish to have the whole be available as one cohesive unit as well.

So, for example:

Project
|- setup.py
|- requirements.txt
|- Subproject1
   |- requirements.txt
   |- code.py 
|- Subproject2
   |- requirements.txt
   |- foo.py

So, instead of specifying dependencies all in a root file, I want to specify them in each subproject. Is this possible?

Andriy Drozdyuk
  • 58,435
  • 50
  • 171
  • 272
  • I've re-read the question multiple times, and I am struggling to understand it. What exactly do you mean by "specifying dependencies"? – NPE May 28 '14 at 13:34
  • Say `Subproject1` uses a twitter library, while `Subproject2` needs some xml library. Instead of the root project specifying both, I want each subproject to list their own. – Andriy Drozdyuk May 28 '14 at 13:35
  • Oh, this is about `pip`? If it is, you might mention it rather than having the reader figure it out themselves. :) – NPE May 28 '14 at 13:36

1 Answers1

1

If you are speaking of something like pip install -r whole-project-requirements.txt, where whole-project-requirements.txt hold references to subprojects dependencies, it seems possible, as described in this previous SO question will help you

Community
  • 1
  • 1
Agate
  • 3,152
  • 1
  • 19
  • 30