|
| 1 | +The following metadata fields can be extracted from a setup.cfg file. |
| 2 | +These fields are defined in the [setuptools declarative configuration specification](https://setuptools.pypa.io/en/latest/userguide/declarative_config.html), and are mapped according to the [CodeMeta crosswalk for Python Distutils](https://github.com/codemeta/codemeta/blob/master/crosswalks/Python%20Distutils%20(PyPI).csv). |
| 3 | + |
| 4 | +| Software metadata category | SOMEF metadata JSON path | SETUP.CFG metadata file field | |
| 5 | +|--------------------------------|-----------------------------|----------------------------------------| |
| 6 | +| author - value | author[i].result.value | metadata.author | |
| 7 | +| author - email | author[i].result.email | metadata.author_email | |
| 8 | +| author - name | author[i].result.name | metadata.author | |
| 9 | +| code_repository | code_repository[i].result.value | project_urls (source, repository, code) | |
| 10 | +| description | description[i].result.value | metadata.description | |
| 11 | +| documentation | documentation[i].result.value | project_urls (Documentation, docs) | |
| 12 | +| license - value | license[i].result.value | metadata.license or metadata.license_files | |
| 13 | +| license - name | license[i].result.name | metadata.license *(1)* | |
| 14 | +| license - spdx id | license[i].result.spdx_id | metadata.license if "spdx.org/licenses/" *(1)* | |
| 15 | +| has_package_file | has_package_file[i].result.value | URL of the setup.cfg file | |
| 16 | +| homepage | homepage[i].result.value | metadata.url or project_urls (Homepage) | |
| 17 | +| keywords | keywords[i].result.value | metadata.keywords | |
| 18 | +| package_id | package_id[i].result.value | metadata.name | |
| 19 | +| requirements - value | requirements[i].result.value | options.install_requires or options.setup_requires *(2)* | |
| 20 | +| requirements - name | requirements[i].result.name | options.install_requires or options.setup_requires -> name *(2)* | |
| 21 | +| requirements - version | requirements[i].result.version | options.install_requires or options.setup_requires -> version *(2)* | |
| 22 | +| runtime_platform - value | runtime_platform[i].result.value | options.python_requires -> "Python" + version *(3)* | |
| 23 | +| runtime_platform - name | runtime_platform[i].result.name | options.python_requires -> "Python" *(3)* | |
| 24 | +| runtime_platform - version | runtime_platform[i].result.version | options.python_requires *(3)* | |
| 25 | +| version - value | version[i].result.value | metadata.version | |
| 26 | +| version - tag | version[i].result.tag | metadata.version | |
| 27 | + |
| 28 | +--- |
| 29 | + |
| 30 | +*(1)* |
| 31 | +- Look for the name and spdx_id in a local dictionary with all licenses. |
| 32 | + |
| 33 | +*(2)* |
| 34 | +- Examples of requirements |
| 35 | +``` |
| 36 | +[options] |
| 37 | +install_requires = |
| 38 | + astropy |
| 39 | + ctapipe >= 0.12 |
| 40 | + h5py ~= 3.1.0 |
| 41 | + |
| 42 | +setup_requires = |
| 43 | + setuptools >= 40.6.0 |
| 44 | + wheel |
| 45 | +
|
| 46 | +``` |
| 47 | + |
| 48 | +*(3)* |
| 49 | +- Example: |
| 50 | +``` |
| 51 | +python_requires = >= 3.10.0 |
| 52 | +``` |
0 commit comments