pynamer.builder
Collection of functions to build a minimal package and publish on PyPI.
Functions
|
Utility script to create a setup.py file. |
|
Utility script to rename a directory. |
|
Utility function to delete files and directories. |
|
Builds a manifest of artifacts to delete into a list of Path objects. |
|
Utility designed to execute a command line utility. |
|
Builds the twine command line to upload the minimalist project to PyPI. |
|
Builds the sdist and wheel of the minimalist project to upload to PyPI. |
Module Contents
- pynamer.builder.create_setup(new_project_name: str, new_meta: bool = False) None[source]
Utility script to create a setup.py file.
The object being to create a setup.py file from a ‘template’ file for the purpose of creating a minimalist package for upload to PyPI.
- Parameters:
new_project_name – name used to render the template.
new_meta – generate new package metadata.
- pynamer.builder.rename_project_dir(old_name: str, new_name: str) None[source]
Utility script to rename a directory.
The object being to rename a ‘template’ directory for the purpose of creating a minimalist package for upload to PyPI.
- Parameters:
old_name – source name.
new_name – dst name.
- Raises:
FileNotFoundError –
- pynamer.builder.delete_director(items_to_delete: Any) None[source]
Utility function to delete files and directories.
- Parameters:
items_to_delete – A list of Path like objects to delete.
- pynamer.builder.cleanup(project_name: str) None[source]
Builds a manifest of artifacts to delete into a list of Path objects.
- Parameters:
project_name – the name of the project currently under test.
- pynamer.builder.run_command(*arguments: str, shell: bool = True, working_dir: pathlib.Path | str | None = None, project: None | str = None) None[source]
Utility designed to execute a command line utility.
- Parameters:
arguments – Comma separated strings- “utility”, “arg1”, “arg2”, etc.
shell – command executed by the shell or directly by the operating system.
working_dir – specifies the current working directory to use when starting the subprocess. e.g. “/home/user/mydir”
project – the name of the project currently being tested