Skip to main content

Library for quickly develop makefile-like files, platform independent

Project description

Introduction

This package tries to provide a solution for build softwares in a platform independent manner. It tries to loosely mimick the objective of Makefile, but with a python syntax. Makefiles are known to have complex syntax a several pitfalls. They are also clunky to work with, Pmakeup tries to provide a pythonic environment (which is much easier to work with). To help the devloper in commons tasks, Pmakeup provides several built-in commands to perform common tasks (like copying files, read content and execute system commands).

For the user

You can install the software via:

pip install pmakeup

Admin privileges may be required. To show all the options you can exploit, use

pmakeup --help

As a simple, ultra minimalistic example, create a file caleld PMakeupfile.py and past the following:

echo("Hello world!", foreground="blue")

The PMakeupfile is actually just a python script, so you can do anything in it! This is by design, since in several build systems (make, cmake, jenkins) a lot of time you are constrained by the declarative syntax or by the huge pitfalls the build system provides. pmakeup tries not to be in your way: it gives you freedom.

You can use targets, pretty much as in the Makefile, albeit the syntax is quite different:

def clean():
    echo(f"Cleaning!!!!", foreground="blue")


def build():
    echo(f"Build!", foreground="blue")


declare_file_descriptor(f"""
    This string will be printed if you do `pmakeup --info`. Use this
    to give to the enduser information about how to use this makefile! :) 
""")
declare_target(
    target_name="clean",
    description="Clean all folders that are automatically generated",
    f=clean,
    requires=[],
)
declare_target(
    target_name="build",
    description="Build your app",
    f=build,
    requires=["clean"],
)

# necessary
process_targets()

Then, call in the same directory:

pmakeup build

The application will first invoke clean and then build functions.

For the developer

This section is useful for the contributors.

Installing with setuptools

You can build the pacakge via:

sudo pip install pyinstaller wheel setupttols sphinx
git clone https://github.com/Koldar/pmakeup
cd pmakeup
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
python setup.py bdist_wheel
deactivate

To installing on a system (ensure you are not in venv!):

source venv/bin/activate
python setup.py bdist_wheel
deactivate
# get latest wheel file in dist\
pip install dist\*.whl

Note that after installation, pmakeup.exe (or pmakeup) will be automatically installed in %PYTHONPATH%/Scripts (or available in the PATH)

to show a comprehensive help, with all the commands available to you.

Using pmakeup to build pmakeup

Assuming you have a version of pmakeup installed on your system, you can use pmakeup to build pmakeup.

pmakeup --variable "NEW_VERSION" "1.2.1" update-version build install upload-to-test-pypi

Documentation

I have installed miktex as latex

pip install sphinx
cd docs/
sphinx-quickstart
make html latexpdf

For latex, the packages needs to be installed (may be superset):

anyfontsize, auxhook, beamer, bigintcalc, bitset, capt-of, changepage, 
cmap, courier, datatool, dvips, etexcmds, fancyhdr, fancyvrb, fncychap, 
fontawesome, fontspec, fp, framed, geometry, gettitlestring, glossaries, 
hycolor, hyperref, intcalc, jknappen, koma-script, kvoptions, 
latexmk, letltxmacro, listings, lm, luatex85, mdframed, mfirstuc, 
miktex-lualatex, moresize, needspace, oberdiek, parskip, pdfescape, 
psnfss, refcount, rerunfilecheck, rsfs, sansmathaccent, substr, 
supetabular, tabulary, tex-ini-files, textcase, titlesec, tocbibind, 
translator, uniquecounter, upquote, url, wrapfig, xfor, xkeyval, 
zapfding, zref

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pmakeup-1.14.7-py3-none-any.whl (99.9 kB view details)

Uploaded Python 3

File details

Details for the file pmakeup-1.14.7-py3-none-any.whl.

File metadata

  • Download URL: pmakeup-1.14.7-py3-none-any.whl
  • Upload date:
  • Size: 99.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.8.6

File hashes

Hashes for pmakeup-1.14.7-py3-none-any.whl
Algorithm Hash digest
SHA256 9f8fb1d2f873867f3230311e0eab1583b96f5154b6c097cd2f563a7791e0695a
MD5 f2ac85a957f119c50a8d8f3c2dd67755
BLAKE2b-256 a7ff30e27a94251acb6f97e7e716d307859b5e24698d42be27e35c150457248a

See more details on using hashes here.

Supported by

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