pybythec
Install
pip install pybythec
Source
Find the latest version on github: https://github.com/glowtree/pybythec
Usage
Create a pybythec.json file (or .pybythec.json) in the same directory as your c / c++ files.
Here’s an example of what would be declared in pybythec.json if you were building an executable called Simple:
{
"target": "Simple",
"binaryType": "exe",
"sources": "main.cpp",
"installPath": "."
}
Then from the command line run:
pybythec
Clean your project with:
pybythec -cl
Clean your project and all it’s dependencies with:
pybythec -cla
Look at other exmples in the ‘./example’ directory to see how to build a static library, a dynamic library, and also an executable with library dependencies.
pybythec assumes your already have the compiler / linker you want to use installed on your machine, currently gcc, clang and msvc are supported.
When you install pybythec with pip it will add a file called .pybythecGlobals.json to your home directory. This is a master file that declares all of your compiler and linker configurations. You can edit this as needed for system-wide configuration. If you want to move this file just be sure to have an environment variable called PYBYTHEC_GLOBALS point to the new location, for example:
export PYBYTHEC_GLOBALS=/Users/user/dev/.myPybythecGlobals.json
or for windows powershell:
$env:PYBYTHEC_GLOBALS="C:/Users/user/dev/.myPybythecGlobals.json"
There are up to 3 configuration files for any given build: global, project and local, where project overrides global, and local overrides both global and project.
You can point pybythec to the project configuration file with the environment variable PYBYTHEC_PROJECT, for example:
export PYBYTHEC_PROJECT=/Users/user/dev/myProject/.myProjectConfig.json
pybythec will always look for your local file in your current directoy, and it must be called pybythec.json or .pybythec.json.
You don’t need all 3 to build, in fact you could even put everything into one of those 3 files if you really wanted to.
The configuration files allow for nested declarations so that you can get specific for your building needs.
For example if I want a preprocessor declaration that’s project wide but only used when building on OS X for gcc, I can add the following to my project level config file:
"defines":
{
"macOs": {
"gcc" : "SOME_DEFINE"
}
}
You can use environmet variables in your configuration files simply by prepending with $, for example:
"libPaths": "$SHARED/lib"
You can have a python script automatically run after the build finishes, just be sure it’s called pybythecPost.py or .pybythecPost.py.
Currently pybythec supports gcc/g++, clang/clang++ and msvc
More documentation to come!!!
License
See LICENSE
Metadata
Release files for pybythec 0.9.64
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 |
|---|---|---|---|---|
| pybythec-0.9.64.tar.gz | 20.2 kB | Without provenance | Details for pybythec-0.9.64.tar.gz |
Release files / pybythec-0.9.64.tar.gz
| Download URL | pybythec-0.9.64.tar.gz |
|---|---|
| Size | 20.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7ff925571c7ffa12224c9779f5fbf35c778770b04d9d9cbe3131445e517b8a8c
|
|
BLAKE2b-256 checksum How to use checksums |
d2ef4d516ddb54817438e1d533b196fee963574f6ab555391b29ccf1fbf9d52e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10
|
Security for pybythec 0.9.64
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.