Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e230660

Browse files
author
jtimberman
committed
[COOK-3009] - Add packages, build flags
We need additional packages to ensure all the proper dependencies are available for python to build and distribute to install properly. Also, we need to tell newer Ubuntu (12.04+) to look for them in /usr/lib.
1 parent a175792 commit e230660

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

recipes/source.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222

2323
packages = value_for_platform_family(
2424
"rhel" => ["openssl-devel","bzip2-devel","zlib-devel","expat-devel","db4-devel","sqlite-devel","ncurses-devel","readline-devel"],
25-
"default" => ["libssl-dev","libbz2-dev","zlib1g-dev","libexpat1-dev","libdb-dev","libsqlite3-dev","libncursesw5-dev","libncurses5-dev","libreadline-dev"]
25+
"default" => ["libssl-dev","libbz2-dev","zlib1g-dev","libexpat1-dev","libdb-dev","libsqlite3-dev","libncursesw5-dev","libncurses5-dev","libreadline-dev","libsasl2-dev", "libgdbm-dev"]
2626
)
27-
27+
#
2828
packages.each do |dev_pkg|
2929
package dev_pkg
3030
end
@@ -46,5 +46,11 @@
4646
(cd Python-#{version} && ./configure #{configure_options})
4747
(cd Python-#{version} && make && make install)
4848
EOF
49+
environment({
50+
"LDFLAGS" => "-L#{node['python']['prefix_dir']} -L/usr/lib",
51+
"CPPFLAGS" => "-I#{node['python']['prefix_dir']} -I/usr/lib",
52+
"CXXFLAGS" => "-I#{node['python']['prefix_dir']} -I/usr/lib",
53+
"CFLAGS" => "-I#{node['python']['prefix_dir']} -I/usr/lib"
54+
}) if platform?("ubuntu") && node['platform_version'].to_f >= 12.04
4955
not_if { ::File.exists?(install_path) }
5056
end

0 commit comments

Comments
 (0)