Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix #304 Ignore comments in requirements.txt #305

Merged
merged 1 commit into from

2 participants

Pranay Kanwar Jordan Sissel
Pranay Kanwar
Collaborator
  • Fix #304 Ignore lines beginning with # or space and #.
Jordan Sissel
Owner

Gonna add flag support to this too.

Jordan Sissel jordansissel merged commit b9b917e into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 4, 2012
  1. Pranay Kanwar
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/fpm/package/python.rb
2  lib/fpm/package/python.rb
View
@@ -178,7 +178,7 @@ def load_package_info(setup_py)
# Best I can tell, requirements.txt are a superset of what
# is already supported as 'dependencies' in setup.py
# So we'll parse them the same way below.
- metadata["dependencies"] = File.read(requirements_txt).split("\n")
+ metadata["dependencies"] = File.read(requirements_txt).split("\n").map(&:strip).reject {|l| l =~ /^\s*#/}
end
self.dependencies += metadata["dependencies"].collect do |dep|
Something went wrong with that request. Please try again.