Permalink
Browse files

- Add --python-obey-requirements-txt (#384)

  • Loading branch information...
1 parent f541cf9 commit e252d9160c2c74877962f1a307ed60f29956dc88 @jordansissel committed Mar 22, 2013
Showing with 10 additions and 1 deletion.
  1. +6 −0 CHANGELIST
  2. +4 −1 lib/fpm/package/python.rb
View
@@ -1,3 +1,9 @@
+0.4.:) ???
+ - python: new flag --python-obey-requirements-txt which makes a
+ requirements.txt file from the python package used for the package
+ dependencies instead of the usual setup.py dependencies. The default
+ behavior without this flag is to respect setup.py. (#384)
+
0.4.31 (March 21, 2013)
- rpm: new flag --rpm-use-file-permissions which try to create an rpm
that has file ownership/modes that exactly mirror how they are on
@@ -60,6 +60,9 @@ class FPM::Package::Python < FPM::Package
"DATA_PATH"
option "--dependencies", :flag, "Include requirements defined in setup.py" \
" as dependencies.", :default => true
+ option "--obey-requirements-txt", :flag, "Use a requirements.txt file" \
+ "in the top-level directory of the python package for dependency " \
+ "detection.", :default => false
private
@@ -180,7 +183,7 @@ def load_package_info(setup_py)
self.name = self.name.downcase if attributes[:python_downcase_name?]
requirements_txt = File.join(setup_dir, "requirements.txt")
- if File.exists?(requirements_txt)
+ if attributes[:python_obey_requirements_txt?] && File.exists?(requirements_txt)
@logger.info("Found requirements.txt, using it instead of setup.py " \
"for dependency information", :path => requirements_txt)
@logger.debug("Clearing dependency list (from setup.py) in prep for " \

0 comments on commit e252d91

Please sign in to comment.