Skip to main content

No project description provided

Project description

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

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

pymaketool-3.0.0rc1.tar.gz (57.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymaketool-3.0.0rc1-py3-none-any.whl (87.9 kB view details)

Uploaded Python 3

File details

Details for the file pymaketool-3.0.0rc1.tar.gz.

File metadata

  • Download URL: pymaketool-3.0.0rc1.tar.gz
  • Upload date:
  • Size: 57.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.14.2 Linux/6.11.0-1018-azure

File hashes

Hashes for pymaketool-3.0.0rc1.tar.gz
Algorithm Hash digest
SHA256 9454295a4d082ea27c0f1b493567598c13b43c01176f198f0c1d55fd2542e70b
MD5 1a7add5667b1b25f297f462adbcaf767
BLAKE2b-256 572191fbd598eddc2e24306fa9265fdbd9aacabe3f1b0d7db6c2766867f03d5b

See more details on using hashes here.

File details

Details for the file pymaketool-3.0.0rc1-py3-none-any.whl.

File metadata

  • Download URL: pymaketool-3.0.0rc1-py3-none-any.whl
  • Upload date:
  • Size: 87.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.14.2 Linux/6.11.0-1018-azure

File hashes

Hashes for pymaketool-3.0.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 4dc2355b6c713a84103bd9197286562a1f9813ab94be94bd9f7f4d6569a5e849
MD5 08e0ca2143a98576229343ee664b76e6
BLAKE2b-256 b5fafb0c290e35f333536a4ae16b865fb7a88b80ae5243d4d9f93a46b31ce50f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page