pymaketool
pymaketool is an elegant and simple tool to build and manager large C/C++ projects and libraries. The main purpose is to ease the build process of a project using Python for find and organize file sources.
Quick Start
Install required packages:
Ubuntu
$ sudo apt-get install -y gcc make python3 python3-pip python3-gi python3-gi-cairo gir1.2-gtk-3.0 git time zip
Fedora
$ sudo dnf install python3 python3-pip python3-gobject gtk3 time zip git gcc
Arch Linux
$ sudo pacman -S gcc make python python-pip python-gobject gtk3 time zip git
Install pymaketool:
$ pip3 install pymaketool
Create new basic C project.
$ pynewproject CLinuxGCC
(author) Your name: Ericson
(project_name) Your project name: hello
$ cd hello
hello$ make clean
hello$ make
hello$ ./Release/hello
Note: this example use EclipseAddon by default, pymaketool generate files .setting/language.settings.xml and .cproject.
Quick start in Docker
Pull imagen and run container:
$ docker pull ericsonjoseph/pymaketool
$ docker run -it ericsonjoseph/pymaketool
ubuntu@$ pynewproject CLinuxGCC
Quick Info
pymaketool process modules of code like objects. These objects ware define by files *_mk.py. With Python you can code how to discover and get source files and include paths, e.g.:
# File app_mk.py
from pymakelib import module
@module.ModuleClass
class App(module.AbstractModule):
def getSrcs(self):
# Get all sources .c in current folder ./app/
# return [ 'app/app.c' ]
return self.getAllSrcsC()
def getIncs(self):
# Get all include paths in current folder ./app/
# return [ 'app/app.c' ]
return self.getAllIncsC()
The file app_mk.py could be more short and ease, e.g.:
# File app_mk.py
from pymakelib import module
# BasicCModule inherits from AbstractModule and implement getSrcs and getIncs.
@module.ModuleClass
class App(module.BasicCModule):
pass
The file app_mk.py in raw style:
# File app_mk.py
from pymakelib import module
@module.ModuleClass
class App():
def getSrcs(self):
return [
'app/app.c'
]
def getIncs(self):
return [
'app'
]
Remote modules could be load like static libraries and with special compiler flags. e.g:
# File extlib_mk.py
from pymakelib import module
@module.ModuleClass
class ExtLib(module.ExternalModule):
def init(self):
# Compile modulelib like static library (Optional)
return module.StaticLibrary("modulelib", "Release", rebuild=True)
def getModulePath(self)->str:
# Location of module
return '/LIBS/module_lib/module_lib_mk.py'
def getCompilerOpts(self):
# Override method and set speacial compiler flags (Optional)
opts = project.getCompilerOpts()
opts['CONTROL-C-OPTS'] = ['-std=c99']
return opts
For install guide go to install-guide
For more documentation go to Read the Docs
Metadata
Release files for pymaketool 2.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pymaketool-2.0.6.tar.gz | 47.8 kB | Without provenance | Details for pymaketool-2.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pymaketool-2.0.6-py3-none-any.whl | Python 3 | none | any | Details for pymaketool-2.0.6-py3-none-any.whl |
Total release size: 115.1 kB
Release files / pymaketool-2.0.6.tar.gz
| Download URL | pymaketool-2.0.6.tar.gz |
|---|---|
| Size | 47.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e730115ef9944bb62255b26c3cbd2270e499e7caab4ca1912a84117a3fc69d6e
|
|
BLAKE2b-256 checksum How to use checksums |
36166a160c509eba8c8e6947f1162259805d1bd11ab46d4ecec0323384872a48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.4
|
Release files / pymaketool-2.0.6-py3-none-any.whl
| Download URL | pymaketool-2.0.6-py3-none-any.whl |
|---|---|
| Size | 67.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1e36dc2b786fb71e103f7f961263ae867ab6b6c9c5ae967f700539274f744466
|
|
BLAKE2b-256 checksum How to use checksums |
9d1bbd644ff3c9e6d7f321e5cbb2958fd3cd43ba380b6cd00a52ec0e91d38bf6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.4
|
Security for pymaketool 2.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.