File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -78,8 +78,12 @@ class PackageCommand extends Command {
7878
7979 // discover dependencies
8080 List <String >? dependencies;
81+ final requirementsFile =
82+ File (path.join (tempDir.path, 'requirements.txt' ));
8183 final pyprojectFile = File (path.join (tempDir.path, 'pyproject.toml' ));
82- if (pyprojectFile.existsSync ()) {
84+ if (requirementsFile.existsSync ()) {
85+ dependencies = await requirementsFile.readAsLines ();
86+ } else if (pyprojectFile.existsSync ()) {
8387 final content = await pyprojectFile.readAsString ();
8488 final document = TomlDocument .parse (content).toMap ();
8589 var depSection = findTomlDependencies (document);
@@ -93,12 +97,6 @@ class PackageCommand extends Command {
9397 // depSection.keys.map((key) => '$key=${depSection[key]}'));
9498 }
9599 }
96- } else {
97- final requirementsFile =
98- File (path.join (tempDir.path, 'requirements.txt' ));
99- if (requirementsFile.existsSync ()) {
100- dependencies = await requirementsFile.readAsLines ();
101- }
102100 }
103101
104102 // install dependencies
You can’t perform that action at this time.
0 commit comments