]> git.phdru.name Git - ansible.git/commitdiff
Feat(python): Install dev packages to compile Python from sources
authorOleg Broytman <phd@phdru.name>
Sun, 1 Sep 2019 18:44:41 +0000 (21:44 +0300)
committerOleg Broytman <phd@phdru.name>
Sun, 1 Sep 2019 23:30:41 +0000 (02:30 +0300)
Install development packages: headers and libraries.
Split roles `dev-packages` into `python-dev-packages`.

14 files changed:
playbooks/debian/roles/dev-packages/tasks/main.yml
playbooks/debian/roles/init-system/tasks/main.yml
playbooks/debian/roles/python-dev-packages/README.txt [new file with mode: 0644]
playbooks/debian/roles/python-dev-packages/meta/main.yml [new file with mode: 0644]
playbooks/debian/roles/python-dev-packages/tasks/main.yml [new file with mode: 0644]
playbooks/debian/roles/python-packages/README.txt [new file with mode: 0644]
playbooks/debian/roles/python-packages/tasks/main.yml [moved from playbooks/debian/roles/init-system/tasks/python.yml with 90% similarity]
playbooks/redhat/roles/dev-packages/tasks/main.yml
playbooks/redhat/roles/init-system/tasks/main.yml
playbooks/redhat/roles/python-dev-packages/README.txt [new file with mode: 0644]
playbooks/redhat/roles/python-dev-packages/meta/main.yml [new file with mode: 0644]
playbooks/redhat/roles/python-dev-packages/tasks/main.yml [new file with mode: 0644]
playbooks/redhat/roles/python-packages/README.txt [new file with mode: 0644]
playbooks/redhat/roles/python-packages/tasks/main.yml [moved from playbooks/redhat/roles/init-system/tasks/python.yml with 90% similarity]

index ed96abf7b30f532505484bb11875912b96fd7488..e523f95fac15f3f1237219b9b545c1b7f50c5eb8 100644 (file)
@@ -5,7 +5,12 @@
     autoremove: yes
     cache_valid_time: 3600
     install_recommends: no
-    name: ['gcc', 'g++', 'git', 'make',
+    name: ['g++', 'gcc', 'git',
+           'libexpat1', 'libffi6',
+           'libgdbm{% if debian_distr == "stretch" %}3{% elif debian_distr == "buster" %}6{% endif %}',
+           'libgmp10',
+           'liblzma5', 'libmpdec2', 'libreadline5', 'libreadline7',
+           'make', 'openssl', 'patch', 'sqlite3', 'zlib1g',
           ]
     state: latest
     update_cache: yes
index ee3374351623a3deec321bdb9f3134ed68ef65f4..83104c73bd0a06ca8c7d748ff712484b579fa1be 100644 (file)
@@ -3,6 +3,3 @@
 
 - name: locales
   import_tasks: locales.yml
-
-- name: Python
-  import_tasks: python.yml
diff --git a/playbooks/debian/roles/python-dev-packages/README.txt b/playbooks/debian/roles/python-dev-packages/README.txt
new file mode 100644 (file)
index 0000000..fefd813
--- /dev/null
@@ -0,0 +1 @@
+Install Python development packages.
diff --git a/playbooks/debian/roles/python-dev-packages/meta/main.yml b/playbooks/debian/roles/python-dev-packages/meta/main.yml
new file mode 100644 (file)
index 0000000..4f10846
--- /dev/null
@@ -0,0 +1 @@
+dependencies: ['dev-packages', 'python-packages']
diff --git a/playbooks/debian/roles/python-dev-packages/tasks/main.yml b/playbooks/debian/roles/python-dev-packages/tasks/main.yml
new file mode 100644 (file)
index 0000000..0b3f99b
--- /dev/null
@@ -0,0 +1,29 @@
+- name: Install development packages For Debbian 9 stretch
+  become: true
+  apt:
+    autoclean: yes
+    autoremove: yes
+    cache_valid_time: 3600
+    install_recommends: no
+    name: ['libssl1.0-dev', 'libssl1.0.2',
+          ]
+    state: latest
+    update_cache: yes
+  when: debian_distr == "stretch"
+
+- name: Install development packages
+  become: true
+  apt:
+    autoclean: yes
+    autoremove: yes
+    cache_valid_time: 3600
+    install_recommends: no
+    name: ['libbz2-dev', 'libexpat1-dev', 'libffi-dev',
+           'libgdbm-dev', 'libgmp-dev', 'libmpdec-dev', 'liblzma-dev', 
+           'libncurses5', 'libncurses5-dev', 'libncursesw5', 'libncursesw5-dev',
+           'libpython-dev', 'libpython3-dev', 'libreadline-dev',
+           'libsqlite3-dev', 'libssl-dev', 'libssl1.1',
+           'python-dev', 'python3-dev', 'zlib1g-dev',
+          ]
+    state: latest
+    update_cache: yes
diff --git a/playbooks/debian/roles/python-packages/README.txt b/playbooks/debian/roles/python-packages/README.txt
new file mode 100644 (file)
index 0000000..f766e45
--- /dev/null
@@ -0,0 +1 @@
+Install Python packages.
similarity index 90%
rename from playbooks/debian/roles/init-system/tasks/python.yml
rename to playbooks/debian/roles/python-packages/tasks/main.yml
index ead9aa5ee235fe4bd64b104eaf1c254296939152..2509ea1ef6fc1cb06a23813c6af311d4d0a06581 100644 (file)
@@ -7,6 +7,7 @@
     install_recommends: no
     name: ['python', 'python2.7', 'python3', 'python-pip', 'python3-pip',
            'python-setuptools', 'python3-setuptools',
+           'python-gdbm', 'python-openssl', 'python3-openssl',
           ]
     state: latest
     update_cache: yes
index ed57bf40c2ab68d1880caba54e59184f79b07a78..22fd224fee607f0b7668e09533c02cebe5cfbb03 100644 (file)
@@ -1,7 +1,10 @@
 - name: Install development packages
   become: true
   dnf:
-    name: ['gcc', 'gcc-c++', 'git', 'make',
+    name: ['expat', 'gcc', 'gcc-c++',
+           'gdbm', 'gdbm-libs', 'git', 'gmp',
+           'libffi', 'lzma-sdk', 'make', 'mpdecimal',
+           'openssl', 'patch', 'readline', 'sqlite', 'zlib',
           ]
     state: latest
     update_cache: yes
index fbef08b640d9ec5627239d256fa246344fd44e20..edfcd824cd724ce8f8c9c66bb2ab2de4caa7fb45 100644 (file)
@@ -1,5 +1,2 @@
 - name: packages
   import_tasks: dnf.yml
-
-- name: Python
-  import_tasks: python.yml
diff --git a/playbooks/redhat/roles/python-dev-packages/README.txt b/playbooks/redhat/roles/python-dev-packages/README.txt
new file mode 100644 (file)
index 0000000..13d6c5f
--- /dev/null
@@ -0,0 +1 @@
+Install development packages.
diff --git a/playbooks/redhat/roles/python-dev-packages/meta/main.yml b/playbooks/redhat/roles/python-dev-packages/meta/main.yml
new file mode 100644 (file)
index 0000000..4f10846
--- /dev/null
@@ -0,0 +1 @@
+dependencies: ['dev-packages', 'python-packages']
diff --git a/playbooks/redhat/roles/python-dev-packages/tasks/main.yml b/playbooks/redhat/roles/python-dev-packages/tasks/main.yml
new file mode 100644 (file)
index 0000000..f5e04e9
--- /dev/null
@@ -0,0 +1,11 @@
+- name: Install development packages
+  become: true
+  dnf:
+    name: ['bzip2-devel', 'expat-devel', 'gdbm-devel', 'gmp-devel',
+           'libffi-devel', 'lzma-sdk-devel', 'mpdecimal-devel',
+           'ncurses-devel', 'ncurses-libs', 'openssl-devel', 'openssl-libs',
+           'python2-devel', 'python3-devel', 'readline-devel', 'sqlite-devel',
+           'xz-devel', 'xz-libs', 'zlib-devel',
+          ]
+    state: latest
+    update_cache: yes
diff --git a/playbooks/redhat/roles/python-packages/README.txt b/playbooks/redhat/roles/python-packages/README.txt
new file mode 100644 (file)
index 0000000..f766e45
--- /dev/null
@@ -0,0 +1 @@
+Install Python packages.
similarity index 90%
rename from playbooks/redhat/roles/init-system/tasks/python.yml
rename to playbooks/redhat/roles/python-packages/tasks/main.yml
index 15dc9949fbacd9b865ae011d694b9d02bb2dec98..ef814906a612261b661373eab07675e8e0f5f5bb 100644 (file)
@@ -3,6 +3,7 @@
   dnf:
     name: ['python2', 'python3', 'python2-pip', 'python3-pip',
            'python2-setuptools', 'python3-setuptools',
+           'python2-pyOpenSSL', 'python3-pyOpenSSL',
           ]
     state: latest
     update_cache: yes