|
| | _output_entry (lines, key, data, tabs=" ", tabs2=" ") |
| | Create an entry for a python dict.
|
| | _setup_dynamic (project, tool) |
| | Process the dynamic variables in pyproject.toml.
|
| | _setup_process_entries (lines, project, keyword_list, remap=None, tabs=" ", tabs2=" ") |
| | Handle the list of common entries.
|
| | _setup_find_url (lines, project) |
| | Locate the most likely URL for the homepage.
|
| | _setup_find_license_file (lines, project) |
| | Degrade license-files to license_file.
|
| | _setup_find_readme_file (lines, project) |
| | Insert the readme file into the metadata.
|
| | _setup_find_packages (lines, setuptools_entry) |
| | Find the entries packages and package_data
|
| | create_setup_py (toml_name=None, setup_name=None) |
| | Create a setup.py for setuptools.
|
Package that contains setup.py helper functions.
Functions to generate setup.py
| burger.setuputils._output_entry |
( |
| lines, |
|
|
| key, |
|
|
| data, |
|
|
| tabs = " ", |
|
|
| tabs2 = " " ) |
|
protected |
Create an entry for a python dict.
Given a list of entries, a data key, and the data, determine how to output the data and append the lines to the lines stream
Tabs can either be a string or a number. If a number, it's multipied by space and that is the string inserted into the line entrie(s)
- Parameters
-
| lines | list of lines for final output |
| key | dict key to generate |
| data | data attached to the dict key |
| tabs | indentation |
| tabs2 | secondary indentation for list entries |
| burger.setuputils._setup_dynamic |
( |
| project, |
|
|
| tool ) |
|
protected |
Process the dynamic variables in pyproject.toml.
Scan the project dict for a "dynamic" entry, and if one exists, parse the tool dict for those entries and copy them directly into the project dict.
This will modify the project dict with the parsed data, and in some cases file loaded data.
- Note
- At this time, only attr is supported. file support to be added later
- Parameters
-
| project | "project" dict entry from the toml file |
| tool | "tool" dict entry from the toml file |
| burger.setuputils.create_setup_py |
( |
| toml_name = None, |
|
|
| setup_name = None ) |
Create a setup.py for setuptools.
The latest setuptools uses pyproject.toml for all the settings, but wheels packaged this way don't properly install using older versions of pip.
To get around this issue, a setup.py file is generated from the data in pyproject.toml for inclusion of the distributed wheel, so python 2.7's version of pip can still properly install the python module
- Parameters
-
| toml_name | Name of the pyproject.toml file. Default is pyproject.toml |
| setup_name | Name of the setup.py file. Default is setup.py |