Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Horis ci #41

Merged
merged 17 commits into from
Oct 16, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Separate python package building from local installing
  • Loading branch information
IRyabov-HORIS committed Oct 10, 2019
commit df2c5c69a2c64f3d01008645a4707dac2ab0be02
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ org.gradle.warning.mode=all
# Python settings
# -------------------------------------------------------------------

# Python binary (for building datalore-plot python package)
python_bin=python3
# Python bin path (for building datalore-plot python package)
python_bin_path=/home/iryabov/.datalore/anaconda/bin

# Set this path for building datalore-plot python package
#python_include_path=
python_include_path=/home/iryabov/.datalore/anaconda/include/python3.7m
32 changes: 27 additions & 5 deletions python-package/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,39 @@ plugins {
id 'kotlin-multiplatform'
}

def PYTHON_BIN_PATH_PROPERTY = "python_bin_path"

if (project.properties['python_include_path'] != null) {
if (project.properties['python_bin'] != null) {
task installPythonPackage(type:Exec) {
if (project.properties[PYTHON_BIN_PATH_PROPERTY] != null) {


task updateJs(type:Exec) {
workingDir project.projectDir

commandLine "${project.properties[PYTHON_BIN_PATH_PROPERTY]}/python3", 'setup.py', 'updatejs'
}

task buildPythonPackage(type:Exec) {
workingDir project.projectDir

commandLine project.properties['python_bin'], 'setup.py', 'install'
commandLine "${project.properties[PYTHON_BIN_PATH_PROPERTY]}/python3", 'setup.py', 'bdist_wheel', "--dist-dir=${project.buildDir}/dist"
}

installPythonPackage.dependsOn(':python-extension:build')
task localInstallPythonPackage(type:Exec) {
workingDir "${project.buildDir}/dist"

commandLine "${project.properties[PYTHON_BIN_PATH_PROPERTY]}/pip3", 'install', '--no-index', '--find-links=./', 'datalore-plot'
}

updateJs.dependsOn(':js-package:build')

buildPythonPackage.dependsOn(':python-extension:build')

buildPythonPackage.dependsOn(updateJs)

build.dependsOn(buildPythonPackage)


build.dependsOn(installPythonPackage)
} else {
println("------------------------------------------------------------------------------------------------")
println("Python package build unavailable. Please set \"python_bin\" property in gradle.properties file.")
Expand Down