requirements.txt vs setup.py #50387

Closed
opened 2017-01-07 17:01:54 +01:00 by Francesco Siddi · 8 comments

Currently installing Pillar with pip install -e . does not install al requirements needed by the app. Is there a particular reason for it? At the beginning of the file there is a text saying Setup file for testing, not for packaging/distribution.

The requirements.txt seems to contain all requirements.

Currently installing Pillar with `pip install -e .` does not install al requirements needed by the app. Is there a particular reason for it? At the beginning of the file there is a text saying **Setup file for testing, not for packaging/distribution**. The `requirements.txt` seems to contain all requirements.
Sybren A. Stüvel was assigned by Francesco Siddi 2017-01-07 17:01:54 +01:00

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @fsiddi

Added subscriber: @fsiddi

Added subscriber: @dfelinto

Added subscriber: @dfelinto

pip install -e . runs setup.py, which should install the dependencies needed by the app. They might be different versions than in requirements.txt, as generally setup.py contains only minimum versions supported.

For setting up a dev or prod environment, I would always recommend pip install -r requirements.txt and then pip install -e ..

Let's use this ticket to clean up the requirements.txt files, though. I have a plan for this, but it does require a more strict directory layout on our dev machines:

  • All projects are direct subdirectories of the same dir $DIR; on my machine this is /home/sybren/workspace/cloud. The exact directory doesn't matter, as long as it contains all Cloud projects.
  • Projects are checked out in $DIR/pillar, $DIR/flamenco, $DIR/attract, $DIR/pillar-python-sdk, and $DIR/blender-cloud.
  • In each project we refer to the requirements.txt files of their dependencies, so in $DIR/flamenco/requirements.txt we include -r ../pillar/requirements.txt. In a similar way, $DIR/blender-cloud/requirements.txt will refer to the Pillar, Flamenco and Attract files.

This does give us less freedom over where we place things on our development machines. However, it does free us from the hassle of keeping all the requirements synced up between projects.

`pip install -e .` runs `setup.py`, which should install the dependencies needed by the app. They might be different versions than in `requirements.txt`, as generally `setup.py` contains only minimum versions supported. For setting up a dev or prod environment, I would always recommend `pip install -r requirements.txt` and then `pip install -e .`. Let's use this ticket to clean up the requirements.txt files, though. I have a plan for this, but it does require a more strict directory layout on our dev machines: - All projects are direct subdirectories of the same dir `$DIR`; on my machine this is `/home/sybren/workspace/cloud`. The exact directory doesn't matter, as long as it contains all Cloud projects. - Projects are checked out in `$DIR/pillar`, `$DIR/flamenco`, `$DIR/attract`, `$DIR/pillar-python-sdk`, and `$DIR/blender-cloud`. - In each project we refer to the `requirements.txt` files of their dependencies, so in `$DIR/flamenco/requirements.txt` we include `-r ../pillar/requirements.txt`. In a similar way, `$DIR/blender-cloud/requirements.txt` will refer to the Pillar, Flamenco and Attract files. This does give us less freedom over where we place things on our development machines. However, it does free us from the hassle of keeping all the requirements synced up between projects.

Let's also take this as a chance to implement requirements-dev.txt for unittest and docs related packages.

Let's also take this as a chance to implement `requirements-dev.txt` for unittest and docs related packages.

On in, while porting to Python 3.6

On in, while porting to Python 3.6

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Resolved in the respective py36 branches of the components that make up the Cloud.

Resolved in the respective `py36` branches of the components that make up the Cloud.
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: archive/pillar#50387
No description provided.