Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Buildpack detection now recognises more Python-related file and directory names. ([#312](https://github.com/heroku/buildpacks-python/pull/312))

## [0.21.0] - 2024-12-18

### Changed
Expand Down
16 changes: 15 additions & 1 deletion src/detect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ use std::path::Path;
/// This list is deliberately larger than just the list of supported package manager files,
/// so that Python projects that are missing some of the required files still pass detection,
/// allowing us to show a helpful error message during the build phase.
const KNOWN_PYTHON_PROJECT_FILES: [&str; 14] = [
const KNOWN_PYTHON_PROJECT_FILES: [&str; 23] = [
".python-version",
"__init__.py",
"app.py",
"main.py",
"manage.py",
Expand All @@ -19,9 +20,22 @@ const KNOWN_PYTHON_PROJECT_FILES: [&str; 14] = [
"pyproject.toml",
"requirements.txt",
"runtime.txt",
"server.py",
"setup.cfg",
"setup.py",
"uv.lock",
// Commonly seen misspellings of requirements.txt. (Which occur since pip doesn't
// create/manage requirements files itself, so the filenames are manually typed.)
"requirement.txt",
"Requirements.txt",
"requirements.text",
"requirements.txt.txt",
"requirments.txt",
// Whilst virtual environments shouldn't be committed to Git (and so shouldn't
// normally be present during the build), they are often present for beginner
// Python apps that are missing all of the other Python related files above.
".venv/",
"venv/",
];

/// Returns whether the specified project directory is that of a Python project, and so
Expand Down