You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -45,23 +45,155 @@ Then add it as a remote and push (you need to set up an SSH key first).
45
45
~/path/to/project> git push -u origin main
46
46
```
47
47
48
-
### Build and Installation
48
+
### Build and Dependency Management
49
49
50
50
Most projects these days are written in high-level languages that do not require compilation. This simplifies things, but it can still be complicated to package your software in a way that makes it easy for another person to install in on their computer from scratch.
51
51
52
52
#### C/C++
53
53
54
-
For codes written in C/C++, it is almost always necessary to provide either a hand-generated Makefile or a CMake setup to make building easy. Making C/C++ codes portable is difficult, so ensuring the code builds on Linux is probably the lowest common denominator.
54
+
If you have a multi-file project coded natively in C/C++, using a tool to help other build code is a necessity. Below is a quick summary, but more detailed information is [here](CppBuild.md)
55
+
56
+
* The Big Picture
57
+
-**No single standard**: C/C++ has the most fragmented build ecosystem of any major language
58
+
-**CMake dominates**: ~60-70% of modern C++ projects use CMake despite its complexity
59
+
-**Context matters**: The "best" build system depends heavily on project size, platform needs, and team experience
-**Evolution over time**: The ecosystem has gradually moved from `setup.py` → `pyproject.toml`
102
+
103
+
* Modern Best Practices
104
+
-**pyproject.toml**: Standardized format (PEP 518, 621) for project configuration and dependencies
105
+
-**Lock files**: Poetry, Pipenv, or pip-tools provide deterministic, reproducible builds
106
+
-**Virtual environments**: `venv` or `virtualenv` for project isolation (separate from dependency specification)
107
+
108
+
* Tool Landscape
109
+
-**pip + requirements.txt**: Simple, ubiquitous, but lacks advanced features
110
+
-**Poetry**: All-in-one solution with dependency resolution, virtual env management, and publishing
111
+
-**Pipenv**: Combines Pipfile + lock file with virtual environment management
112
+
-**pip-tools**: Minimalist approach to generate lock files from requirements.in
113
+
114
+
* Version Specification
115
+
-**Rich syntax**: `==`, `>=`, `~=`, `!=` with multiple constraints
116
+
-**Dependency resolution**: Third-party tools handle complex version conflicts
117
+
-**Optional dependencies**: `extras_require` or `optional-dependencies` for feature-specific packages
118
+
119
+
* Key Differences from Other Languages
120
+
-**Not built into the language**: Requires external package manager (pip) and tools
121
+
-**Separation of concerns**: Virtual environments (isolation) vs. dependency files (specification)
122
+
-**Massive ecosystem**: PyPI hosts 500,000+ packages with minimal curation
123
+
-**Ongoing standardization**: Community still converging on best practicesPython offers several methods for specifying project dependencies, each suited for different use cases:
59
124
60
125
#### Julia
61
126
127
+
Highlights of Python's dependency mechanism are here. More details available [here](JuliaDeps.md).
128
+
129
+
* Built-in and Unified
130
+
-**Native package manager (Pkg)**: Fully integrated into Julia, no external tools needed
131
+
-**Single standard**: No fragmentation—everyone uses the same system
132
+
-**Batteries included**: Dependency resolution, environments, and versioning work out of the box
133
+
134
+
* Two-File System
135
+
-**Project.toml**: Human-readable file specifying direct dependencies and compatibility
136
+
-**Manifest.toml**: Auto-generated lock file with complete dependency graph and exact versions
137
+
-**Both committed to version control**: Ensures reproducibility across machines
0 commit comments