fpm 0.4.2 → 0.4.3
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 +4 -0
- data/CONTRIBUTORS +1 -0
- data/lib/fpm/package/pyfpm/get_metadata.py +3 -12
- data/lib/fpm/package/pyfpm/get_metadata.pyc +0 -0
- data/lib/fpm/package/python.rb +11 -2
- metadata +1 -1
data/CHANGELIST
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
0.4.3 (March 21, 2012)
|
2
|
+
- Fix bug in python packaging when invoked with a relative path to a setup.py
|
3
|
+
(Reported by Thomas Meson, https://github.com/jordansissel/fpm/pull/180)
|
4
|
+
|
1
5
|
0.4.2 (March 21, 2012)
|
2
6
|
- Set default temporary directory to /tmp
|
3
7
|
(https://github.com/jordansissel/fpm/issues/174)
|
data/CONTRIBUTORS
CHANGED
@@ -77,14 +77,11 @@ class get_metadata(Command):
|
|
77
77
|
groups = m.groups()
|
78
78
|
name, cond, version = groups[0:3]
|
79
79
|
if groups[3] is not None:
|
80
|
-
final_deps.append("%s %s %s" % (groups[0],
|
81
|
-
|
82
|
-
groups[4]))
|
80
|
+
final_deps.append("%s %s %s" % (groups[0], groups[3], groups[4]))
|
81
|
+
# end if
|
83
82
|
# end if
|
84
83
|
|
85
|
-
final_deps.append("%s %s %s" % (name,
|
86
|
-
self._replace_deprecated(cond),
|
87
|
-
version))
|
84
|
+
final_deps.append("%s %s %s" % (name, cond, version))
|
88
85
|
# end for i in dependencies
|
89
86
|
|
90
87
|
data["dependencies"] = final_deps
|
@@ -95,11 +92,5 @@ class get_metadata(Command):
|
|
95
92
|
except AttributeError, e:
|
96
93
|
# For Python 2.5 and Debian's python-json
|
97
94
|
print json.write(data)
|
98
|
-
|
99
95
|
# def run
|
100
|
-
|
101
|
-
def _replace_deprecated(self, sign):
|
102
|
-
"""Replace deprecated operators"""
|
103
|
-
return {'<': '<<', '>': '>>'}.get(sign, sign)
|
104
|
-
|
105
96
|
# class list_dependencies
|
Binary file
|
data/lib/fpm/package/python.rb
CHANGED
@@ -117,8 +117,17 @@ class FPM::Package::Python < FPM::Package
|
|
117
117
|
|
118
118
|
# Add ./pyfpm/ to the python library path
|
119
119
|
pylib = File.expand_path(File.dirname(__FILE__))
|
120
|
-
|
121
|
-
|
120
|
+
|
121
|
+
# chdir to the directory holding setup.py because some python setup.py's assume that you are
|
122
|
+
# in the same directory.
|
123
|
+
output = ::Dir.chdir(File.dirname(setup_py)) do
|
124
|
+
setup_cmd = "env PYTHONPATH=#{pylib} #{attributes[:python_bin]} " \
|
125
|
+
"setup.py --command-packages=pyfpm get_metadata"
|
126
|
+
# Capture the output, which will be JSON metadata describing this python
|
127
|
+
# package. See fpm/lib/fpm/package/pyfpm/get_metadata.py for more
|
128
|
+
# details.
|
129
|
+
`#{setup_cmd}`
|
130
|
+
end
|
122
131
|
@logger.warn("json output from setup.py", :data => output)
|
123
132
|
metadata = JSON.parse(output[/\{.*\}/msx])
|
124
133
|
|