Skip to content

Commit 8146f89

Browse files
committed
minor symfony#7404 Pin Python dependencies and install them in a virtualenv (damz)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes symfony#7404). Discussion ---------- Pin Python dependencies and install them in a virtualenv (Alternative version from symfony#7403) Installing `sphinx` started to fail about a week ago, with `pip` incorrectly trying to remove a Python package shipped at the system level in Platform.sh environment. It looks like it started failing because of a bug in the older version of `pip` that ships with Debian Jessie. We (Platform.sh) install global Python dependencies as user-site packages (using `pip --user`). We also ship system-site packages that we use for our own benefit. So two issues here: * First, that older version of `pip`. We are going to look into upgrading it (a new batch of images based on Debian Stretch are cooking); * The build dependencies of the Symfony Docs are not pinned, which makes the build non-repeatable. I'm guessing that in this case it broke [when jinja2 ended up requiring markupsafe>=0.23][jinja2-commit] (but that's just a guess). Fix the issue for good by installing in a `virtualenv` and pinning all the dependencies via `pip freeze`. [jinja2-commit]: pallets/jinja@5453db1 Commits ------- 75e7177 Pin Python dependencies and install them in a virtualenv
2 parents cd2ec4f + 75e7177 commit 8146f89

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

.platform.app.yaml

+7-2
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,15 @@ disk: 512
4646
# Build time dependencies.
4747
dependencies:
4848
python:
49-
sphinx: "1.3.6"
49+
virtualenv: 15.1.0
5050

5151
# The hooks that will be performed when the package is deployed.
5252
hooks:
5353
build: |
54-
pip install git+https://github.com/fabpot/sphinx-php.git
54+
virtualenv .virtualenv
55+
. .virtualenv/bin/activate
56+
# Platform.sh currently sets PIP_USER=1.
57+
export PIP_USER=
58+
pip install pip==9.0.1 wheel==0.29.0
59+
pip install -r requirements.txt
5560
make -C _build html

requirements.txt

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
alabaster==0.7.9
2+
Babel==2.3.4
3+
docutils==0.13.1
4+
imagesize==0.7.1
5+
Jinja2==2.9.4
6+
MarkupSafe==0.23
7+
Pygments==2.2.0
8+
pytz==2016.10
9+
requests==2.12.5
10+
six==1.10.0
11+
snowballstemmer==1.2.1
12+
Sphinx==1.5.2
13+
git+https://github.com/fabpot/sphinx-php.git@7312eccce9465640752e51373a480da700e02345#egg_name=sphinx-php
14+

0 commit comments

Comments
 (0)