Skip to content

Fix #304 Ignore comments in requirements.txt #305

Merged
merged 1 commit into from Dec 4, 2012
+1 −1
View
2 lib/fpm/package/python.rb
@@ -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.