fpm 0.4.19 → 0.4.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELIST CHANGED
@@ -1,3 +1,7 @@
1
+ 0.4.20 (October 5, 2012)
2
+ - python: only specify --install-{scripts,lib,data} flags to setup.py if
3
+ they were given on the command line to fpm. Fixes #273.
4
+
1
5
  0.4.19 (September 26, 2012)
2
6
  - Escape '%' characters in file names (#266, #222. Patch by John Wittkoski)
3
7
 
@@ -260,8 +260,8 @@ class FPM::Package
260
260
 
261
261
  # Clean up any temporary storage used by this class.
262
262
  def cleanup
263
- cleanup_staging
264
- cleanup_build
263
+ cleanup_staging unless @logger.level == :debug
264
+ cleanup_build unless @logger.level == :debug
265
265
  end # def cleanup
266
266
 
267
267
  def cleanup_staging
@@ -127,6 +127,10 @@ class FPM::Package::Deb < FPM::Package
127
127
 
128
128
  return @name
129
129
  end # def name
130
+
131
+ def prefix
132
+ return (attributes[:prefix] or "/")
133
+ end # def prefix
130
134
 
131
135
  def input(input_path)
132
136
  extract_info(input_path)
@@ -464,5 +468,5 @@ class FPM::Package::Deb < FPM::Package
464
468
  return super(format)
465
469
  end # def to_s
466
470
 
467
- public(:input, :output, :architecture, :name, :converted_from, :to_s)
471
+ public(:input, :output, :architecture, :name, :prefix, :converted_from, :to_s)
468
472
  end # class FPM::Target::Deb
@@ -136,7 +136,7 @@ class FPM::Package::Gem < FPM::Package
136
136
 
137
137
  # By default, we'll usually automatically provide this, but in the case that we are
138
138
  # composing multiple packages, it's best to explicitly include it in the provides list.
139
- self.provides << "#{self.name}"
139
+ self.provides << "#{self.name} = #{self.version}"
140
140
 
141
141
  spec.runtime_dependencies.map do |dep|
142
142
  # rubygems 1.3.5 doesn't have 'Gem::Dependency#requirement'
@@ -181,28 +181,20 @@ class FPM::Package::Python < FPM::Package
181
181
  prefix = "/"
182
182
  prefix = attributes[:prefix] unless attributes[:prefix].nil?
183
183
 
184
- # Set the default install library location (like
185
- # /usr/lib/python2.7/site-packages) if it is not given
186
- if attributes[:python_install_lib].nil?
187
- # Ask python where libraries are installed to.
188
- # This line is unusually long because I don't have a shorter way to express it.
189
- attributes[:python_install_lib] = %x{
190
- #{attributes[:python_bin]} -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())'
191
- }.chomp
192
- @logger.info("Setting default :python_install_lib attribute",
193
- :value => attributes[:python_install_lib])
194
- end
195
- if attributes[:python_install_data].nil?
196
- attributes[:python_install_data] = attributes[:python_install_lib]
197
- end
198
184
  # Some setup.py's assume $PWD == current directory of setup.py, so let's
199
185
  # chdir first.
200
186
  ::Dir.chdir(project_dir) do
201
- safesystem(attributes[:python_bin], "setup.py", "install",
202
- "--root", staging_path,
203
- "--install-lib", File.join(prefix, attributes[:python_install_lib]),
204
- "--install-data", File.join(prefix, attributes[:python_install_data]),
205
- "--install-scripts", File.join(prefix, attributes[:python_install_bin]))
187
+ flags = [ "--root", staging_path ]
188
+ if !attributes[:python_install_lib].nil?
189
+ flags += [ "--install-lib", File.join(prefix, attributes[:python_install_lib]) ]
190
+ end
191
+ if !attributes[:python_install_data].nil?
192
+ flags += [ "--install-data", File.join(prefix, attributes[:python_install_data]) ]
193
+ end
194
+ if !attributes[:python_install_bin].nil?
195
+ flags += [ "--install-scripts", File.join(prefix, attributes[:python_install_bin]) ]
196
+ end
197
+ safesystem(attributes[:python_bin], "setup.py", "install", *flags)
206
198
  end
207
199
  end # def install_to_staging
208
200
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fpm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.19
4
+ version: 0.4.20
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-26 00:00:00.000000000 Z
12
+ date: 2012-10-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
@@ -149,33 +149,33 @@ executables:
149
149
  extensions: []
150
150
  extra_rdoc_files: []
151
151
  files:
152
- - lib/fpm/errors.rb
153
- - lib/fpm/util.rb
154
152
  - lib/fpm/command.rb
155
- - lib/fpm/package/pyfpm/get_metadata.py
153
+ - lib/fpm/namespace.rb
154
+ - lib/fpm/package.rb
155
+ - lib/fpm/errors.rb
156
+ - lib/fpm/package/gem.rb
157
+ - lib/fpm/package/dir.rb
156
158
  - lib/fpm/package/pyfpm/__init__.pyc
157
159
  - lib/fpm/package/pyfpm/get_metadata.pyc
160
+ - lib/fpm/package/pyfpm/get_metadata.py
158
161
  - lib/fpm/package/pyfpm/__init__.py
159
- - lib/fpm/package/python.rb
160
- - lib/fpm/package/rpm.rb
161
162
  - lib/fpm/package/npm.rb
162
- - lib/fpm/package/deb.rb
163
- - lib/fpm/package/gem.rb
164
- - lib/fpm/package/tar.rb
165
163
  - lib/fpm/package/pear.rb
166
- - lib/fpm/package/dir.rb
164
+ - lib/fpm/package/deb.rb
165
+ - lib/fpm/package/python.rb
166
+ - lib/fpm/package/rpm.rb
167
167
  - lib/fpm/package/puppet.rb
168
+ - lib/fpm/package/tar.rb
168
169
  - lib/fpm/package/solaris.rb
169
- - lib/fpm/package.rb
170
- - lib/fpm/namespace.rb
170
+ - lib/fpm/util.rb
171
171
  - lib/fpm.rb
172
172
  - bin/fpm-npm
173
173
  - bin/fpm
174
- - templates/puppet/package/remove.pp.erb
175
- - templates/puppet/package.pp.erb
176
174
  - templates/deb.erb
177
- - templates/solaris.erb
178
175
  - templates/rpm.erb
176
+ - templates/solaris.erb
177
+ - templates/puppet/package/remove.pp.erb
178
+ - templates/puppet/package.pp.erb
179
179
  - LICENSE
180
180
  - CONTRIBUTORS
181
181
  - CHANGELIST