I use Python, PyQt, MySQL and Pyinstaller to build stand alone exe applications. I am very satisfied with the flexibility of this environment. Today however, I manually run independent commands to do the following types of tasks:
I would like to use Gradle as a build system for these tasks. I realize Gradle is mostly used for Java projects, but I see no reason it can't be used for Python projects.
Does anyone have a similar working example of a gradle.build file for the above tasks? Or... provide help in creating one?
Here are a few detailed examples of the above commands:
C:/Python27/Lib/site-packages/PyQt4/pyuic4.bat $file > ${file_base_name}_ui.py
C:/Python27/Lib/site-packages/PyQt4/pyrcc4.exe $file -o ${file_base_name}_rc.py
c:/python27/python.exe c:/pyinstaller/pyinstaller.py --onefile --noconsole --out=$file_path/$file
PyGradle is an enterprise Python build system. PyGradle leverages Gradle to empower Python's existing ecosystem to solve problems like dependency management, polyglot projects, and lots more. LinkedIn has been using PyGradle for several years to successfully manage thousands of Python dependencies.
We hope that using Gradle to build your Python code will be as simple as using Setuptools directly, but will provide you with more robust dependency management and a quality method to integrate against your existing metadata systems, in addition to allowing you to explore building products composed of multiple ...
It is popular for its ability to build automation in languages like Java, Scala, Android, C/C++, and Groovy. The tool supports groovy based Domain Specific Language over XML. Gradle provides building, testing, and deploying software on several platforms.
Gradle Build Tool is the most popular build tool for open source JVM projects on GitHub. It is downloaded on average more than 25 million times per month and has been counted in the Top 20 Most Popular Open Source Projects for IT by Techcrunch.
Interesting question! It may not help you explicitely with all your tasks but can give you an advice into the right direction.
Just have a look at the gradle Exec
task. With that you might be able to run the necessary python build steps within your gradle build, e.g.
task runpy(type:Exec) {
workingDir './pydir'
commandLine 'python', 'pyinstaller.py'
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With