<commit_before>#
# Copyright:: Copyright (c) 2013 Opscode, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

name "python"
version "2.7.6"

dependency "readline"
dependency "ncurses"
dependency "zlib"
dependency "openssl"
dependency "bzip2"
dependency "sqlite3"
dependency "gdbm"

source :url => "http://python.org/ftp/python/#{version}/Python-#{version}.tgz",
       :md5 => '1d8728eb0dfcac72a0fd99c17ec7f386'

relative_path "Python-#{version}"

LIB_PATH = %W(#{install_dir}/embedded/lib #{install_dir}/embedded/lib64 #{install_dir}/embedded/libexec)

env = {
  "CFLAGS" => "-I#{install_dir}/embedded/include -O3 -g -pipe",
  "LDFLAGS" => "-Wl,-rpath,#{LIB_PATH.join(',-rpath,')} -L#{LIB_PATH.join(' -L')} -I#{install_dir}/embedded/include"
}

build do
  command ["./configure",
           "--prefix=#{install_dir}/embedded",
           "--enable-unicode=ucs4",
           "--enable-shared",
           # NOTICE: we will encounter dependencies check failure if the building
           # environment happens to have these libraries installed. For solving
           # this issue, I disable these module here. We can add these back
           # once support for those library is ready. Reference to issue:
           # https://github.com/opscode/omnibus-software/pull/70
           "--without-sqlite3",
           "--without-dbm",
           "--without-gdbm",
           ].join(" "), :env => env
  command "make", :env => env<commit_msg>Try to solve python sqlite3 dependency issue<commit_after>#
# Copyright:: Copyright (c) 2013 Opscode, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

name "python"
version "2.7.6"

dependency "readline"
dependency "ncurses"
dependency "zlib"
dependency "openssl"
dependency "bzip2"
dependency "sqlite3"
dependency "gdbm"

source :url => "http://python.org/ftp/python/#{version}/Python-#{version}.tgz",
       :md5 => '1d8728eb0dfcac72a0fd99c17ec7f386'

relative_path "Python-#{version}"

LIB_PATH = %W(#{install_dir}/embedded/lib #{install_dir}/embedded/lib64 #{install_dir}/embedded/libexec)

env = {
  "CFLAGS" => "-I#{install_dir}/embedded/include -O3 -g -pipe",
  "LDFLAGS" => "-Wl,-rpath,#{LIB_PATH.join(',-rpath,')} -L#{LIB_PATH.join(' -L')} -I#{install_dir}/embedded/include"
}

build do
  command ["./configure",
           "--prefix=#{install_dir}/embedded",
           "--enable-unicode=ucs4",
           "--enable-shared",
           # NOTICE: we will encounter dependencies check failure if the building
           # environment happens to have these libraries installed. For solving
           # this issue, I disable these module here. We can add these back
           # once support for those library is ready. Reference to issue:
           # https://github.com/opscode/omnibus-software/pull/70
           "--without-dbm",
           "--without-gdbm",
           ].join(" "), :env => env
  command "make", :env => env
{'fraction_non_alphanumeric': 0.13185147764587016, 'fraction_numerical': 0.02020712301086133, 'mean_word_length': 3.370860927152318, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4593302', 'n_tokens_mistral': 1242, 'n_tokens_neox': 1176, 'n_words': 382}