8000 Merge pull request #111 from python/python36-like-a-good-pythonista · python/psf-salt@65e058f · GitHub
[go: up one dir, main page]

Skip to content

Commit 65e058f

Browse files
authored
Merge pull request #111 from python/python36-like-a-good-pythonista
docs: setup python3.6 for docsbuild
2 parents f019ee6 + 2c42bf7 commit 65e058f

File tree

1 file changed

+37
-8
lines changed

1 file changed

+37
-8
lines changed

salt/docs/init.sls

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
include:
22
- nginx
33

4+
deadsnakes-ppa:
5+
pkgrepo.managed:
6+
- ppa: fkrull/deadsnakes
7+
48

59
# Various packages required for building documentation.
610
doc-pkgs:
@@ -10,14 +14,16 @@ doc-pkgs:
1014
- git
1115
- mercurial
1216
- python-dev
13-
- python3-dev
17+
- python3.6-dev
1418
- python-virtualenv
1519
- texlive
1620
- texlive-latex-extra
1721
- texlive-latex-recommended
1822
- texlive-fonts-recommended
1923
- texlive-lang-all
2024
- zip
25+
- require:
26+
- pkgrepo: deadsnakes-ppa
2127

2228
docsbuild:
2329
user.present:
@@ -46,17 +52,40 @@ docsbuild-scripts:
4652
# Theses are needed to build C extensions.
4753
- pkg: doc-pkgs
4854

49-
/srv/docsbuild/venv/:
50-
virtualenv.managed:
55+
py36-virtualenv:
56+
cmd.run:
5157
- user: docsbuild
52-
- no_deps: True
53-
- python: python3
54-
- requirements: /srv/docsbuild/scripts/requirements.txt
58+
- name: 'python3.6 -m venv --without-pip /srv/docsbuild/venv'
59+
- creates: /srv/docsbuild/venv/bin/python
5560
- require:
56-
- git: docsbuild-scripts
57-
# Theses are needed to build C extensions.
5861
- pkg: doc-pkgs
5962

63+
/srv/docsbuild/venv/get-pip.py:
64+
file.managed:
65+
- user: docsbuild
66+
- source: https://bootstrap.pypa.io/get-pip.py
67+
- source_hash: sha256=19dae841a150c86e2a09d475b5eb0602861f2a5b7761ec268049a662dbd2bd0c
68+
- require:
69+
- cmd: py36-virtualenv
70+
71+
py36-virtualenv-pip:
72+
cmd.run:
73+
- user: docsbuild
74+
- name: /srv/docsbuild/venv/bin/python /srv/docsbuild/venv/get-pip.py
75+
- creates: /srv/docsbuild/venv/bin/pip
76+
- require:
77+
- file: /srv/docsbuild/venv/get-pip.py
78+
79+
py36-virtualenv-dependencies:
80+
cmd.run:
81+
- user: docsbuild
82+
- cwd: /srv/docsbuild/scripts
83+
- name: /srv/docsbuild/venv/bin/pip install -r /srv/docsbuild/scripts/requirements.txt
84+
- require:
85+
- cmd: py36-virtualenv-pip
86+
- onchanges:
87+
- git: docsbuild-scripts
88+
6089
docsbuild-full:
6190
cron.present:
6291
- identifier: docsbuild-full

0 commit comments

Comments
 (0)
0