Package: pmakeup
IntroductionThis 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 as well as several pitfalls. They are also clunky to work with,
Pmakeup aims to provide a pythonic environment (which is much easier to work with) in order to perform
operation on the local system, usually for compiling stuff or for setupping your system.
The project aims to give you the ability of executing commands without giving you too many troubles.To help the developer in commons tasks, Pmakeup provides several built-in commands
to perform common tasks (like copying files, read content and execute system commands).An important Security disclaimerI want to empathize this:pmakeupisnot a build system you can use to puppeteer remote systems:
its use is intended to build software locally, or to setup your workstation. In no meanspmakeupproject
provides adequate level of security to support remote puppeteering. In order to avoid being in you way, you can
actually call script by injecting your root password as plain text. This is by design, since onyourworksation, it is
assumed you have full control (as a developer anyway). However, transmitting password in plain text is ahugesecurity hole. Hence this project should not be used for puppetteering.For the userYou can install the software via:pip install pmakeupAdmin privileges may be required. To show all the options you can exploit, usepmakeup --helpAs a simple, ultra minimalistic example, create a file calledPMakeupfile.pyand past the following:echo("Hello world!", foreground="blue")ThePMakeupfileis 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 of the framework or by the huge pitfalls the build system provides.pmakeuptries 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 buildThe application will first invokecleanand thenbuildfunctions.DocumentationTo see the online documentation, please seehereRepo structureplugins: contains a set of folder where pmakeup plugins I have made are placedpmakeup: main source pmakeup code repositorytests: tests for pmakeup projectdocs: source code of the documentation of pmakeupimages: some images in pmakeupexamples: contains some examples to let you start in writing pmakeup scriptsPMakeupfile.pyscript allowing you to build and upload to pypi pmakeup codeFor the developerThis section is useful for the contributors.Installing with setuptoolsYou 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
deactivateTo installing on a system (ensure you are not invenv!):source venv/bin/activate
python setup.py bdist_wheel
deactivate
# get latest wheel file in dist\
pip install dist\*.whlNote that after installation,pmakeup.exe(orpmakeup) will be automatically installed in%PYTHONPATH%/Scripts(or available in thePATH)to show a comprehensive help, with all the commands available to you.Using pmakeup to build pmakeupAssuming you have a version of pmakeup installed on your system, you can usepmakeupto buildpmakeup.pmakeup update-version-minor build upload-to-pypiYou will need to createTWINE_PYPI_PASSWORDcontainig your twine password to upload