A build system library
Project description
🥧pybaker🥧
Pybaker is an easy to use flexible build system, provided as a python library. Born from my frustrations with existing build systems.
The library provides a Builder object and also allows you to create your own compiler, linker, dependency scanner and language configuration. It comes with a few Premade configurations but I would recomend using the clang configuration.
Install it from pip.
Example build script:
# If clang is installed this will just work.
from pybaker import *
def build():
builder = Builder("test", build_type=BuildType.DEBUG, cores = 4)
# To see how to implement a language configuration check out
# the Languages class.
builder.add_language(Languages.C())
builder.add_path("src")
if builder.build():
# Do something on failure...
pass
if builder.link(["-lUser32.lib", "-lGdi32.lib"]):
# Do something on failure...
pass
if __name__ == "__main__":
build()
To run it you simply call from your base directory
python build.py
This will create a new directory where it will dump its private files. A well as the build results.
2.0.0 Release Notes:
- Many classes and functions have been renamed for clarity.
- The language presets are now functions tha treturn a language rather than static members so they can be safely modified.
- The dependency scanner API has been simplified.
- Added gcc as a linker option similar to clang.
- Added a way to extend existing language configurations without needing to create a new one.
- The precentage of compilation done is now printed to the teminal along with the building file message. This requires passing an extra paramete to the compile function.
- Now allows for multithreaded building. You can select the number of cores by setting the cores parameter in the Builder constructor.
- Added a tcc configuration.
- Added static library linker options.
The MIT License (MIT)
Copyright © 2022 oatslaboats
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pybaker-2.0.1.tar.gz.
File metadata
- Download URL: pybaker-2.0.1.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf6ec779b6189e83ce80cbcc8ae70cf689d7ced4e25ba42e6fa297be955ba673
|
|
| MD5 |
2a73e70bc34d06c37f5cf4d94e0e29d3
|
|
| BLAKE2b-256 |
1ddae4242862dda369ee9919db539ac73098e14db27c9659b7707471a596534e
|
File details
Details for the file pybaker-2.0.1-py3-none-any.whl.
File metadata
- Download URL: pybaker-2.0.1-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b46f83edbccb35e00ee7fe6e9d8808f25a9598817270914742b4420cfbdcc7d
|
|
| MD5 |
960467581c42f49e9c8c765b18bcd52e
|
|
| BLAKE2b-256 |
ced3ae69b52c9169ea6b7e618d33ea3b423f36ba82a8c0653494ff0b302980ae
|