Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion pivy-importer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ task importRequiredDependencies(type: JavaExec) { task ->
'sphinx_rtd_theme:0.1.0=sphinx_rtd_theme:0.1.1', // candidate for removal
].join(",")
def packagesToInclude = [
'flake8:3.6.0',
'flake8:3.7.9',
'Flask:0.12.2',
'pbr:5.1.1',
'pex:1.5.2',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ class FailureReasonProviderIntegrationTest extends Specification {
| plugins {
| id 'com.linkedin.python-pex'
| }
!
| python{
| pipConfig = [:]
| for (String command : ['install', 'wheel', 'download']) {
| pipConfig.put(command, [:])
| pipConfig.get(command).put('no-build-isolation', 'false')
| }
| }
|
| configurations {
| testProj
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,14 @@ class ParallelWheelsIntegrationTest extends Specification {
| apply plugin: com.linkedin.gradle.python.plugin.WheelFirstPlugin
| version = '1.0.0'
| python {
| pex {
| fatPex = false
| }
| pex {
| fatPex = false
| }
| pipConfig = [:]
| for (String command : ['install', 'wheel', 'download']) {
| pipConfig.put(command, [:])
| pipConfig.get(command).put('no-build-isolation', 'false')
| }
| }
| ${ PyGradleTestBuilder.createRepoClosure() }
""".stripMargin().stripIndent()
Expand Down Expand Up @@ -104,6 +109,13 @@ class ParallelWheelsIntegrationTest extends Specification {
| apply plugin: com.linkedin.gradle.python.plugin.WheelFirstPlugin
|
| version = '1.0.0'
| python {
| pipConfig = [:]
| for (String command : ['install', 'wheel', 'download']) {
| pipConfig.put(command, [:])
| pipConfig.get(command).put('no-build-isolation', 'false')
| }
| }
| ${ PyGradleTestBuilder.createRepoClosure() }
""".stripMargin().stripIndent()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,18 @@ class PythonPluginIntegrationTest extends Specification {
def "can build library"() {
given:
testProjectDir.buildFile << """
|plugins {
| id 'com.linkedin.python'
| id 'com.linkedin.python-wheel-dist'
|}
| plugins {
| id 'com.linkedin.python'
| id 'com.linkedin.python-wheel-dist'
| }
|
| python {
| pipConfig = [:]
| for (String command : ['install', 'wheel', 'download']) {
| pipConfig.put(command, [:])
| pipConfig.get(command).put('no-build-isolation', 'false')
| }
| }
|${PyGradleTestBuilder.createRepoClosure()}
""".stripMargin().stripIndent()

Expand Down Expand Up @@ -88,24 +95,29 @@ class PythonPluginIntegrationTest extends Specification {
def "can use external library"() {
given:
testProjectDir.buildFile << """
|plugins {
| id 'com.linkedin.python'
|}
| plugins {
| id 'com.linkedin.python'
| }
|
|repositories {
| pyGradlePyPi()
|}
| repositories {
| pyGradlePyPi()
| }
|
|python {
| details {
| virtualEnvPrompt = 'pyGradle!'
| }
| coverage {
| run = true
| }
|}
| python {
| details {
| virtualEnvPrompt = 'pyGradle!'
| }
| coverage {
| run = true
| }
| pipConfig = [:]
| for (String command : ['install', 'wheel', 'download']) {
| pipConfig.put(command, [:])
| pipConfig.get(command).put('no-build-isolation', 'false')
| }
| }
|
|buildDir = 'build2'
| buildDir = 'build2'
""".stripMargin().stripIndent()

when:
Expand Down Expand Up @@ -157,17 +169,22 @@ class PythonPluginIntegrationTest extends Specification {
def "test pytest and coverage failure"() {
when:
testProjectDir.buildFile << """
|plugins {
| id 'com.linkedin.python'
|}
|repositories {
| pyGradlePyPi()
|}
|python {
| coverage {
| run = true
| }
|}
| plugins {
| id 'com.linkedin.python'
| }
| repositories {
| pyGradlePyPi()
| }
| python {
| coverage {
| run = true
| }
| pipConfig = [:]
| for (String command : ['install', 'wheel', 'download']) {
| pipConfig.put(command, [:])
| pipConfig.get(command).put('no-build-isolation', 'false')
| }
| }
""".stripMargin().stripIndent()

testProjectDir.setupCfg.text = """
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,22 @@ class PythonWebApplicationPluginIntegrationTest extends Specification {
def "can build web-app"() {
given:
testProjectDir.buildFile << """\
|plugins {
| id 'com.linkedin.python-web-app'
|}
| plugins {
| id 'com.linkedin.python-web-app'
| }
|
|python {
| pex {
| fatPex = true
| }
|}
| python {
| pex {
| fatPex = true
| }
| pipConfig = [:]
| for (String command : ['install', 'wheel', 'download']) {
| pipConfig.put(command, [:])
| pipConfig.get(command).put('no-build-isolation', 'false')
| }
| }
|
|version = '1.2.3'
| version = '1.2.3'
|${PyGradleTestBuilder.createRepoClosure()}
""".stripMargin().stripIndent()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,17 @@ class Flake8TaskIntegrationTest extends Specification {
def "a passing flake8"() {
given:
testProjectDir.buildFile << """\
|plugins {
| id 'com.linkedin.python'
|}
| plugins {
| id 'com.linkedin.python'
| }
|
| python {
| pipConfig = [:]
| for (String command : ['install', 'wheel', 'download']) {
| pipConfig.put(command, [:])
| pipConfig.get(command).put('no-build-isolation', 'false')
| }
| }
|${ PyGradleTestBuilder.createRepoClosure() }
""".stripMargin().stripIndent()

Expand All @@ -53,10 +60,17 @@ class Flake8TaskIntegrationTest extends Specification {
def "a failing flake8"() {
given:
testProjectDir.buildFile << """\
|plugins {
| id 'com.linkedin.python'
|}
| plugins {
| id 'com.linkedin.python'
| }
|
| python {
| pipConfig = [:]
| for (String command : ['install', 'wheel', 'download']) {
| pipConfig.put(command, [:])
| pipConfig.get(command).put('no-build-isolation', 'false')
| }
| }
|${ PyGradleTestBuilder.createRepoClosure() }
""".stripMargin().stripIndent()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class PythonExtension {

/** A way to define forced versions of libraries */
public Map<String, Map<String, String>> forcedVersions = [
'flake8' : ['group': 'pypi', 'name': 'flake8', 'version': '3.6.0'],
'flake8' : ['group': 'pypi', 'name': 'flake8', 'version': '3.7.9'],
'pex' : ['group': 'pypi', 'name': 'pex', 'version': '1.5.2'],
'pip' : ['group': 'pypi', 'name': 'pip', 'version': '18.1'],
'pytest' : ['group': 'pypi', 'name': 'pytest', 'version': '3.10.0'],
Expand Down