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
Add python package building with gradle
  • Loading branch information
IRyabov-HORIS committed Oct 10, 2019
commit b81dd5c7e696f7bf24913b947a341b78f64ac9ad
6 changes: 0 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ allprojects {
// println "--- project ---: $project.name $project.rootDir"
}

task printProps {
doLast {
println System.env.PYTHON_INCLUDE
}
}

def publishedProjects = [
'base-portable',
'base',
Expand Down
8 changes: 8 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,12 @@ rootProject.name=datalore-plot
org.gradle.warning.mode=all


# -------------------------------------------------------------------
# Python settings
# -------------------------------------------------------------------

# Python binary (for building datalore-plot python package)
python_bin=python3

# Set this path for building datalore-plot python package
#python_include_path=
6 changes: 4 additions & 2 deletions python-extension/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

kotlin {
if (project.properties['python_include_path'] != null && project.properties['python_include_path'] != "") {
if (project.properties['python_include_path'] != null) {
macosX64() {
binaries {
staticLib {
Expand Down Expand Up @@ -33,7 +33,9 @@ kotlin {
}
}
} else {
println("AAAAAAAAAAAAAAAAAAAAAAAAAAA!!!")
println("------------------------------------------------------------------------------------------------")
println("Python package build unavailable. Please set \"python_include_path\" property in gradle.properties file.")
println("------------------------------------------------------------------------------------------------")
}


Expand Down
26 changes: 26 additions & 0 deletions python-package/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
plugins {
id 'kotlin-multiplatform'
}

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

commandLine project.properties['python_bin'], 'setup.py', 'install'
}

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

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

} else {
println("------------------------------------------------------------------------------------------------")
println("Python package build unavailable. Please set \"python_include_path\" property in gradle.properties file.")
println("------------------------------------------------------------------------------------------------")
}
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ include 'base-portable',
'visualization-demo-svg-mapper',
'visualization-demo-plot',
'python-extension',
'python-package',
'js-package',
'jvm-jfx-package',
'test-common'
Expand Down