|
| 1 | +packaging considerations: target environment + deployment experience |
| 2 | + - target audience: |
| 3 | + - developers |
| 4 | + - datacenter operators |
| 5 | + - non technical end users |
| 6 | + - ... |
| 7 | + - runtime environment: |
| 8 | + - servers |
| 9 | + - mobile devices |
| 10 | + - embedded systems |
| 11 | + - ... |
| 12 | + - deployment mechanism: |
| 13 | + - one software install |
| 14 | + - large deployment batches |
| 15 | + - ... |
| 16 | + |
| 17 | + |
| 18 | +packaging scenarios: |
| 19 | + - libraries & tools: |
| 20 | + - target audience = developers AND runtime environment = development setting. |
| 21 | + - approaches: |
| 22 | + - python module: |
| 23 | + - properties: |
| 24 | + - constraints: |
| 25 | + - only depends on the standard library. |
| 26 | + - required python installed on runtime environment. |
| 27 | + - use cases: a single pure python file. |
| 28 | + - examples: |
| 29 | + - bottle.py |
| 30 | + |
| 31 | + - python source distributions: |
| 32 | + - properties: |
| 33 | + - specification: https://packaging.python.org/en/latest/specifications/source-distribution-format/#source-distribution-format |
| 34 | + - constraints: |
| 35 | + - required python installed on runtime environment. |
| 36 | + - format: compressed zip(*.tar.gz) |
| 37 | + - alternative names: |
| 38 | + - sdist |
| 39 | + - remarks: this is Python's native distribution format. |
| 40 | + - use cases: |
| 41 | + - a collection of pure python files. |
| 42 | + |
| 43 | + - python binary distributions: |
| 44 | + - properties: |
| 45 | + - specification: https://packaging.python.org/en/latest/specifications/binary-distribution-format/#binary-distribution-format |
| 46 | + - constraints: |
| 47 | + - required python installed on runtime environment. |
| 48 | + - implementation: wheel |
| 49 | + - recommendation: default to publishing BOTH wheel and sdist archives. |
| 50 | + - remarks: |
| 51 | + - pip prefers wheel format for speed, even for source distributions. |
| 52 | + - use cases: |
| 53 | + - pure python files and compiled dependencies written in(C,C++,FORTRAN, Rust, etc) |
| 54 | + |
| 55 | + - python applications: |
| 56 | + - target audience: non-technical end users AND runtime environment = end user machines. |
| 57 | + - key: selection of tools is reasoned from dependence on the runtime environment. |
| 58 | + - approaches: |
| 59 | + - |
| 60 | + - |
| 61 | + - |
| 62 | + - |
| 63 | + - |
| 64 | + - |
| 65 | + - |
| 66 | + |
| 67 | +References: |
| 68 | + https://packaging.python.org/en/latest/overview/#packaging-applications |
0 commit comments