({
projectName,
pyprojectPath,
dependencies,
pythonVersion,
}: {
projectName: string;
pyprojectPath: string;
dependencies: string[];
pythonVersion?: string;
})
| 205 | } |
| 206 | |
| 207 | export async function createPyprojectToml({ |
| 208 | projectName, |
| 209 | pyprojectPath, |
| 210 | dependencies, |
| 211 | pythonVersion, |
| 212 | }: { |
| 213 | projectName: string; |
| 214 | pyprojectPath: string; |
| 215 | dependencies: string[]; |
| 216 | pythonVersion?: string; |
| 217 | }) { |
| 218 | const version = pythonVersion ?? DEFAULT_PYTHON_VERSION_STRING; |
| 219 | const requiresPython = `~=${version}.0`; |
| 220 | |
| 221 | const manifest = createMinimalManifest({ |
| 222 | name: projectName, |
| 223 | requiresPython, |
| 224 | dependencies, |
| 225 | }); |
| 226 | |
| 227 | const content = stringifyManifest(manifest); |
| 228 | await fs.promises.writeFile(pyprojectPath, content); |
| 229 | } |
| 230 | |
| 231 | export interface UvProjectInfo { |
| 232 | projectDir: string; |
no test coverage detected