pynamer.builder =============== .. py:module:: pynamer.builder .. autoapi-nested-parse:: Collection of functions to build a minimal package and publish on PyPI. Functions --------- .. autoapisummary:: pynamer.builder.create_setup pynamer.builder.rename_project_dir pynamer.builder.delete_director pynamer.builder.cleanup pynamer.builder.run_command pynamer.builder.upload_dist pynamer.builder.build_dist Module Contents --------------- .. py:function:: create_setup(new_project_name: str, new_meta: bool = False) -> None 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. :param new_project_name: name used to render the template. :param new_meta: generate new package metadata. .. py:function:: rename_project_dir(old_name: str, new_name: str) -> None 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. :param old_name: source name. :param new_name: dst name. :raises FileNotFoundError: .. py:function:: delete_director(items_to_delete: Any) -> None Utility function to delete files and directories. :param items_to_delete: A list of Path like objects to delete. .. py:function:: cleanup(project_name: str) -> None Builds a manifest of artifacts to delete into a list of Path objects. :param project_name: the name of the project currently under test. .. py:function:: run_command(*arguments: str, shell: bool = True, working_dir: Union[pathlib.Path, str, None] = None, project: Union[None, str] = None) -> None Utility designed to execute a command line utility. :param arguments: Comma separated strings- "utility", "arg1", "arg2", etc. :param shell: command executed by the shell or directly by the operating system. :param working_dir: specifies the current working directory to use when starting the subprocess. e.g. "/home/user/mydir" :param project: the name of the project currently being tested .. py:function:: upload_dist(project_name: str) -> None Builds the twine command line to upload the minimalist project to PyPI. :param project_name: the name of the project currently under test. .. rubric:: Notes twine expects a filesystem path not Path object so use os.fspath() .. py:function:: build_dist() -> None Builds the sdist and wheel of the minimalist project to upload to PyPI.