The com.linkedin.python
plugin adds an extension called python
to the project. It also configures a python project to setup a virtual env and run the tests. There are no artifacts produced by this plugin alone, you should check out other plugins to generate artifacts for the project.
python {
docsDir = project.file('docs').path // The location of this project's Sphinx documentation directory
testDir = project.file('test').path // The location of this project's tests directory.
srcDir = project.file('src').path // The location of this project's source directory.
setupCfg = project.file('src').path // The location of this project's setup.cfg file.
pinnedFile = project.file('pinned.txt') // A file generated by the build for pip install to consume in no pygradle builds
pythonEnvironment = [:] // Environment variables that will be passed to python commands. This will overwrite any existing env variables.
details {
virtualEnvPrompt = "(${project.name})"
activateLink = project.file("activate") // File you can source to activate the virtual env
// pythonVersion = '2.6' // Sets the version of python to use, will search your PATH to get the location
// systemPythonInterpreter = file("/path/to/python2.7") // used to force an interpreter to be used to build the venv
}
}
plugins {
id 'com.linkedin.python', version <latest version>
}