From 73df07d4420b894268884a9f11fc4913c8d2f924 Mon Sep 17 00:00:00 2001 From: mo khan Date: Sat, 20 Jun 2020 16:17:33 -0600 Subject: Build pythons --- .gitlab-ci.yml | 12 ++++++++++++ config/projects/pythons.rb | 22 ++++++++++++++++++++++ config/software/asdf-python-plugin.rb | 13 +++++++++++++ config/software/asdf-python.rb | 29 +++++++++++++++++++++++++++++ 4 files changed, 76 insertions(+) create mode 100644 config/projects/pythons.rb create mode 100644 config/software/asdf-python-plugin.rb create mode 100644 config/software/asdf-python.rb diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 23644d1..78bebca 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -106,3 +106,15 @@ mono-6-8-0-123: extends: .mono variables: MONO_VERSION: '6.8.0.123' + +.python: + stage: release + script: + - bundle exec omnibus build pythons + variables: + PYTHON_VERSION: '3.8.3' + +python-3-8-3: + .extend: .python + variables: + PYTHON_VERSION: '3.8.3' diff --git a/config/projects/pythons.rb b/config/projects/pythons.rb new file mode 100644 index 0000000..f420aa2 --- /dev/null +++ b/config/projects/pythons.rb @@ -0,0 +1,22 @@ +name "pythons" +maintainer "mkhan@gitlab.com" +homepage "https://gitlab.com/xlgmokha/omnibus-asdf" + +# Defaults to C:/asdf on Windows +# and /opt/asdf on all other platforms +install_dir "/opt/asdf" + +build_version ENV['PYTHON_VERSION'] +build_iteration 1 + +# Creates required build directories +dependency "preparation" +dependency "asdf-python-plugin" +override 'asdf-python', version: ENV['PYTHON_VERSION'] +dependency "asdf-python" + +# asdf dependencies/components +# dependency "somedep" + +#exclude "**/.git" +#exclude "**/bundler/git" diff --git a/config/software/asdf-python-plugin.rb b/config/software/asdf-python-plugin.rb new file mode 100644 index 0000000..5509752 --- /dev/null +++ b/config/software/asdf-python-plugin.rb @@ -0,0 +1,13 @@ +name "asdf-python-plugin" +description "Python plugin for asdf version manager" +source git: "https://github.com/danhper/asdf-python.git" +relative_path "python" + +license_file "#{project_dir}/LICENSE" +#skip_transitive_dependency_licensing true + +build do + block do + sync project_dir, "#{install_dir}/plugins/python" + end +end diff --git a/config/software/asdf-python.rb b/config/software/asdf-python.rb new file mode 100644 index 0000000..b7b6763 --- /dev/null +++ b/config/software/asdf-python.rb @@ -0,0 +1,29 @@ +name "asdf-python" + +license "Python-2.0" +license_file "LICENSE" +skip_transitive_dependency_licensing true + +default_version "3.8.3" + +dependency "ncurses" +dependency "zlib" +dependency "openssl" + +version("3.8.3") { source sha256: "6af6d4d2e010f9655518d0fc6738c7ff7069f10a4d2fbd55509e467f092a8b90" } + +source url: "https://python.org/ftp/python/#{version}/Python-#{version}.tgz" + +relative_path "Python-#{version}" + +build do + env = with_standard_compiler_flags(with_embedded_path) + configure_command = [ + "--prefix=#{install_dir}/installs/ruby/#{version}", + "--enable-shared", + "--with-dbmliborder=", + ] + configure(*configure_command, env: env) + make env: env + make "install", env: env +end -- cgit v1.2.3