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
Copy file name to clipboardExpand all lines: CHANGES.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,12 @@
5
5
- Enhancement: Use tables in the generated sphinx code for topic/domains.
6
6
[jensens, 02-11-2025]
7
7
8
+
- Feature: Add monorepo support with `PROJECT_PATH_PYTHON` setting.
9
+
Python projects can now be located in subdirectories while keeping the Makefile at the repository root. Includes auto-detection of `pyproject.toml` in subdirectories on init, `--project-path-python` CLI flag and preseed file support.
10
+
Useful for monorepos with multiple applications (e.g., frontend + backend).
11
+
See the "Monorepo Support" section in getting-started.md for details.
12
+
[jensens, 02-11-2025]
13
+
8
14
## 2.0.0 (2025-10-24)
9
15
10
16
-**Breaking**: Drop Python 3.9 support. Minimum Python version is now 3.10.
Copy file name to clipboardExpand all lines: docs/source/getting-started.md
+93Lines changed: 93 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,6 +91,99 @@ Both methods create:
91
91
92
92
To update an existing Makefile without interactive prompts, run `mxmake update`.
93
93
94
+
## Monorepo Support
95
+
96
+
mxmake supports monorepo setups where your Python project lives in a subdirectory while the Makefile stays at the repository root. This is useful when you have multiple applications (e.g., frontend + backend) in one repository.
97
+
98
+
### Example Directory Structure
99
+
100
+
```
101
+
myrepo/ # Repository root
102
+
├── Makefile # Generated by mxmake (at root)
103
+
├── mx.ini # mxdev config (at root)
104
+
├── .venv/ # Virtual environment (at root)
105
+
├── .mxmake/ # Generated files (at root)
106
+
├── sources/ # mxdev packages (at root)
107
+
├── frontend/ # Frontend application
108
+
│ └── package.json
109
+
└── backend/ # Python project in subdirectory
110
+
├── pyproject.toml
111
+
├── src/
112
+
│ └── myapp/
113
+
└── tests/
114
+
```
115
+
116
+
### Setup Methods
117
+
118
+
#### Method 1: Auto-detection (Recommended)
119
+
120
+
If `pyproject.toml` is in a subdirectory, mxmake will detect it automatically:
121
+
122
+
```shell
123
+
cd myrepo
124
+
uvx mxmake init
125
+
# mxmake will prompt: "Use 'backend' as PROJECT_PATH_PYTHON? (Y/n)"
126
+
```
127
+
128
+
#### Method 2: CLI Flag
129
+
130
+
Specify the project path explicitly:
131
+
132
+
```shell
133
+
uvx mxmake init --project-path-python backend
134
+
```
135
+
136
+
#### Method 3: Preseed File
137
+
138
+
Include in your preseed YAML:
139
+
140
+
```yaml
141
+
topics:
142
+
core:
143
+
base:
144
+
PROJECT_PATH_PYTHON: backend
145
+
```
146
+
147
+
Then run:
148
+
149
+
```shell
150
+
uvx mxmake init --preseeds preseed.yaml
151
+
```
152
+
153
+
### What Happens
154
+
155
+
When `PROJECT_PATH_PYTHON` is set:
156
+
157
+
1.**Makefile**: References Python package files with the correct path
158
+
- Looks for `backend/pyproject.toml` instead of `./pyproject.toml`
159
+
160
+
2.**mx.ini**: Configure test/coverage paths relative to repository root
161
+
- Set `mxmake-test-path = backend/tests` and `mxmake-source-path = backend/src`
0 commit comments