References

bootstrap_py.control.

bootstrap_py.control.retreive_metadata()[source]

Retrieve metadata.

Return type:bootstrap_py.classifiers.Classifiers
Returns:Classifiers()
bootstrap_py.control.print_licences(params, metadata)[source]

Print licenses.

Parameters:
  • params (argparse.Namespace) – parameter
  • metadata (bootstrap_py.classifier.Classifiers) – package metadata
bootstrap_py.control.check_repository_existence(params)[source]

Check repository existence.

Parameters:params (argparse.Namespace) – parameters
bootstrap_py.control.check_package_existence(params)[source]

Check package existence.

Parameters:params (argparse.Namespace) – parameters
bootstrap_py.control.generate_package(params)[source]

Generate package repository.

Parameters:params (argparse.Namespace) – parameters

bootstrap_py.package.

class bootstrap_py.package.PackageData(args)[source]

Bases: object

Package meta data class.

default_version = '0.1.0'

Configured the default “version” of setup.setup().

warning_message = '##### ToDo: Rewrite me #####'

Users should rewrite parameters after they generate Python package.

to_dict()[source]

Convert the package data to dict.

class bootstrap_py.package.PackageTree(pkg_data)[source]

Bases: object

Package directory tree class.

template_name = 'bootstrap_py'

Jinja2 template name

suffix = '-bootstrap-py'

the suffix name of working directory for generating

init = '__init__.py'

init filename

exec_perm = 493

default permission

pkg_dirs = ['{module_name}', '{module_name}/tests']

include directories to packages

move()[source]

Move directory from working directory to output directory.

clean()[source]

Clean up working directory.

generate()[source]

Generate package directory tree.

vcs_init()[source]

Initialize VCS repository.

bootstrap_py.classifiers.

class bootstrap_py.classifiers.Classifiers[source]

Bases: object

Classifiers.

url = 'https://pypi.python.org/pypi?%3Aaction=list_classifiers'

list_classifiers url

prefix_status = 'Development Status :: '

prefix status

prefix_lic = 'License :: OSI Approved :: '

prefix licences

status()[source]

Development status.

licenses()[source]

OSI Approved license.

licenses_desc()[source]

Remove prefix.

bootstrap_py.docs.

bootstrap_py.docs.build_sphinx(pkg_data, projectdir)[source]

Build sphinx documentation.

Return type:

int

Returns:

subprocess.call return code

Parameters:
  • pkg_data (bootstrap_py.control.PackageData) – package meta data
  • projectdir (str) – project root directory

bootstrap_py.pypi.

bootstrap_py.pypi.PYPI_URL = 'https://pypi.org/pypi/{0}/json'

PyPI JSONC API url

bootstrap_py.pypi.package_existent(name)[source]

Search package.

Parameters:name (str) – package name

bootstrap_py.vcs.

class bootstrap_py.vcs.VCS(repo_dir, metadata)[source]

Bases: object

VCS class.

bootstrap_py.exceptions.

exception bootstrap_py.exceptions.Error[source]

Bases: Exception

Base error class.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception bootstrap_py.exceptions.NotFound[source]

Bases: bootstrap_py.exceptions.Error

Not Found.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception bootstrap_py.exceptions.Conflict[source]

Bases: bootstrap_py.exceptions.Error

Confilict.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception bootstrap_py.exceptions.BackendFailure[source]

Bases: bootstrap_py.exceptions.Error

PyPI service down.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.