summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThomas O'Donnell <andytom@users.noreply.github.com>2019-08-22 00:54:22 +0200
committerKevin Song <chipbuster@users.noreply.github.com>2019-08-21 15:54:22 -0700
commit1478f8c2e9841e3848703bf0d958b6b063e387f0 (patch)
tree752dc3016a86eaf0b23a2a84495377bee207571e /src
parent360ea988e502ccbd24e383e58852e97a513f7c21 (diff)
Add support for detecting Python from Pipenv files (#221)
Added the ability to enable the Python module based on the existence of the a `Pipfile`.
Diffstat (limited to 'src')
-rw-r--r--src/modules/python.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/modules/python.rs b/src/modules/python.rs
index b651e1d51..d465e6da5 100644
--- a/src/modules/python.rs
+++ b/src/modules/python.rs
@@ -15,10 +15,16 @@ use super::{Context, Module};
/// - Current directory contains a `requirements.txt` file
/// - Current directory contains a `pyproject.toml` file
/// - Current directory contains a file with the `.py` extension
+/// - Current directory contains a `Pipfile` file
pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
let is_py_project = context
.new_scan_dir()
- .set_files(&["requirements.txt", ".python-version", "pyproject.toml"])
+ .set_files(&[
+ "requirements.txt",
+ ".python-version",
+ "pyproject.toml",
+ "Pipfile",
+ ])
.set_extensions(&["py"])
.scan();