Cross-platform Utilities Module (python)

Overview

PyPi module N/A
git repository https://bitbucket.org/arrizza-public/xplat-utils.html
git command git clone git@bitbucket.org:arrizza-public/xplat-utils.git
Verification Report N/A
Version Info N/A

Summary

This module holds a series of development utilities for projects in Python and C/C++.

see xplat UTs for unit tests.

Submodule

xplat-utils is meant to be used as a submodule inside another Python app or module.

To initially install it, create this .gitmodule file and then run the script below.

[submodule "tools/xplat_utils"]
    path = tools/xplat_utils
    url = git@bitbucket.org:arrizza-public/xplat-utils.git
    branch = master

Note: this is in ./do_subm_update in all projects use xplat-utils. See Project Templates for examples.

  • run ./do_subm_update full to do an initial set up of the submodule
  • run ./do_subm_update to do an update to the latest version
#! /usr/bin/env bash

# do once:
# note: any changes in tools/xplat_utils will be lost
if [ "$1" = "full" ]; then
  rm -rf tools/xplat_utils
  git rm -r --cached tools/xplat_utils
  git submodule add --force git@bitbucket.org:arrizza-public/xplat-utils.git tools/xplat_utils
fi

git submodule sync --recursive
git submodule update --recursive --remote --rebase
git submodule foreach git checkout master
git submodule foreach git status

Set up xplat.cfg file to provide basic information needed for that project. See xplat.cfg for more information on how to configure xplat.cfg file. Or check the template projects for settings for Python or C++ applications/modules.

[xplat]
; the version string held in mod_dir_name/lib/version.json
version = '0.0.1'
; the module name (with dashes)
mod_name = 'your-project'
; flag indicating this is a module/library (True) or an app (False)
is_module = False
; indicating if private or public
mod_type = 'private'
; which tech is used for this project: python, cpp, arduino
mod_tech = 'python'
;
; == typically do not change from here on
;
; the license for the module
license = 'MIT'
; the license string for the classifier section
classifier_license = 'License :: OSI Approved :: MIT License'
; the url for the homepage link
homepage_url = 'https://bitbucket.org/arrizza-{mod_type}/{mod_name}/src/master'
; the url for the download link
download_url = 'https://bitbucket.org/arrizza-{mod_type}/{mod_name}/get/master.zip'

; the author name
author = 'JA'
; the contact email
email = 'youremail'
; the type of the description file used
long_desc_type = 'text/markdown'

; --------------------
; additional cfg for do_publish
[do_publish]
; disallow these modules from being published; comma separated list
disallow = module-name, devpy-mod-template

; --------------------
; additional cfg for do_lint
[do_lint]
; include the tools directory
include_tools = False
; for cpp/arduino: src directories
src_dirs = []

; --------------------
; additional cfg for do_doc
[do_doc]
; document description
doxy_desc = 'app full name and description'
; additional exclude directories (if any)
doxy_exclude = './lib/build_info.py'
; additional include directories (if any)
doxy_include =

; --------------------
; additional cfg for do_post_ver
[do_post_ver]
; directory to save verification html files
dst_dir = '~/projects/web-ver'
; directory to get verification html files
src_dir = 'out/ver'
; web slug; use 'N/A' for projects not on the web
slug = 'N/A'
; PyPi URL for python modules; use 'N/A' not a module
; e.g. https://pypi.org/project/{mod_name}
pypi_url = 'N/A'
; repo URL; note can only be public
repo_url = 'N/A'

; --------------------
; additional cfg for do_ut
[do_ut]
; cpp only: the coverage dirs to report
cov_dirs =

- John Arrizza