Skip to content

Instantly share code, notes, and snippets.

@sjlongland
Created August 20, 2023 02:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sjlongland/1b79ac2f87a2c9ac5a947a27c99777a8 to your computer and use it in GitHub Desktop.
Save sjlongland/1b79ac2f87a2c9ac5a947a27c99777a8 to your computer and use it in GitHub Desktop.
License output for setuptools with different projects
+ tail -n +0 setup.py
import setuptools
setuptools.setup(
name="mypackage",
version="1.2.3",
license="""Mock License 1.0
This is a dummy license text to check how setuptools represents
it in the metadata so it can be exposed to pyproject.toml."""
)
+ python3 setup.py --license
Mock License 1.0
This is a dummy license text to check how setuptools represents
it in the metadata so it can be exposed to pyproject.toml.
+ python3 setup.py dumpmeta
running dumpmeta
{
"__class__": "Distribution",
"methods": {
"announce": "<not getter>",
"dump_option_dicts": "<not getter>",
"exclude": "<not getter>",
"exclude_package": "<not getter>",
"fetch_build_egg": "<not getter>",
"fetch_build_eggs": "<not getter>",
"finalize_options": "<not getter>",
"find_config_files": "<not getter>",
"get_author": null,
"get_author_email": null,
"get_classifiers": [],
"get_cmdline_options": {},
"get_command_class": "<not callable>",
"get_command_list": [
[
"build",
"build everything needed to install"
],
[
"build_py",
"\"build\" pure Python modules (copy to build directory)"
],
[
"build_ext",
"build C/C++ extensions (compile/link to build directory)"
],
[
"build_clib",
"build C/C++ libraries used by Python extensions"
],
[
"build_scripts",
"\"build\" scripts (copy and fixup #! line)"
],
[
"clean",
"clean up temporary files from 'build' command"
],
[
"install",
"install everything from build directory"
],
[
"install_lib",
"install all Python modules (extensions and pure Python)"
],
[
"install_headers",
"install C/C++ header files"
],
[
"install_scripts",
"install scripts (Python or otherwise)"
],
[
"install_data",
"install data files"
],
[
"sdist",
"create a source distribution (tarball, zip file, etc.)"
],
[
"register",
"register the distribution with the Python package index"
],
[
"bdist",
"create a built (binary) distribution"
],
[
"bdist_dumb",
"create a \"dumb\" built distribution"
],
[
"bdist_rpm",
"create an RPM distribution"
],
[
"check",
"perform some checks on the package"
],
[
"upload",
"upload binary package to PyPI"
],
[
"dumpmeta",
"(no description available)"
],
[
"pyproject",
"(no description available)"
],
[
"alias",
"define a shortcut to invoke one or more commands"
],
[
"bdist_egg",
"create an \"egg\" distribution"
],
[
"develop",
"install package in 'development mode'"
],
[
"dist_info",
"DO NOT CALL DIRECTLY, INTERNAL ONLY: create .dist-info directory"
],
[
"easy_install",
"Find/get/install Python packages"
],
[
"editable_wheel",
"DO NOT CALL DIRECTLY, INTERNAL ONLY: create PEP 660 editable wheel"
],
[
"egg_info",
"create a distribution's .egg-info directory"
],
[
"install_egg_info",
"Install an .egg-info directory for the package"
],
[
"rotate",
"delete older distributions, keeping N newest files"
],
[
"saveopts",
"save supplied options to setup.cfg or other config file"
],
[
"setopt",
"set an option in setup.cfg or another config file"
],
[
"test",
"run unit tests after in-place build (deprecated)"
],
[
"upload_docs",
"Upload documentation to sites other than PyPi such as devpi"
]
],
"get_command_obj": "<not callable>",
"get_command_packages": [
"distutils.command"
],
"get_contact": null,
"get_contact_email": null,
"get_description": null,
"get_download_url": null,
"get_egg_cache_dir": "./.eggs",
"get_fullname": "mypackage-1.2.3",
"get_keywords": [],
"get_license": "Mock License 1.0\n\nThis is a dummy license text to check how setuptools represents\nit in the metadata so it can be exposed to pyproject.toml.",
"get_long_description": null,
"get_maintainer": null,
"get_maintainer_email": null,
"get_name": "mypackage",
"get_obsoletes": [],
"get_option_dict": "<not callable>",
"get_platforms": null,
"get_provides": [],
"get_requires": [],
"get_url": null,
"get_version": "1.2.3",
"handle_display_options": "<not getter>",
"has_c_libraries": null,
"has_contents_for": "<not callable>",
"has_data_files": null,
"has_ext_modules": null,
"has_headers": null,
"has_modules": null,
"has_pure_modules": false,
"has_scripts": null,
"include": "<not getter>",
"is_pure": false,
"iter_distribution_names": "<not getter>",
"make_option_lowercase": "<not getter>",
"parse_command_line": "<not getter>",
"parse_config_files": "<not getter>",
"patch_missing_pkg_info": "<not getter>",
"print_command_list": "<not getter>",
"print_commands": "<not getter>",
"reinitialize_command": "<not getter>",
"run_command": "<not getter>",
"run_commands": "<not getter>",
"set_defaults": "<not getter>",
"warn_dash_deprecation": "<not getter>"
},
"properties": {
"author": 0,
"author_email": 0,
"classifiers": 0,
"cmdclass": {
"alias": "<class 'setuptools.command.alias.alias'>",
"bdist": "<class 'distutils.command.bdist.bdist'>",
"bdist_dumb": "<class 'distutils.command.bdist_dumb.bdist_dumb'>",
"bdist_egg": "<class 'setuptools.command.bdist_egg.bdist_egg'>",
"bdist_rpm": "<class 'setuptools.command.bdist_rpm.bdist_rpm'>",
"build": "<class 'setuptools.command.build.build'>",
"build_clib": "<class 'setuptools.command.build_clib.build_clib'>",
"build_ext": "<class 'setuptools.command.build_ext.build_ext'>",
"build_py": "<class 'setuptools.command.build_py.build_py'>",
"build_scripts": "<class 'distutils.command.build_scripts.build_scripts'>",
"check": "<class 'distutils.command.check.check'>",
"clean": "<class 'distutils.command.clean.clean'>",
"develop": "<class 'setuptools.command.develop.develop'>",
"dist_info": "<class 'setuptools.command.dist_info.dist_info'>",
"dumpmeta": "<class 'setuptools_pyproject_migration.dumpmeta.DumpMetadata'>",
"easy_install": "<class 'setuptools.command.easy_install.easy_install'>",
"editable_wheel": "<class 'setuptools.command.editable_wheel.editable_wheel'>",
"egg_info": "<class 'setuptools.command.egg_info.egg_info'>",
"install": "<class 'setuptools.command.install.install'>",
"install_data": "<class 'distutils.command.install_data.install_data'>",
"install_egg_info": "<class 'setuptools.command.install_egg_info.install_egg_info'>",
"install_headers": "<class 'distutils.command.install_headers.install_headers'>",
"install_lib": "<class 'setuptools.command.install_lib.install_lib'>",
"install_scripts": "<class 'setuptools.command.install_scripts.install_scripts'>",
"pyproject": "<class 'setuptools_pyproject_migration.WritePyproject'>",
"register": "<class 'distutils.command.register.register'>",
"rotate": "<class 'setuptools.command.rotate.rotate'>",
"saveopts": "<class 'setuptools.command.saveopts.saveopts'>",
"sdist": "<class 'setuptools.command.sdist.sdist'>",
"setopt": "<class 'setuptools.command.setopt.setopt'>",
"test": "<class 'setuptools.command.test.test'>",
"upload": "<class 'distutils.command.upload.upload'>",
"upload_docs": "<class 'setuptools.command.upload_docs.upload_docs'>"
},
"command_obj": {
"dumpmeta": "<setuptools_pyproject_migration.dumpmeta.DumpMetadata object at 0x7f579fcfcf10>"
},
"command_options": {
"aliases": {},
"dumpmeta": {}
},
"command_packages": null,
"commands": [
"dumpmeta"
],
"common_usage": "Common commands: (see '--help-commands' for more)\n\n setup.py build will build the package underneath 'build/'\n setup.py install will install the package\n",
"contact": 0,
"contact_email": 0,
"data_files": null,
"dependency_links": [],
"description": 0,
"display_option_names": [
"help_commands",
"name",
"version",
"fullname",
"author",
"author_email",
"maintainer",
"maintainer_email",
"contact",
"contact_email",
"url",
"license",
"licence",
"description",
"long_description",
"platforms",
"classifiers",
"keywords",
"provides",
"requires",
"obsoletes"
],
"display_options": [
[
"help-commands",
null,
"list all available commands"
],
[
"name",
null,
"print package name"
],
[
"version",
"V",
"print package version"
],
[
"fullname",
null,
"print <package name>-<version>"
],
[
"author",
null,
"print the author's name"
],
[
"author-email",
null,
"print the author's email address"
],
[
"maintainer",
null,
"print the maintainer's name"
],
[
"maintainer-email",
null,
"print the maintainer's email address"
],
[
"contact",
null,
"print the maintainer's name if known, else the author's"
],
[
"contact-email",
null,
"print the maintainer's email address if known, else the author's"
],
[
"url",
null,
"print the URL for this package"
],
[
"license",
null,
"print the license of the package"
],
[
"licence",
null,
"alias for --license"
],
[
"description",
null,
"print the package description"
],
[
"long-description",
null,
"print the long package description"
],
[
"platforms",
null,
"print the list of platforms"
],
[
"classifiers",
null,
"print the list of classifiers"
],
[
"keywords",
null,
"print the list of keywords"
],
[
"provides",
null,
"print the list of packages/modules provided"
],
[
"requires",
null,
"print the list of packages/modules required"
],
[
"obsoletes",
null,
"print the list of packages/modules made obsolete"
]
],
"dist_files": [],
"dry_run": 0,
"eager_resources": null,
"entry_points": null,
"exclude_package_data": null,
"ext_modules": null,
"ext_package": null,
"extra_path": null,
"extras_require": {},
"fullname": 0,
"global_options": [
[
"verbose",
"v",
"run verbosely (default)",
1
],
[
"quiet",
"q",
"run quietly (turns verbosity off)"
],
[
"dry-run",
"n",
"don't actually do anything"
],
[
"help",
"h",
"show detailed help message"
],
[
"no-user-cfg",
null,
"ignore pydistutils.cfg in your home directory"
]
],
"have_run": {
"dumpmeta": 0
},
"headers": null,
"help": 0,
"help_commands": 0,
"include_dirs": null,
"include_package_data": null,
"install_requires": [],
"keywords": 0,
"libraries": null,
"licence": 0,
"license": 0,
"long_description": 0,
"maintainer": 0,
"maintainer_email": 0,
"metadata": {
"__class__": "DistributionMetadata",
"methods": {
"get_author": null,
"get_author_email": null,
"get_classifiers": [],
"get_contact": null,
"get_contact_email": null,
"get_description": null,
"get_download_url": null,
"get_fullname": "mypackage-1.2.3",
"get_keywords": [],
"get_licence": "Mock License 1.0\n\nThis is a dummy license text to check how setuptools represents\nit in the metadata so it can be exposed to pyproject.toml.",
"get_license": "Mock License 1.0\n\nThis is a dummy license text to check how setuptools represents\nit in the metadata so it can be exposed to pyproject.toml.",
"get_long_description": null,
"get_maintainer": null,
"get_maintainer_email": null,
"get_metadata_version": "<Version('2.1')>",
"get_name": "mypackage",
"get_obsoletes": [],
"get_platforms": null,
"get_provides": [],
"get_requires": [],
"get_url": null,
"get_version": "1.2.3",
"read_pkg_file": "<not getter>",
"set_classifiers": "<not getter>",
"set_keywords": "<not getter>",
"set_obsoletes": "<not getter>",
"set_platforms": "<not getter>",
"set_provides": "<not getter>",
"set_requires": "<not getter>",
"write_pkg_file": "<not getter>",
"write_pkg_info": "<not getter>"
},
"properties": {
"author": null,
"author_email": null,
"classifiers": null,
"description": null,
"download_url": null,
"keywords": null,
"license": "Mock License 1.0\n\nThis is a dummy license text to check how setuptools represents\nit in the metadata so it can be exposed to pyproject.toml.",
"license_file": null,
"license_files": [],
"long_description": null,
"long_description_content_type": null,
"maintainer": null,
"maintainer_email": null,
"name": "mypackage",
"obsoletes": null,
"platforms": null,
"project_urls": {},
"provides": null,
"provides_extras": "OrderedSet()",
"requires": null,
"url": null,
"version": "1.2.3"
}
},
"name": 0,
"namespace_packages": null,
"negative_opt": {
"quiet": "verbose"
},
"obsoletes": 0,
"package_data": {},
"package_dir": {},
"packages": [],
"password": "",
"platforms": 0,
"provides": 0,
"py_modules": [],
"python_requires": null,
"requires": 0,
"script_args": [
"dumpmeta"
],
"script_name": "setup.py",
"scripts": null,
"setup_requires": [],
"src_root": null,
"test_loader": null,
"test_runner": null,
"test_suite": null,
"tests_require": null,
"url": 0,
"use_2to3": null,
"verbose": 1,
"version": 0,
"want_user_cfg": true,
"zip_safe": null
}
}
+ tail -n +0 LICENSE.txt setup.py
==> LICENSE.txt <==
Mock License 1.0
This is a dummy license text to see how setuptools represents such content
stored in a separate file referenced from setup.py
==> setup.py <==
import setuptools
setuptools.setup(
name="mypackage",
version="1.2.3",
license="file:LICENSE.txt"
)
+ python3 setup.py --license
file:LICENSE.txt
+ python3 setup.py dumpmeta
running dumpmeta
{
"__class__": "Distribution",
"methods": {
"announce": "<not getter>",
"dump_option_dicts": "<not getter>",
"exclude": "<not getter>",
"exclude_package": "<not getter>",
"fetch_build_egg": "<not getter>",
"fetch_build_eggs": "<not getter>",
"finalize_options": "<not getter>",
"find_config_files": "<not getter>",
"get_author": null,
"get_author_email": null,
"get_classifiers": [],
"get_cmdline_options": {},
"get_command_class": "<not callable>",
"get_command_list": [
[
"build",
"build everything needed to install"
],
[
"build_py",
"\"build\" pure Python modules (copy to build directory)"
],
[
"build_ext",
"build C/C++ extensions (compile/link to build directory)"
],
[
"build_clib",
"build C/C++ libraries used by Python extensions"
],
[
"build_scripts",
"\"build\" scripts (copy and fixup #! line)"
],
[
"clean",
"clean up temporary files from 'build' command"
],
[
"install",
"install everything from build directory"
],
[
"install_lib",
"install all Python modules (extensions and pure Python)"
],
[
"install_headers",
"install C/C++ header files"
],
[
"install_scripts",
"install scripts (Python or otherwise)"
],
[
"install_data",
"install data files"
],
[
"sdist",
"create a source distribution (tarball, zip file, etc.)"
],
[
"register",
"register the distribution with the Python package index"
],
[
"bdist",
"create a built (binary) distribution"
],
[
"bdist_dumb",
"create a \"dumb\" built distribution"
],
[
"bdist_rpm",
"create an RPM distribution"
],
[
"check",
"perform some checks on the package"
],
[
"upload",
"upload binary package to PyPI"
],
[
"dumpmeta",
"(no description available)"
],
[
"pyproject",
"(no description available)"
],
[
"alias",
"define a shortcut to invoke one or more commands"
],
[
"bdist_egg",
"create an \"egg\" distribution"
],
[
"develop",
"install package in 'development mode'"
],
[
"dist_info",
"DO NOT CALL DIRECTLY, INTERNAL ONLY: create .dist-info directory"
],
[
"easy_install",
"Find/get/install Python packages"
],
[
"editable_wheel",
"DO NOT CALL DIRECTLY, INTERNAL ONLY: create PEP 660 editable wheel"
],
[
"egg_info",
"create a distribution's .egg-info directory"
],
[
"install_egg_info",
"Install an .egg-info directory for the package"
],
[
"rotate",
"delete older distributions, keeping N newest files"
],
[
"saveopts",
"save supplied options to setup.cfg or other config file"
],
[
"setopt",
"set an option in setup.cfg or another config file"
],
[
"test",
"run unit tests after in-place build (deprecated)"
],
[
"upload_docs",
"Upload documentation to sites other than PyPi such as devpi"
]
],
"get_command_obj": "<not callable>",
"get_command_packages": [
"distutils.command"
],
"get_contact": null,
"get_contact_email": null,
"get_description": null,
"get_download_url": null,
"get_egg_cache_dir": "./.eggs",
"get_fullname": "mypackage-1.2.3",
"get_keywords": [],
"get_license": "file:LICENSE.txt",
"get_long_description": null,
"get_maintainer": null,
"get_maintainer_email": null,
"get_name": "mypackage",
"get_obsoletes": [],
"get_option_dict": "<not callable>",
"get_platforms": null,
"get_provides": [],
"get_requires": [],
"get_url": null,
"get_version": "1.2.3",
"handle_display_options": "<not getter>",
"has_c_libraries": null,
"has_contents_for": "<not callable>",
"has_data_files": null,
"has_ext_modules": null,
"has_headers": null,
"has_modules": null,
"has_pure_modules": false,
"has_scripts": null,
"include": "<not getter>",
"is_pure": false,
"iter_distribution_names": "<not getter>",
"make_option_lowercase": "<not getter>",
"parse_command_line": "<not getter>",
"parse_config_files": "<not getter>",
"patch_missing_pkg_info": "<not getter>",
"print_command_list": "<not getter>",
"print_commands": "<not getter>",
"reinitialize_command": "<not getter>",
"run_command": "<not getter>",
"run_commands": "<not getter>",
"set_defaults": "<not getter>",
"warn_dash_deprecation": "<not getter>"
},
"properties": {
"author": 0,
"author_email": 0,
"classifiers": 0,
"cmdclass": {
"alias": "<class 'setuptools.command.alias.alias'>",
"bdist": "<class 'distutils.command.bdist.bdist'>",
"bdist_dumb": "<class 'distutils.command.bdist_dumb.bdist_dumb'>",
"bdist_egg": "<class 'setuptools.command.bdist_egg.bdist_egg'>",
"bdist_rpm": "<class 'setuptools.command.bdist_rpm.bdist_rpm'>",
"build": "<class 'setuptools.command.build.build'>",
"build_clib": "<class 'setuptools.command.build_clib.build_clib'>",
"build_ext": "<class 'setuptools.command.build_ext.build_ext'>",
"build_py": "<class 'setuptools.command.build_py.build_py'>",
"build_scripts": "<class 'distutils.command.build_scripts.build_scripts'>",
"check": "<class 'distutils.command.check.check'>",
"clean": "<class 'distutils.command.clean.clean'>",
"develop": "<class 'setuptools.command.develop.develop'>",
"dist_info": "<class 'setuptools.command.dist_info.dist_info'>",
"dumpmeta": "<class 'setuptools_pyproject_migration.dumpmeta.DumpMetadata'>",
"easy_install": "<class 'setuptools.command.easy_install.easy_install'>",
"editable_wheel": "<class 'setuptools.command.editable_wheel.editable_wheel'>",
"egg_info": "<class 'setuptools.command.egg_info.egg_info'>",
"install": "<class 'setuptools.command.install.install'>",
"install_data": "<class 'distutils.command.install_data.install_data'>",
"install_egg_info": "<class 'setuptools.command.install_egg_info.install_egg_info'>",
"install_headers": "<class 'distutils.command.install_headers.install_headers'>",
"install_lib": "<class 'setuptools.command.install_lib.install_lib'>",
"install_scripts": "<class 'setuptools.command.install_scripts.install_scripts'>",
"pyproject": "<class 'setuptools_pyproject_migration.WritePyproject'>",
"register": "<class 'distutils.command.register.register'>",
"rotate": "<class 'setuptools.command.rotate.rotate'>",
"saveopts": "<class 'setuptools.command.saveopts.saveopts'>",
"sdist": "<class 'setuptools.command.sdist.sdist'>",
"setopt": "<class 'setuptools.command.setopt.setopt'>",
"test": "<class 'setuptools.command.test.test'>",
"upload": "<class 'distutils.command.upload.upload'>",
"upload_docs": "<class 'setuptools.command.upload_docs.upload_docs'>"
},
"command_obj": {
"dumpmeta": "<setuptools_pyproject_migration.dumpmeta.DumpMetadata object at 0x7f73331947d0>"
},
"command_options": {
"aliases": {},
"dumpmeta": {}
},
"command_packages": null,
"commands": [
"dumpmeta"
],
"common_usage": "Common commands: (see '--help-commands' for more)\n\n setup.py build will build the package underneath 'build/'\n setup.py install will install the package\n",
"contact": 0,
"contact_email": 0,
"data_files": null,
"dependency_links": [],
"description": 0,
"display_option_names": [
"help_commands",
"name",
"version",
"fullname",
"author",
"author_email",
"maintainer",
"maintainer_email",
"contact",
"contact_email",
"url",
"license",
"licence",
"description",
"long_description",
"platforms",
"classifiers",
"keywords",
"provides",
"requires",
"obsoletes"
],
"display_options": [
[
"help-commands",
null,
"list all available commands"
],
[
"name",
null,
"print package name"
],
[
"version",
"V",
"print package version"
],
[
"fullname",
null,
"print <package name>-<version>"
],
[
"author",
null,
"print the author's name"
],
[
"author-email",
null,
"print the author's email address"
],
[
"maintainer",
null,
"print the maintainer's name"
],
[
"maintainer-email",
null,
"print the maintainer's email address"
],
[
"contact",
null,
"print the maintainer's name if known, else the author's"
],
[
"contact-email",
null,
"print the maintainer's email address if known, else the author's"
],
[
"url",
null,
"print the URL for this package"
],
[
"license",
null,
"print the license of the package"
],
[
"licence",
null,
"alias for --license"
],
[
"description",
null,
"print the package description"
],
[
"long-description",
null,
"print the long package description"
],
[
"platforms",
null,
"print the list of platforms"
],
[
"classifiers",
null,
"print the list of classifiers"
],
[
"keywords",
null,
"print the list of keywords"
],
[
"provides",
null,
"print the list of packages/modules provided"
],
[
"requires",
null,
"print the list of packages/modules required"
],
[
"obsoletes",
null,
"print the list of packages/modules made obsolete"
]
],
"dist_files": [],
"dry_run": 0,
"eager_resources": null,
"entry_points": null,
"exclude_package_data": null,
"ext_modules": null,
"ext_package": null,
"extra_path": null,
"extras_require": {},
"fullname": 0,
"global_options": [
[
"verbose",
"v",
"run verbosely (default)",
1
],
[
"quiet",
"q",
"run quietly (turns verbosity off)"
],
[
"dry-run",
"n",
"don't actually do anything"
],
[
"help",
"h",
"show detailed help message"
],
[
"no-user-cfg",
null,
"ignore pydistutils.cfg in your home directory"
]
],
"have_run": {
"dumpmeta": 0
},
"headers": null,
"help": 0,
"help_commands": 0,
"include_dirs": null,
"include_package_data": null,
"install_requires": [],
"keywords": 0,
"libraries": null,
"licence": 0,
"license": 0,
"long_description": 0,
"maintainer": 0,
"maintainer_email": 0,
"metadata": {
"__class__": "DistributionMetadata",
"methods": {
"get_author": null,
"get_author_email": null,
"get_classifiers": [],
"get_contact": null,
"get_contact_email": null,
"get_description": null,
"get_download_url": null,
"get_fullname": "mypackage-1.2.3",
"get_keywords": [],
"get_licence": "file:LICENSE.txt",
"get_license": "file:LICENSE.txt",
"get_long_description": null,
"get_maintainer": null,
"get_maintainer_email": null,
"get_metadata_version": "<Version('2.1')>",
"get_name": "mypackage",
"get_obsoletes": [],
"get_platforms": null,
"get_provides": [],
"get_requires": [],
"get_url": null,
"get_version": "1.2.3",
"read_pkg_file": "<not getter>",
"set_classifiers": "<not getter>",
"set_keywords": "<not getter>",
"set_obsoletes": "<not getter>",
"set_platforms": "<not getter>",
"set_provides": "<not getter>",
"set_requires": "<not getter>",
"write_pkg_file": "<not getter>",
"write_pkg_info": "<not getter>"
},
"properties": {
"author": null,
"author_email": null,
"classifiers": null,
"description": null,
"download_url": null,
"keywords": null,
"license": "file:LICENSE.txt",
"license_file": null,
"license_files": [
"LICENSE.txt"
],
"long_description": null,
"long_description_content_type": null,
"maintainer": null,
"maintainer_email": null,
"name": "mypackage",
"obsoletes": null,
"platforms": null,
"project_urls": {},
"provides": null,
"provides_extras": "OrderedSet()",
"requires": null,
"url": null,
"version": "1.2.3"
}
},
"name": 0,
"namespace_packages": null,
"negative_opt": {
"quiet": "verbose"
},
"obsoletes": 0,
"package_data": {},
"package_dir": {},
"packages": [],
"password": "",
"platforms": 0,
"provides": 0,
"py_modules": [],
"python_requires": null,
"requires": 0,
"script_args": [
"dumpmeta"
],
"script_name": "setup.py",
"scripts": null,
"setup_requires": [],
"src_root": null,
"test_loader": null,
"test_runner": null,
"test_suite": null,
"tests_require": null,
"url": 0,
"use_2to3": null,
"verbose": 1,
"version": 0,
"want_user_cfg": true,
"zip_safe": null
}
}
+ tail -n +0 LICENSE.txt setup.py
==> LICENSE.txt <==
Mock License 1.0
This is a dummy license text to see how setuptools represents such content
stored in a separate file referenced from setup.py
==> setup.py <==
import setuptools
setuptools.setup(
name="mypackage",
version="1.2.3",
license_file="LICENSE.txt"
)
+ python3 setup.py --license
None
+ python3 setup.py dumpmeta
running dumpmeta
{
"__class__": "Distribution",
"methods": {
"announce": "<not getter>",
"dump_option_dicts": "<not getter>",
"exclude": "<not getter>",
"exclude_package": "<not getter>",
"fetch_build_egg": "<not getter>",
"fetch_build_eggs": "<not getter>",
"finalize_options": "<not getter>",
"find_config_files": "<not getter>",
"get_author": null,
"get_author_email": null,
"get_classifiers": [],
"get_cmdline_options": {},
"get_command_class": "<not callable>",
"get_command_list": [
[
"build",
"build everything needed to install"
],
[
"build_py",
"\"build\" pure Python modules (copy to build directory)"
],
[
"build_ext",
"build C/C++ extensions (compile/link to build directory)"
],
[
"build_clib",
"build C/C++ libraries used by Python extensions"
],
[
"build_scripts",
"\"build\" scripts (copy and fixup #! line)"
],
[
"clean",
"clean up temporary files from 'build' command"
],
[
"install",
"install everything from build directory"
],
[
"install_lib",
"install all Python modules (extensions and pure Python)"
],
[
"install_headers",
"install C/C++ header files"
],
[
"install_scripts",
"install scripts (Python or otherwise)"
],
[
"install_data",
"install data files"
],
[
"sdist",
"create a source distribution (tarball, zip file, etc.)"
],
[
"register",
"register the distribution with the Python package index"
],
[
"bdist",
"create a built (binary) distribution"
],
[
"bdist_dumb",
"create a \"dumb\" built distribution"
],
[
"bdist_rpm",
"create an RPM distribution"
],
[
"check",
"perform some checks on the package"
],
[
"upload",
"upload binary package to PyPI"
],
[
"dumpmeta",
"(no description available)"
],
[
"pyproject",
"(no description available)"
],
[
"alias",
"define a shortcut to invoke one or more commands"
],
[
"bdist_egg",
"create an \"egg\" distribution"
],
[
"develop",
"install package in 'development mode'"
],
[
"dist_info",
"DO NOT CALL DIRECTLY, INTERNAL ONLY: create .dist-info directory"
],
[
"easy_install",
"Find/get/install Python packages"
],
[
"editable_wheel",
"DO NOT CALL DIRECTLY, INTERNAL ONLY: create PEP 660 editable wheel"
],
[
"egg_info",
"create a distribution's .egg-info directory"
],
[
"install_egg_info",
"Install an .egg-info directory for the package"
],
[
"rotate",
"delete older distributions, keeping N newest files"
],
[
"saveopts",
"save supplied options to setup.cfg or other config file"
],
[
"setopt",
"set an option in setup.cfg or another config file"
],
[
"test",
"run unit tests after in-place build (deprecated)"
],
[
"upload_docs",
"Upload documentation to sites other than PyPi such as devpi"
]
],
"get_command_obj": "<not callable>",
"get_command_packages": [
"distutils.command"
],
"get_contact": null,
"get_contact_email": null,
"get_description": null,
"get_download_url": null,
"get_egg_cache_dir": "./.eggs",
"get_fullname": "mypackage-1.2.3",
"get_keywords": [],
"get_license": null,
"get_long_description": null,
"get_maintainer": null,
"get_maintainer_email": null,
"get_name": "mypackage",
"get_obsoletes": [],
"get_option_dict": "<not callable>",
"get_platforms": null,
"get_provides": [],
"get_requires": [],
"get_url": null,
"get_version": "1.2.3",
"handle_display_options": "<not getter>",
"has_c_libraries": null,
"has_contents_for": "<not callable>",
"has_data_files": null,
"has_ext_modules": null,
"has_headers": null,
"has_modules": null,
"has_pure_modules": false,
"has_scripts": null,
"include": "<not getter>",
"is_pure": false,
"iter_distribution_names": "<not getter>",
"make_option_lowercase": "<not getter>",
"parse_command_line": "<not getter>",
"parse_config_files": "<not getter>",
"patch_missing_pkg_info": "<not getter>",
"print_command_list": "<not getter>",
"print_commands": "<not getter>",
"reinitialize_command": "<not getter>",
"run_command": "<not getter>",
"run_commands": "<not getter>",
"set_defaults": "<not getter>",
"warn_dash_deprecation": "<not getter>"
},
"properties": {
"author": 0,
"author_email": 0,
"classifiers": 0,
"cmdclass": {
"alias": "<class 'setuptools.command.alias.alias'>",
"bdist": "<class 'distutils.command.bdist.bdist'>",
"bdist_dumb": "<class 'distutils.command.bdist_dumb.bdist_dumb'>",
"bdist_egg": "<class 'setuptools.command.bdist_egg.bdist_egg'>",
"bdist_rpm": "<class 'setuptools.command.bdist_rpm.bdist_rpm'>",
"build": "<class 'setuptools.command.build.build'>",
"build_clib": "<class 'setuptools.command.build_clib.build_clib'>",
"build_ext": "<class 'setuptools.command.build_ext.build_ext'>",
"build_py": "<class 'setuptools.command.build_py.build_py'>",
"build_scripts": "<class 'distutils.command.build_scripts.build_scripts'>",
"check": "<class 'distutils.command.check.check'>",
"clean": "<class 'distutils.command.clean.clean'>",
"develop": "<class 'setuptools.command.develop.develop'>",
"dist_info": "<class 'setuptools.command.dist_info.dist_info'>",
"dumpmeta": "<class 'setuptools_pyproject_migration.dumpmeta.DumpMetadata'>",
"easy_install": "<class 'setuptools.command.easy_install.easy_install'>",
"editable_wheel": "<class 'setuptools.command.editable_wheel.editable_wheel'>",
"egg_info": "<class 'setuptools.command.egg_info.egg_info'>",
"install": "<class 'setuptools.command.install.install'>",
"install_data": "<class 'distutils.command.install_data.install_data'>",
"install_egg_info": "<class 'setuptools.command.install_egg_info.install_egg_info'>",
"install_headers": "<class 'distutils.command.install_headers.install_headers'>",
"install_lib": "<class 'setuptools.command.install_lib.install_lib'>",
"install_scripts": "<class 'setuptools.command.install_scripts.install_scripts'>",
"pyproject": "<class 'setuptools_pyproject_migration.WritePyproject'>",
"register": "<class 'distutils.command.register.register'>",
"rotate": "<class 'setuptools.command.rotate.rotate'>",
"saveopts": "<class 'setuptools.command.saveopts.saveopts'>",
"sdist": "<class 'setuptools.command.sdist.sdist'>",
"setopt": "<class 'setuptools.command.setopt.setopt'>",
"test": "<class 'setuptools.command.test.test'>",
"upload": "<class 'distutils.command.upload.upload'>",
"upload_docs": "<class 'setuptools.command.upload_docs.upload_docs'>"
},
"command_obj": {
"dumpmeta": "<setuptools_pyproject_migration.dumpmeta.DumpMetadata object at 0x7fbcb8d5ee90>"
},
"command_options": {
"aliases": {},
"dumpmeta": {}
},
"command_packages": null,
"commands": [
"dumpmeta"
],
"common_usage": "Common commands: (see '--help-commands' for more)\n\n setup.py build will build the package underneath 'build/'\n setup.py install will install the package\n",
"contact": 0,
"contact_email": 0,
"data_files": null,
"dependency_links": [],
"description": 0,
"display_option_names": [
"help_commands",
"name",
"version",
"fullname",
"author",
"author_email",
"maintainer",
"maintainer_email",
"contact",
"contact_email",
"url",
"license",
"licence",
"description",
"long_description",
"platforms",
"classifiers",
"keywords",
"provides",
"requires",
"obsoletes"
],
"display_options": [
[
"help-commands",
null,
"list all available commands"
],
[
"name",
null,
"print package name"
],
[
"version",
"V",
"print package version"
],
[
"fullname",
null,
"print <package name>-<version>"
],
[
"author",
null,
"print the author's name"
],
[
"author-email",
null,
"print the author's email address"
],
[
"maintainer",
null,
"print the maintainer's name"
],
[
"maintainer-email",
null,
"print the maintainer's email address"
],
[
"contact",
null,
"print the maintainer's name if known, else the author's"
],
[
"contact-email",
null,
"print the maintainer's email address if known, else the author's"
],
[
"url",
null,
"print the URL for this package"
],
[
"license",
null,
"print the license of the package"
],
[
"licence",
null,
"alias for --license"
],
[
"description",
null,
"print the package description"
],
[
"long-description",
null,
"print the long package description"
],
[
"platforms",
null,
"print the list of platforms"
],
[
"classifiers",
null,
"print the list of classifiers"
],
[
"keywords",
null,
"print the list of keywords"
],
[
"provides",
null,
"print the list of packages/modules provided"
],
[
"requires",
null,
"print the list of packages/modules required"
],
[
"obsoletes",
null,
"print the list of packages/modules made obsolete"
]
],
"dist_files": [],
"dry_run": 0,
"eager_resources": null,
"entry_points": null,
"exclude_package_data": null,
"ext_modules": null,
"ext_package": null,
"extra_path": null,
"extras_require": {},
"fullname": 0,
"global_options": [
[
"verbose",
"v",
"run verbosely (default)",
1
],
[
"quiet",
"q",
"run quietly (turns verbosity off)"
],
[
"dry-run",
"n",
"don't actually do anything"
],
[
"help",
"h",
"show detailed help message"
],
[
"no-user-cfg",
null,
"ignore pydistutils.cfg in your home directory"
]
],
"have_run": {
"dumpmeta": 0
},
"headers": null,
"help": 0,
"help_commands": 0,
"include_dirs": null,
"include_package_data": null,
"install_requires": [],
"keywords": 0,
"libraries": null,
"licence": 0,
"license": 0,
"long_description": 0,
"maintainer": 0,
"maintainer_email": 0,
"metadata": {
"__class__": "DistributionMetadata",
"methods": {
"get_author": null,
"get_author_email": null,
"get_classifiers": [],
"get_contact": null,
"get_contact_email": null,
"get_description": null,
"get_download_url": null,
"get_fullname": "mypackage-1.2.3",
"get_keywords": [],
"get_licence": null,
"get_license": null,
"get_long_description": null,
"get_maintainer": null,
"get_maintainer_email": null,
"get_metadata_version": "<Version('2.1')>",
"get_name": "mypackage",
"get_obsoletes": [],
"get_platforms": null,
"get_provides": [],
"get_requires": [],
"get_url": null,
"get_version": "1.2.3",
"read_pkg_file": "<not getter>",
"set_classifiers": "<not getter>",
"set_keywords": "<not getter>",
"set_obsoletes": "<not getter>",
"set_platforms": "<not getter>",
"set_provides": "<not getter>",
"set_requires": "<not getter>",
"write_pkg_file": "<not getter>",
"write_pkg_info": "<not getter>"
},
"properties": {
"author": null,
"author_email": null,
"classifiers": null,
"description": null,
"download_url": null,
"keywords": null,
"license": null,
"license_file": "LICENSE.txt",
"license_files": [
"LICENSE.txt"
],
"long_description": null,
"long_description_content_type": null,
"maintainer": null,
"maintainer_email": null,
"name": "mypackage",
"obsoletes": null,
"platforms": null,
"project_urls": {},
"provides": null,
"provides_extras": "OrderedSet()",
"requires": null,
"url": null,
"version": "1.2.3"
}
},
"name": 0,
"namespace_packages": null,
"negative_opt": {
"quiet": "verbose"
},
"obsoletes": 0,
"package_data": {},
"package_dir": {},
"packages": [],
"password": "",
"platforms": 0,
"provides": 0,
"py_modules": [],
"python_requires": null,
"requires": 0,
"script_args": [
"dumpmeta"
],
"script_name": "setup.py",
"scripts": null,
"setup_requires": [],
"src_root": null,
"test_loader": null,
"test_runner": null,
"test_suite": null,
"tests_require": null,
"url": 0,
"use_2to3": null,
"verbose": 1,
"version": 0,
"want_user_cfg": true,
"zip_safe": null
}
}
+ tail -n +0 LICENSE.txt setup.py
==> LICENSE.txt <==
Mock License 1.0
This is a dummy license text to see how setuptools represents such content
stored in a separate file referenced from setup.py
==> setup.py <==
import setuptools
setuptools.setup(
name="mypackage",
version="1.2.3",
license_file="LICENSE.txt"
)
+ python3 setup.py --license
None
+ python3 setup.py dumpmeta
running dumpmeta
{
"__class__": "Distribution",
"methods": {
"announce": "<not getter>",
"dump_option_dicts": "<not getter>",
"exclude": "<not getter>",
"exclude_package": "<not getter>",
"fetch_build_egg": "<not getter>",
"fetch_build_eggs": "<not getter>",
"finalize_options": "<not getter>",
"find_config_files": "<not getter>",
"get_author": null,
"get_author_email": null,
"get_classifiers": [],
"get_cmdline_options": {},
"get_command_class": "<not callable>",
"get_command_list": [
[
"build",
"build everything needed to install"
],
[
"build_py",
"\"build\" pure Python modules (copy to build directory)"
],
[
"build_ext",
"build C/C++ extensions (compile/link to build directory)"
],
[
"build_clib",
"build C/C++ libraries used by Python extensions"
],
[
"build_scripts",
"\"build\" scripts (copy and fixup #! line)"
],
[
"clean",
"clean up temporary files from 'build' command"
],
[
"install",
"install everything from build directory"
],
[
"install_lib",
"install all Python modules (extensions and pure Python)"
],
[
"install_headers",
"install C/C++ header files"
],
[
"install_scripts",
"install scripts (Python or otherwise)"
],
[
"install_data",
"install data files"
],
[
"sdist",
"create a source distribution (tarball, zip file, etc.)"
],
[
"register",
"register the distribution with the Python package index"
],
[
"bdist",
"create a built (binary) distribution"
],
[
"bdist_dumb",
"create a \"dumb\" built distribution"
],
[
"bdist_rpm",
"create an RPM distribution"
],
[
"check",
"perform some checks on the package"
],
[
"upload",
"upload binary package to PyPI"
],
[
"dumpmeta",
"(no description available)"
],
[
"pyproject",
"(no description available)"
],
[
"alias",
"define a shortcut to invoke one or more commands"
],
[
"bdist_egg",
"create an \"egg\" distribution"
],
[
"develop",
"install package in 'development mode'"
],
[
"dist_info",
"DO NOT CALL DIRECTLY, INTERNAL ONLY: create .dist-info directory"
],
[
"easy_install",
"Find/get/install Python packages"
],
[
"editable_wheel",
"DO NOT CALL DIRECTLY, INTERNAL ONLY: create PEP 660 editable wheel"
],
[
"egg_info",
"create a distribution's .egg-info directory"
],
[
"install_egg_info",
"Install an .egg-info directory for the package"
],
[
"rotate",
"delete older distributions, keeping N newest files"
],
[
"saveopts",
"save supplied options to setup.cfg or other config file"
],
[
"setopt",
"set an option in setup.cfg or another config file"
],
[
"test",
"run unit tests after in-place build (deprecated)"
],
[
"upload_docs",
"Upload documentation to sites other than PyPi such as devpi"
]
],
"get_command_obj": "<not callable>",
"get_command_packages": [
"distutils.command"
],
"get_contact": null,
"get_contact_email": null,
"get_description": null,
"get_download_url": null,
"get_egg_cache_dir": "./.eggs",
"get_fullname": "mypackage-1.2.3",
"get_keywords": [],
"get_license": null,
"get_long_description": null,
"get_maintainer": null,
"get_maintainer_email": null,
"get_name": "mypackage",
"get_obsoletes": [],
"get_option_dict": "<not callable>",
"get_platforms": null,
"get_provides": [],
"get_requires": [],
"get_url": null,
"get_version": "1.2.3",
"handle_display_options": "<not getter>",
"has_c_libraries": null,
"has_contents_for": "<not callable>",
"has_data_files": null,
"has_ext_modules": null,
"has_headers": null,
"has_modules": null,
"has_pure_modules": false,
"has_scripts": null,
"include": "<not getter>",
"is_pure": false,
"iter_distribution_names": "<not getter>",
"make_option_lowercase": "<not getter>",
"parse_command_line": "<not getter>",
"parse_config_files": "<not getter>",
"patch_missing_pkg_info": "<not getter>",
"print_command_list": "<not getter>",
"print_commands": "<not getter>",
"reinitialize_command": "<not getter>",
"run_command": "<not getter>",
"run_commands": "<not getter>",
"set_defaults": "<not getter>",
"warn_dash_deprecation": "<not getter>"
},
"properties": {
"author": 0,
"author_email": 0,
"classifiers": 0,
"cmdclass": {
"alias": "<class 'setuptools.command.alias.alias'>",
"bdist": "<class 'distutils.command.bdist.bdist'>",
"bdist_dumb": "<class 'distutils.command.bdist_dumb.bdist_dumb'>",
"bdist_egg": "<class 'setuptools.command.bdist_egg.bdist_egg'>",
"bdist_rpm": "<class 'setuptools.command.bdist_rpm.bdist_rpm'>",
"build": "<class 'setuptools.command.build.build'>",
"build_clib": "<class 'setuptools.command.build_clib.build_clib'>",
"build_ext": "<class 'setuptools.command.build_ext.build_ext'>",
"build_py": "<class 'setuptools.command.build_py.build_py'>",
"build_scripts": "<class 'distutils.command.build_scripts.build_scripts'>",
"check": "<class 'distutils.command.check.check'>",
"clean": "<class 'distutils.command.clean.clean'>",
"develop": "<class 'setuptools.command.develop.develop'>",
"dist_info": "<class 'setuptools.command.dist_info.dist_info'>",
"dumpmeta": "<class 'setuptools_pyproject_migration.dumpmeta.DumpMetadata'>",
"easy_install": "<class 'setuptools.command.easy_install.easy_install'>",
"editable_wheel": "<class 'setuptools.command.editable_wheel.editable_wheel'>",
"egg_info": "<class 'setuptools.command.egg_info.egg_info'>",
"install": "<class 'setuptools.command.install.install'>",
"install_data": "<class 'distutils.command.install_data.install_data'>",
"install_egg_info": "<class 'setuptools.command.install_egg_info.install_egg_info'>",
"install_headers": "<class 'distutils.command.install_headers.install_headers'>",
"install_lib": "<class 'setuptools.command.install_lib.install_lib'>",
"install_scripts": "<class 'setuptools.command.install_scripts.install_scripts'>",
"pyproject": "<class 'setuptools_pyproject_migration.WritePyproject'>",
"register": "<class 'distutils.command.register.register'>",
"rotate": "<class 'setuptools.command.rotate.rotate'>",
"saveopts": "<class 'setuptools.command.saveopts.saveopts'>",
"sdist": "<class 'setuptools.command.sdist.sdist'>",
"setopt": "<class 'setuptools.command.setopt.setopt'>",
"test": "<class 'setuptools.command.test.test'>",
"upload": "<class 'distutils.command.upload.upload'>",
"upload_docs": "<class 'setuptools.command.upload_docs.upload_docs'>"
},
"command_obj": {
"dumpmeta": "<setuptools_pyproject_migration.dumpmeta.DumpMetadata object at 0x7f952f660050>"
},
"command_options": {
"aliases": {},
"dumpmeta": {}
},
"command_packages": null,
"commands": [
"dumpmeta"
],
"common_usage": "Common commands: (see '--help-commands' for more)\n\n setup.py build will build the package underneath 'build/'\n setup.py install will install the package\n",
"contact": 0,
"contact_email": 0,
"data_files": null,
"dependency_links": [],
"description": 0,
"display_option_names": [
"help_commands",
"name",
"version",
"fullname",
"author",
"author_email",
"maintainer",
"maintainer_email",
"contact",
"contact_email",
"url",
"license",
"licence",
"description",
"long_description",
"platforms",
"classifiers",
"keywords",
"provides",
"requires",
"obsoletes"
],
"display_options": [
[
"help-commands",
null,
"list all available commands"
],
[
"name",
null,
"print package name"
],
[
"version",
"V",
"print package version"
],
[
"fullname",
null,
"print <package name>-<version>"
],
[
"author",
null,
"print the author's name"
],
[
"author-email",
null,
"print the author's email address"
],
[
"maintainer",
null,
"print the maintainer's name"
],
[
"maintainer-email",
null,
"print the maintainer's email address"
],
[
"contact",
null,
"print the maintainer's name if known, else the author's"
],
[
"contact-email",
null,
"print the maintainer's email address if known, else the author's"
],
[
"url",
null,
"print the URL for this package"
],
[
"license",
null,
"print the license of the package"
],
[
"licence",
null,
"alias for --license"
],
[
"description",
null,
"print the package description"
],
[
"long-description",
null,
"print the long package description"
],
[
"platforms",
null,
"print the list of platforms"
],
[
"classifiers",
null,
"print the list of classifiers"
],
[
"keywords",
null,
"print the list of keywords"
],
[
"provides",
null,
"print the list of packages/modules provided"
],
[
"requires",
null,
"print the list of packages/modules required"
],
[
"obsoletes",
null,
"print the list of packages/modules made obsolete"
]
],
"dist_files": [],
"dry_run": 0,
"eager_resources": null,
"entry_points": null,
"exclude_package_data": null,
"ext_modules": null,
"ext_package": null,
"extra_path": null,
"extras_require": {},
"fullname": 0,
"global_options": [
[
"verbose",
"v",
"run verbosely (default)",
1
],
[
"quiet",
"q",
"run quietly (turns verbosity off)"
],
[
"dry-run",
"n",
"don't actually do anything"
],
[
"help",
"h",
"show detailed help message"
],
[
"no-user-cfg",
null,
"ignore pydistutils.cfg in your home directory"
]
],
"have_run": {
"dumpmeta": 0
},
"headers": null,
"help": 0,
"help_commands": 0,
"include_dirs": null,
"include_package_data": null,
"install_requires": [],
"keywords": 0,
"libraries": null,
"licence": 0,
"license": 0,
"long_description": 0,
"maintainer": 0,
"maintainer_email": 0,
"metadata": {
"__class__": "DistributionMetadata",
"methods": {
"get_author": null,
"get_author_email": null,
"get_classifiers": [],
"get_contact": null,
"get_contact_email": null,
"get_description": null,
"get_download_url": null,
"get_fullname": "mypackage-1.2.3",
"get_keywords": [],
"get_licence": null,
"get_license": null,
"get_long_description": null,
"get_maintainer": null,
"get_maintainer_email": null,
"get_metadata_version": "<Version('2.1')>",
"get_name": "mypackage",
"get_obsoletes": [],
"get_platforms": null,
"get_provides": [],
"get_requires": [],
"get_url": null,
"get_version": "1.2.3",
"read_pkg_file": "<not getter>",
"set_classifiers": "<not getter>",
"set_keywords": "<not getter>",
"set_obsoletes": "<not getter>",
"set_platforms": "<not getter>",
"set_provides": "<not getter>",
"set_requires": "<not getter>",
"write_pkg_file": "<not getter>",
"write_pkg_info": "<not getter>"
},
"properties": {
"author": null,
"author_email": null,
"classifiers": null,
"description": null,
"download_url": null,
"keywords": null,
"license": null,
"license_file": "LICENSE.txt",
"license_files": [
"LICENSE.txt"
],
"long_description": null,
"long_description_content_type": null,
"maintainer": null,
"maintainer_email": null,
"name": "mypackage",
"obsoletes": null,
"platforms": null,
"project_urls": {},
"provides": null,
"provides_extras": "OrderedSet()",
"requires": null,
"url": null,
"version": "1.2.3"
}
},
"name": 0,
"namespace_packages": null,
"negative_opt": {
"quiet": "verbose"
},
"obsoletes": 0,
"package_data": {},
"package_dir": {},
"packages": [],
"password": "",
"platforms": 0,
"provides": 0,
"py_modules": [],
"python_requires": null,
"requires": 0,
"script_args": [
"dumpmeta"
],
"script_name": "setup.py",
"scripts": null,
"setup_requires": [],
"src_root": null,
"test_loader": null,
"test_runner": null,
"test_suite": null,
"tests_require": null,
"url": 0,
"use_2to3": null,
"verbose": 1,
"version": 0,
"want_user_cfg": true,
"zip_safe": null
}
}
+ tail -n +0 setup.cfg setup.py
==> setup.cfg <==
[metadata]
name = mypackage
version = 1.2.3
license = Mock License 1.0
This is a dummy license text to see how setuptools represents such content
stored inline in setup.cfg
==> setup.py <==
import setuptools
setuptools.setup()
+ python3 setup.py --license
Mock License 1.0
This is a dummy license text to see how setuptools represents such content
stored inline in setup.cfg
+ python3 setup.py dumpmeta
running dumpmeta
{
"__class__": "Distribution",
"methods": {
"announce": "<not getter>",
"dump_option_dicts": "<not getter>",
"exclude": "<not getter>",
"exclude_package": "<not getter>",
"fetch_build_egg": "<not getter>",
"fetch_build_eggs": "<not getter>",
"finalize_options": "<not getter>",
"find_config_files": "<not getter>",
"get_author": null,
"get_author_email": null,
"get_classifiers": [],
"get_cmdline_options": {},
"get_command_class": "<not callable>",
"get_command_list": [
[
"build",
"build everything needed to install"
],
[
"build_py",
"\"build\" pure Python modules (copy to build directory)"
],
[
"build_ext",
"build C/C++ extensions (compile/link to build directory)"
],
[
"build_clib",
"build C/C++ libraries used by Python extensions"
],
[
"build_scripts",
"\"build\" scripts (copy and fixup #! line)"
],
[
"clean",
"clean up temporary files from 'build' command"
],
[
"install",
"install everything from build directory"
],
[
"install_lib",
"install all Python modules (extensions and pure Python)"
],
[
"install_headers",
"install C/C++ header files"
],
[
"install_scripts",
"install scripts (Python or otherwise)"
],
[
"install_data",
"install data files"
],
[
"sdist",
"create a source distribution (tarball, zip file, etc.)"
],
[
"register",
"register the distribution with the Python package index"
],
[
"bdist",
"create a built (binary) distribution"
],
[
"bdist_dumb",
"create a \"dumb\" built distribution"
],
[
"bdist_rpm",
"create an RPM distribution"
],
[
"check",
"perform some checks on the package"
],
[
"upload",
"upload binary package to PyPI"
],
[
"dumpmeta",
"(no description available)"
],
[
"pyproject",
"(no description available)"
],
[
"alias",
"define a shortcut to invoke one or more commands"
],
[
"bdist_egg",
"create an \"egg\" distribution"
],
[
"develop",
"install package in 'development mode'"
],
[
"dist_info",
"DO NOT CALL DIRECTLY, INTERNAL ONLY: create .dist-info directory"
],
[
"easy_install",
"Find/get/install Python packages"
],
[
"editable_wheel",
"DO NOT CALL DIRECTLY, INTERNAL ONLY: create PEP 660 editable wheel"
],
[
"egg_info",
"create a distribution's .egg-info directory"
],
[
"install_egg_info",
"Install an .egg-info directory for the package"
],
[
"rotate",
"delete older distributions, keeping N newest files"
],
[
"saveopts",
"save supplied options to setup.cfg or other config file"
],
[
"setopt",
"set an option in setup.cfg or another config file"
],
[
"test",
"run unit tests after in-place build (deprecated)"
],
[
"upload_docs",
"Upload documentation to sites other than PyPi such as devpi"
]
],
"get_command_obj": "<not callable>",
"get_command_packages": [
"distutils.command"
],
"get_contact": null,
"get_contact_email": null,
"get_description": null,
"get_download_url": null,
"get_egg_cache_dir": "./.eggs",
"get_fullname": "mypackage-1.2.3",
"get_keywords": [],
"get_license": "Mock License 1.0\n\nThis is a dummy license text to see how setuptools represents such content\nstored inline in setup.cfg",
"get_long_description": null,
"get_maintainer": null,
"get_maintainer_email": null,
"get_name": "mypackage",
"get_obsoletes": [],
"get_option_dict": "<not callable>",
"get_platforms": null,
"get_provides": [],
"get_requires": [],
"get_url": null,
"get_version": "1.2.3",
"handle_display_options": "<not getter>",
"has_c_libraries": null,
"has_contents_for": "<not callable>",
"has_data_files": null,
"has_ext_modules": null,
"has_headers": null,
"has_modules": null,
"has_pure_modules": false,
"has_scripts": null,
"include": "<not getter>",
"is_pure": false,
"iter_distribution_names": "<not getter>",
"make_option_lowercase": "<not getter>",
"parse_command_line": "<not getter>",
"parse_config_files": "<not getter>",
"patch_missing_pkg_info": "<not getter>",
"print_command_list": "<not getter>",
"print_commands": "<not getter>",
"reinitialize_command": "<not getter>",
"run_command": "<not getter>",
"run_commands": "<not getter>",
"set_defaults": "<not getter>",
"warn_dash_deprecation": "<not getter>"
},
"properties": {
"author": 0,
"author_email": 0,
"classifiers": 0,
"cmdclass": {
"alias": "<class 'setuptools.command.alias.alias'>",
"bdist": "<class 'distutils.command.bdist.bdist'>",
"bdist_dumb": "<class 'distutils.command.bdist_dumb.bdist_dumb'>",
"bdist_egg": "<class 'setuptools.command.bdist_egg.bdist_egg'>",
"bdist_rpm": "<class 'setuptools.command.bdist_rpm.bdist_rpm'>",
"build": "<class 'setuptools.command.build.build'>",
"build_clib": "<class 'setuptools.command.build_clib.build_clib'>",
"build_ext": "<class 'setuptools.command.build_ext.build_ext'>",
"build_py": "<class 'setuptools.command.build_py.build_py'>",
"build_scripts": "<class 'distutils.command.build_scripts.build_scripts'>",
"check": "<class 'distutils.command.check.check'>",
"clean": "<class 'distutils.command.clean.clean'>",
"develop": "<class 'setuptools.command.develop.develop'>",
"dist_info": "<class 'setuptools.command.dist_info.dist_info'>",
"dumpmeta": "<class 'setuptools_pyproject_migration.dumpmeta.DumpMetadata'>",
"easy_install": "<class 'setuptools.command.easy_install.easy_install'>",
"editable_wheel": "<class 'setuptools.command.editable_wheel.editable_wheel'>",
"egg_info": "<class 'setuptools.command.egg_info.egg_info'>",
"install": "<class 'setuptools.command.install.install'>",
"install_data": "<class 'distutils.command.install_data.install_data'>",
"install_egg_info": "<class 'setuptools.command.install_egg_info.install_egg_info'>",
"install_headers": "<class 'distutils.command.install_headers.install_headers'>",
"install_lib": "<class 'setuptools.command.install_lib.install_lib'>",
"install_scripts": "<class 'setuptools.command.install_scripts.install_scripts'>",
"pyproject": "<class 'setuptools_pyproject_migration.WritePyproject'>",
"register": "<class 'distutils.command.register.register'>",
"rotate": "<class 'setuptools.command.rotate.rotate'>",
"saveopts": "<class 'setuptools.command.saveopts.saveopts'>",
"sdist": "<class 'setuptools.command.sdist.sdist'>",
"setopt": "<class 'setuptools.command.setopt.setopt'>",
"test": "<class 'setuptools.command.test.test'>",
"upload": "<class 'distutils.command.upload.upload'>",
"upload_docs": "<class 'setuptools.command.upload_docs.upload_docs'>"
},
"command_obj": {
"dumpmeta": "<setuptools_pyproject_migration.dumpmeta.DumpMetadata object at 0x7f7545a161d0>"
},
"command_options": {
"aliases": {},
"dumpmeta": {},
"metadata": {
"license": [
"setup.cfg",
"Mock License 1.0\n\nThis is a dummy license text to see how setuptools represents such content\nstored inline in setup.cfg"
],
"name": [
"setup.cfg",
"mypackage"
],
"version": [
"setup.cfg",
"1.2.3"
]
}
},
"command_packages": null,
"commands": [
"dumpmeta"
],
"common_usage": "Common commands: (see '--help-commands' for more)\n\n setup.py build will build the package underneath 'build/'\n setup.py install will install the package\n",
"contact": 0,
"contact_email": 0,
"data_files": null,
"dependency_links": [],
"description": 0,
"display_option_names": [
"help_commands",
"name",
"version",
"fullname",
"author",
"author_email",
"maintainer",
"maintainer_email",
"contact",
"contact_email",
"url",
"license",
"licence",
"description",
"long_description",
"platforms",
"classifiers",
"keywords",
"provides",
"requires",
"obsoletes"
],
"display_options": [
[
"help-commands",
null,
"list all available commands"
],
[
"name",
null,
"print package name"
],
[
"version",
"V",
"print package version"
],
[
"fullname",
null,
"print <package name>-<version>"
],
[
"author",
null,
"print the author's name"
],
[
"author-email",
null,
"print the author's email address"
],
[
"maintainer",
null,
"print the maintainer's name"
],
[
"maintainer-email",
null,
"print the maintainer's email address"
],
[
"contact",
null,
"print the maintainer's name if known, else the author's"
],
[
"contact-email",
null,
"print the maintainer's email address if known, else the author's"
],
[
"url",
null,
"print the URL for this package"
],
[
"license",
null,
"print the license of the package"
],
[
"licence",
null,
"alias for --license"
],
[
"description",
null,
"print the package description"
],
[
"long-description",
null,
"print the long package description"
],
[
"platforms",
null,
"print the list of platforms"
],
[
"classifiers",
null,
"print the list of classifiers"
],
[
"keywords",
null,
"print the list of keywords"
],
[
"provides",
null,
"print the list of packages/modules provided"
],
[
"requires",
null,
"print the list of packages/modules required"
],
[
"obsoletes",
null,
"print the list of packages/modules made obsolete"
]
],
"dist_files": [],
"dry_run": 0,
"eager_resources": null,
"entry_points": null,
"exclude_package_data": null,
"ext_modules": null,
"ext_package": null,
"extra_path": null,
"extras_require": {},
"fullname": 0,
"global_options": [
[
"verbose",
"v",
"run verbosely (default)",
1
],
[
"quiet",
"q",
"run quietly (turns verbosity off)"
],
[
"dry-run",
"n",
"don't actually do anything"
],
[
"help",
"h",
"show detailed help message"
],
[
"no-user-cfg",
null,
"ignore pydistutils.cfg in your home directory"
]
],
"have_run": {
"dumpmeta": 0
},
"headers": null,
"help": 0,
"help_commands": 0,
"include_dirs": null,
"include_package_data": null,
"install_requires": [],
"keywords": 0,
"libraries": null,
"licence": 0,
"license": 0,
"long_description": 0,
"maintainer": 0,
"maintainer_email": 0,
"metadata": {
"__class__": "DistributionMetadata",
"methods": {
"get_author": null,
"get_author_email": null,
"get_classifiers": [],
"get_contact": null,
"get_contact_email": null,
"get_description": null,
"get_download_url": null,
"get_fullname": "mypackage-1.2.3",
"get_keywords": [],
"get_licence": "Mock License 1.0\n\nThis is a dummy license text to see how setuptools represents such content\nstored inline in setup.cfg",
"get_license": "Mock License 1.0\n\nThis is a dummy license text to see how setuptools represents such content\nstored inline in setup.cfg",
"get_long_description": null,
"get_maintainer": null,
"get_maintainer_email": null,
"get_metadata_version": "<Version('2.1')>",
"get_name": "mypackage",
"get_obsoletes": [],
"get_platforms": null,
"get_provides": [],
"get_requires": [],
"get_url": null,
"get_version": "1.2.3",
"read_pkg_file": "<not getter>",
"set_classifiers": "<not getter>",
"set_keywords": "<not getter>",
"set_obsoletes": "<not getter>",
"set_platforms": "<not getter>",
"set_provides": "<not getter>",
"set_requires": "<not getter>",
"write_pkg_file": "<not getter>",
"write_pkg_info": "<not getter>"
},
"properties": {
"author": null,
"author_email": null,
"classifiers": null,
"description": null,
"download_url": null,
"keywords": null,
"license": "Mock License 1.0\n\nThis is a dummy license text to see how setuptools represents such content\nstored inline in setup.cfg",
"license_file": null,
"license_files": [],
"long_description": null,
"long_description_content_type": null,
"maintainer": null,
"maintainer_email": null,
"name": "mypackage",
"obsoletes": null,
"platforms": null,
"project_urls": {},
"provides": null,
"provides_extras": "OrderedSet()",
"requires": null,
"url": null,
"version": "1.2.3"
}
},
"name": 0,
"namespace_packages": null,
"negative_opt": {
"quiet": "verbose"
},
"obsoletes": 0,
"package_data": {},
"package_dir": {},
"packages": [],
"password": "",
"platforms": 0,
"provides": 0,
"py_modules": [],
"python_requires": null,
"requires": 0,
"script_args": [
"dumpmeta"
],
"script_name": "setup.py",
"scripts": null,
"setup_requires": [],
"src_root": null,
"test_loader": null,
"test_runner": null,
"test_suite": null,
"tests_require": null,
"url": 0,
"use_2to3": null,
"verbose": 1,
"version": 0,
"want_user_cfg": true,
"zip_safe": null
}
}
+ tail -n +0 LICENSE.txt setup.cfg setup.py
==> LICENSE.txt <==
Mock License 1.0
This is a dummy license text to see how setuptools represents such content
stored in a separate file referenced from setup.py
==> setup.cfg <==
[metadata]
name = mypackage
version = 1.2.3
license = file:LICENSE.txt
==> setup.py <==
import setuptools
setuptools.setup()
+ python3 setup.py --license
Traceback (most recent call last):
File "/home/stuartl/projects/setuptools-pyproject-migration/experiments/license/06-setupcfg-file/setup.py", line 3, in <module>
setuptools.setup()
File "/home/stuartl/projects/setuptools-pyproject-migration/env/lib/python3.11/site-packages/setuptools/__init__.py", line 107, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/stuartl/projects/setuptools-pyproject-migration/env/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 159, in setup
dist.parse_config_files()
File "/home/stuartl/projects/setuptools-pyproject-migration/env/lib/python3.11/site-packages/setuptools/dist.py", line 904, in parse_config_files
setupcfg.parse_configuration(
File "/home/stuartl/projects/setuptools-pyproject-migration/env/lib/python3.11/site-packages/setuptools/config/setupcfg.py", line 189, in parse_configuration
meta.parse()
File "/home/stuartl/projects/setuptools-pyproject-migration/env/lib/python3.11/site-packages/setuptools/config/setupcfg.py", line 500, in parse
section_parser_method(section_options)
File "/home/stuartl/projects/setuptools-pyproject-migration/env/lib/python3.11/site-packages/setuptools/config/setupcfg.py", line 475, in parse_section
self[name] = value
~~~~^^^^^^
File "/home/stuartl/projects/setuptools-pyproject-migration/env/lib/python3.11/site-packages/setuptools/config/setupcfg.py", line 293, in __setitem__
parsed = self.parsers.get(option_name, lambda x: x)(value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/stuartl/projects/setuptools-pyproject-migration/env/lib/python3.11/site-packages/setuptools/config/setupcfg.py", line 365, in parser
raise ValueError(
ValueError: Only strings are accepted for the license field, files are not accepted
+ tail -n +0 LICENSE.txt setup.cfg setup.py
==> LICENSE.txt <==
Mock License 1.0
This is a dummy license text to see how setuptools represents such content
stored in a separate file referenced from setup.py
==> setup.cfg <==
[metadata]
name = mypackage
version = 1.2.3
license_file = LICENSE.txt
==> setup.py <==
import setuptools
setuptools.setup()
+ python3 setup.py --license
/home/stuartl/projects/setuptools-pyproject-migration/env/lib/python3.11/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
!!
********************************************************************************
The license_file parameter is deprecated, use license_files instead.
By 2023-Oct-30, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
********************************************************************************
!!
parsed = self.parsers.get(option_name, lambda x: x)(value)
None
+ python3 setup.py dumpmeta
/home/stuartl/projects/setuptools-pyproject-migration/env/lib/python3.11/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
!!
********************************************************************************
The license_file parameter is deprecated, use license_files instead.
By 2023-Oct-30, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
********************************************************************************
!!
parsed = self.parsers.get(option_name, lambda x: x)(value)
running dumpmeta
{
"__class__": "Distribution",
"methods": {
"announce": "<not getter>",
"dump_option_dicts": "<not getter>",
"exclude": "<not getter>",
"exclude_package": "<not getter>",
"fetch_build_egg": "<not getter>",
"fetch_build_eggs": "<not getter>",
"finalize_options": "<not getter>",
"find_config_files": "<not getter>",
"get_author": null,
"get_author_email": null,
"get_classifiers": [],
"get_cmdline_options": {},
"get_command_class": "<not callable>",
"get_command_list": [
[
"build",
"build everything needed to install"
],
[
"build_py",
"\"build\" pure Python modules (copy to build directory)"
],
[
"build_ext",
"build C/C++ extensions (compile/link to build directory)"
],
[
"build_clib",
"build C/C++ libraries used by Python extensions"
],
[
"build_scripts",
"\"build\" scripts (copy and fixup #! line)"
],
[
"clean",
"clean up temporary files from 'build' command"
],
[
"install",
"install everything from build directory"
],
[
"install_lib",
"install all Python modules (extensions and pure Python)"
],
[
"install_headers",
"install C/C++ header files"
],
[
"install_scripts",
"install scripts (Python or otherwise)"
],
[
"install_data",
"install data files"
],
[
"sdist",
"create a source distribution (tarball, zip file, etc.)"
],
[
"register",
"register the distribution with the Python package index"
],
[
"bdist",
"create a built (binary) distribution"
],
[
"bdist_dumb",
"create a \"dumb\" built distribution"
],
[
"bdist_rpm",
"create an RPM distribution"
],
[
"check",
"perform some checks on the package"
],
[
"upload",
"upload binary package to PyPI"
],
[
"dumpmeta",
"(no description available)"
],
[
"pyproject",
"(no description available)"
],
[
"alias",
"define a shortcut to invoke one or more commands"
],
[
"bdist_egg",
"create an \"egg\" distribution"
],
[
"develop",
"install package in 'development mode'"
],
[
"dist_info",
"DO NOT CALL DIRECTLY, INTERNAL ONLY: create .dist-info directory"
],
[
"easy_install",
"Find/get/install Python packages"
],
[
"editable_wheel",
"DO NOT CALL DIRECTLY, INTERNAL ONLY: create PEP 660 editable wheel"
],
[
"egg_info",
"create a distribution's .egg-info directory"
],
[
"install_egg_info",
"Install an .egg-info directory for the package"
],
[
"rotate",
"delete older distributions, keeping N newest files"
],
[
"saveopts",
"save supplied options to setup.cfg or other config file"
],
[
"setopt",
"set an option in setup.cfg or another config file"
],
[
"test",
"run unit tests after in-place build (deprecated)"
],
[
"upload_docs",
"Upload documentation to sites other than PyPi such as devpi"
]
],
"get_command_obj": "<not callable>",
"get_command_packages": [
"distutils.command"
],
"get_contact": null,
"get_contact_email": null,
"get_description": null,
"get_download_url": null,
"get_egg_cache_dir": "./.eggs",
"get_fullname": "mypackage-1.2.3",
"get_keywords": [],
"get_license": null,
"get_long_description": null,
"get_maintainer": null,
"get_maintainer_email": null,
"get_name": "mypackage",
"get_obsoletes": [],
"get_option_dict": "<not callable>",
"get_platforms": null,
"get_provides": [],
"get_requires": [],
"get_url": null,
"get_version": "1.2.3",
"handle_display_options": "<not getter>",
"has_c_libraries": null,
"has_contents_for": "<not callable>",
"has_data_files": null,
"has_ext_modules": null,
"has_headers": null,
"has_modules": null,
"has_pure_modules": false,
"has_scripts": null,
"include": "<not getter>",
"is_pure": false,
"iter_distribution_names": "<not getter>",
"make_option_lowercase": "<not getter>",
"parse_command_line": "<not getter>",
"parse_config_files": "<not getter>",
"patch_missing_pkg_info": "<not getter>",
"print_command_list": "<not getter>",
"print_commands": "<not getter>",
"reinitialize_command": "<not getter>",
"run_command": "<not getter>",
"run_commands": "<not getter>",
"set_defaults": "<not getter>",
"warn_dash_deprecation": "<not getter>"
},
"properties": {
"author": 0,
"author_email": 0,
"classifiers": 0,
"cmdclass": {
"alias": "<class 'setuptools.command.alias.alias'>",
"bdist": "<class 'distutils.command.bdist.bdist'>",
"bdist_dumb": "<class 'distutils.command.bdist_dumb.bdist_dumb'>",
"bdist_egg": "<class 'setuptools.command.bdist_egg.bdist_egg'>",
"bdist_rpm": "<class 'setuptools.command.bdist_rpm.bdist_rpm'>",
"build": "<class 'setuptools.command.build.build'>",
"build_clib": "<class 'setuptools.command.build_clib.build_clib'>",
"build_ext": "<class 'setuptools.command.build_ext.build_ext'>",
"build_py": "<class 'setuptools.command.build_py.build_py'>",
"build_scripts": "<class 'distutils.command.build_scripts.build_scripts'>",
"check": "<class 'distutils.command.check.check'>",
"clean": "<class 'distutils.command.clean.clean'>",
"develop": "<class 'setuptools.command.develop.develop'>",
"dist_info": "<class 'setuptools.command.dist_info.dist_info'>",
"dumpmeta": "<class 'setuptools_pyproject_migration.dumpmeta.DumpMetadata'>",
"easy_install": "<class 'setuptools.command.easy_install.easy_install'>",
"editable_wheel": "<class 'setuptools.command.editable_wheel.editable_wheel'>",
"egg_info": "<class 'setuptools.command.egg_info.egg_info'>",
"install": "<class 'setuptools.command.install.install'>",
"install_data": "<class 'distutils.command.install_data.install_data'>",
"install_egg_info": "<class 'setuptools.command.install_egg_info.install_egg_info'>",
"install_headers": "<class 'distutils.command.install_headers.install_headers'>",
"install_lib": "<class 'setuptools.command.install_lib.install_lib'>",
"install_scripts": "<class 'setuptools.command.install_scripts.install_scripts'>",
"pyproject": "<class 'setuptools_pyproject_migration.WritePyproject'>",
"register": "<class 'distutils.command.register.register'>",
"rotate": "<class 'setuptools.command.rotate.rotate'>",
"saveopts": "<class 'setuptools.command.saveopts.saveopts'>",
"sdist": "<class 'setuptools.command.sdist.sdist'>",
"setopt": "<class 'setuptools.command.setopt.setopt'>",
"test": "<class 'setuptools.command.test.test'>",
"upload": "<class 'distutils.command.upload.upload'>",
"upload_docs": "<class 'setuptools.command.upload_docs.upload_docs'>"
},
"command_obj": {
"dumpmeta": "<setuptools_pyproject_migration.dumpmeta.DumpMetadata object at 0x7f728874c050>"
},
"command_options": {
"aliases": {},
"dumpmeta": {},
"metadata": {
"license_file": [
"setup.cfg",
"LICENSE.txt"
],
"name": [
"setup.cfg",
"mypackage"
],
"version": [
"setup.cfg",
"1.2.3"
]
}
},
"command_packages": null,
"commands": [
"dumpmeta"
],
"common_usage": "Common commands: (see '--help-commands' for more)\n\n setup.py build will build the package underneath 'build/'\n setup.py install will install the package\n",
"contact": 0,
"contact_email": 0,
"data_files": null,
"dependency_links": [],
"description": 0,
"display_option_names": [
"help_commands",
"name",
"version",
"fullname",
"author",
"author_email",
"maintainer",
"maintainer_email",
"contact",
"contact_email",
"url",
"license",
"licence",
"description",
"long_description",
"platforms",
"classifiers",
"keywords",
"provides",
"requires",
"obsoletes"
],
"display_options": [
[
"help-commands",
null,
"list all available commands"
],
[
"name",
null,
"print package name"
],
[
"version",
"V",
"print package version"
],
[
"fullname",
null,
"print <package name>-<version>"
],
[
"author",
null,
"print the author's name"
],
[
"author-email",
null,
"print the author's email address"
],
[
"maintainer",
null,
"print the maintainer's name"
],
[
"maintainer-email",
null,
"print the maintainer's email address"
],
[
"contact",
null,
"print the maintainer's name if known, else the author's"
],
[
"contact-email",
null,
"print the maintainer's email address if known, else the author's"
],
[
"url",
null,
"print the URL for this package"
],
[
"license",
null,
"print the license of the package"
],
[
"licence",
null,
"alias for --license"
],
[
"description",
null,
"print the package description"
],
[
"long-description",
null,
"print the long package description"
],
[
"platforms",
null,
"print the list of platforms"
],
[
"classifiers",
null,
"print the list of classifiers"
],
[
"keywords",
null,
"print the list of keywords"
],
[
"provides",
null,
"print the list of packages/modules provided"
],
[
"requires",
null,
"print the list of packages/modules required"
],
[
"obsoletes",
null,
"print the list of packages/modules made obsolete"
]
],
"dist_files": [],
"dry_run": 0,
"eager_resources": null,
"entry_points": null,
"exclude_package_data": null,
"ext_modules": null,
"ext_package": null,
"extra_path": null,
"extras_require": {},
"fullname": 0,
"global_options": [
[
"verbose",
"v",
"run verbosely (default)",
1
],
[
"quiet",
"q",
"run quietly (turns verbosity off)"
],
[
"dry-run",
"n",
"don't actually do anything"
],
[
"help",
"h",
"show detailed help message"
],
[
"no-user-cfg",
null,
"ignore pydistutils.cfg in your home directory"
]
],
"have_run": {
"dumpmeta": 0
},
"headers": null,
"help": 0,
"help_commands": 0,
"include_dirs": null,
"include_package_data": null,
"install_requires": [],
"keywords": 0,
"libraries": null,
"licence": 0,
"license": 0,
"long_description": 0,
"maintainer": 0,
"maintainer_email": 0,
"metadata": {
"__class__": "DistributionMetadata",
"methods": {
"get_author": null,
"get_author_email": null,
"get_classifiers": [],
"get_contact": null,
"get_contact_email": null,
"get_description": null,
"get_download_url": null,
"get_fullname": "mypackage-1.2.3",
"get_keywords": [],
"get_licence": null,
"get_license": null,
"get_long_description": null,
"get_maintainer": null,
"get_maintainer_email": null,
"get_metadata_version": "<Version('2.1')>",
"get_name": "mypackage",
"get_obsoletes": [],
"get_platforms": null,
"get_provides": [],
"get_requires": [],
"get_url": null,
"get_version": "1.2.3",
"read_pkg_file": "<not getter>",
"set_classifiers": "<not getter>",
"set_keywords": "<not getter>",
"set_obsoletes": "<not getter>",
"set_platforms": "<not getter>",
"set_provides": "<not getter>",
"set_requires": "<not getter>",
"write_pkg_file": "<not getter>",
"write_pkg_info": "<not getter>"
},
"properties": {
"author": null,
"author_email": null,
"classifiers": null,
"description": null,
"download_url": null,
"keywords": null,
"license": null,
"license_file": "LICENSE.txt",
"license_files": [
"LICENSE.txt"
],
"long_description": null,
"long_description_content_type": null,
"maintainer": null,
"maintainer_email": null,
"name": "mypackage",
"obsoletes": null,
"platforms": null,
"project_urls": {},
"provides": null,
"provides_extras": "OrderedSet()",
"requires": null,
"url": null,
"version": "1.2.3"
}
},
"name": 0,
"namespace_packages": null,
"negative_opt": {
"quiet": "verbose"
},
"obsoletes": 0,
"package_data": {},
"package_dir": {},
"packages": [],
"password": "",
"platforms": 0,
"provides": 0,
"py_modules": [],
"python_requires": null,
"requires": 0,
"script_args": [
"dumpmeta"
],
"script_name": "setup.py",
"scripts": null,
"setup_requires": [],
"src_root": null,
"test_loader": null,
"test_runner": null,
"test_suite": null,
"tests_require": null,
"url": 0,
"use_2to3": null,
"verbose": 1,
"version": 0,
"want_user_cfg": true,
"zip_safe": null
}
}
+ tail -n +0 LICENSE.txt setup.cfg setup.py
==> LICENSE.txt <==
Mock License 1.0
This is a dummy license text to see how setuptools represents such content
stored in a separate file referenced from setup.py
==> setup.cfg <==
[metadata]
name = mypackage
version = 1.2.3
license_files = LICENSE.txt
==> setup.py <==
import setuptools
setuptools.setup()
+ python3 setup.py --license
None
+ python3 setup.py dumpmeta
running dumpmeta
{
"__class__": "Distribution",
"methods": {
"announce": "<not getter>",
"dump_option_dicts": "<not getter>",
"exclude": "<not getter>",
"exclude_package": "<not getter>",
"fetch_build_egg": "<not getter>",
"fetch_build_eggs": "<not getter>",
"finalize_options": "<not getter>",
"find_config_files": "<not getter>",
"get_author": null,
"get_author_email": null,
"get_classifiers": [],
"get_cmdline_options": {},
"get_command_class": "<not callable>",
"get_command_list": [
[
"build",
"build everything needed to install"
],
[
"build_py",
"\"build\" pure Python modules (copy to build directory)"
],
[
"build_ext",
"build C/C++ extensions (compile/link to build directory)"
],
[
"build_clib",
"build C/C++ libraries used by Python extensions"
],
[
"build_scripts",
"\"build\" scripts (copy and fixup #! line)"
],
[
"clean",
"clean up temporary files from 'build' command"
],
[
"install",
"install everything from build directory"
],
[
"install_lib",
"install all Python modules (extensions and pure Python)"
],
[
"install_headers",
"install C/C++ header files"
],
[
"install_scripts",
"install scripts (Python or otherwise)"
],
[
"install_data",
"install data files"
],
[
"sdist",
"create a source distribution (tarball, zip file, etc.)"
],
[
"register",
"register the distribution with the Python package index"
],
[
"bdist",
"create a built (binary) distribution"
],
[
"bdist_dumb",
"create a \"dumb\" built distribution"
],
[
"bdist_rpm",
"create an RPM distribution"
],
[
"check",
"perform some checks on the package"
],
[
"upload",
"upload binary package to PyPI"
],
[
"dumpmeta",
"(no description available)"
],
[
"pyproject",
"(no description available)"
],
[
"alias",
"define a shortcut to invoke one or more commands"
],
[
"bdist_egg",
"create an \"egg\" distribution"
],
[
"develop",
"install package in 'development mode'"
],
[
"dist_info",
"DO NOT CALL DIRECTLY, INTERNAL ONLY: create .dist-info directory"
],
[
"easy_install",
"Find/get/install Python packages"
],
[
"editable_wheel",
"DO NOT CALL DIRECTLY, INTERNAL ONLY: create PEP 660 editable wheel"
],
[
"egg_info",
"create a distribution's .egg-info directory"
],
[
"install_egg_info",
"Install an .egg-info directory for the package"
],
[
"rotate",
"delete older distributions, keeping N newest files"
],
[
"saveopts",
"save supplied options to setup.cfg or other config file"
],
[
"setopt",
"set an option in setup.cfg or another config file"
],
[
"test",
"run unit tests after in-place build (deprecated)"
],
[
"upload_docs",
"Upload documentation to sites other than PyPi such as devpi"
]
],
"get_command_obj": "<not callable>",
"get_command_packages": [
"distutils.command"
],
"get_contact": null,
"get_contact_email": null,
"get_description": null,
"get_download_url": null,
"get_egg_cache_dir": "./.eggs",
"get_fullname": "mypackage-1.2.3",
"get_keywords": [],
"get_license": null,
"get_long_description": null,
"get_maintainer": null,
"get_maintainer_email": null,
"get_name": "mypackage",
"get_obsoletes": [],
"get_option_dict": "<not callable>",
"get_platforms": null,
"get_provides": [],
"get_requires": [],
"get_url": null,
"get_version": "1.2.3",
"handle_display_options": "<not getter>",
"has_c_libraries": null,
"has_contents_for": "<not callable>",
"has_data_files": null,
"has_ext_modules": null,
"has_headers": null,
"has_modules": null,
"has_pure_modules": false,
"has_scripts": null,
"include": "<not getter>",
"is_pure": false,
"iter_distribution_names": "<not getter>",
"make_option_lowercase": "<not getter>",
"parse_command_line": "<not getter>",
"parse_config_files": "<not getter>",
"patch_missing_pkg_info": "<not getter>",
"print_command_list": "<not getter>",
"print_commands": "<not getter>",
"reinitialize_command": "<not getter>",
"run_command": "<not getter>",
"run_commands": "<not getter>",
"set_defaults": "<not getter>",
"warn_dash_deprecation": "<not getter>"
},
"properties": {
"author": 0,
"author_email": 0,
"classifiers": 0,
"cmdclass": {
"alias": "<class 'setuptools.command.alias.alias'>",
"bdist": "<class 'distutils.command.bdist.bdist'>",
"bdist_dumb": "<class 'distutils.command.bdist_dumb.bdist_dumb'>",
"bdist_egg": "<class 'setuptools.command.bdist_egg.bdist_egg'>",
"bdist_rpm": "<class 'setuptools.command.bdist_rpm.bdist_rpm'>",
"build": "<class 'setuptools.command.build.build'>",
"build_clib": "<class 'setuptools.command.build_clib.build_clib'>",
"build_ext": "<class 'setuptools.command.build_ext.build_ext'>",
"build_py": "<class 'setuptools.command.build_py.build_py'>",
"build_scripts": "<class 'distutils.command.build_scripts.build_scripts'>",
"check": "<class 'distutils.command.check.check'>",
"clean": "<class 'distutils.command.clean.clean'>",
"develop": "<class 'setuptools.command.develop.develop'>",
"dist_info": "<class 'setuptools.command.dist_info.dist_info'>",
"dumpmeta": "<class 'setuptools_pyproject_migration.dumpmeta.DumpMetadata'>",
"easy_install": "<class 'setuptools.command.easy_install.easy_install'>",
"editable_wheel": "<class 'setuptools.command.editable_wheel.editable_wheel'>",
"egg_info": "<class 'setuptools.command.egg_info.egg_info'>",
"install": "<class 'setuptools.command.install.install'>",
"install_data": "<class 'distutils.command.install_data.install_data'>",
"install_egg_info": "<class 'setuptools.command.install_egg_info.install_egg_info'>",
"install_headers": "<class 'distutils.command.install_headers.install_headers'>",
"install_lib": "<class 'setuptools.command.install_lib.install_lib'>",
"install_scripts": "<class 'setuptools.command.install_scripts.install_scripts'>",
"pyproject": "<class 'setuptools_pyproject_migration.WritePyproject'>",
"register": "<class 'distutils.command.register.register'>",
"rotate": "<class 'setuptools.command.rotate.rotate'>",
"saveopts": "<class 'setuptools.command.saveopts.saveopts'>",
"sdist": "<class 'setuptools.command.sdist.sdist'>",
"setopt": "<class 'setuptools.command.setopt.setopt'>",
"test": "<class 'setuptools.command.test.test'>",
"upload": "<class 'distutils.command.upload.upload'>",
"upload_docs": "<class 'setuptools.command.upload_docs.upload_docs'>"
},
"command_obj": {
"dumpmeta": "<setuptools_pyproject_migration.dumpmeta.DumpMetadata object at 0x7f0157754a10>"
},
"command_options": {
"aliases": {},
"dumpmeta": {},
"metadata": {
"license_files": [
"setup.cfg",
"LICENSE.txt"
],
"name": [
"setup.cfg",
"mypackage"
],
"version": [
"setup.cfg",
"1.2.3"
]
}
},
"command_packages": null,
"commands": [
"dumpmeta"
],
"common_usage": "Common commands: (see '--help-commands' for more)\n\n setup.py build will build the package underneath 'build/'\n setup.py install will install the package\n",
"contact": 0,
"contact_email": 0,
"data_files": null,
"dependency_links": [],
"description": 0,
"display_option_names": [
"help_commands",
"name",
"version",
"fullname",
"author",
"author_email",
"maintainer",
"maintainer_email",
"contact",
"contact_email",
"url",
"license",
"licence",
"description",
"long_description",
"platforms",
"classifiers",
"keywords",
"provides",
"requires",
"obsoletes"
],
"display_options": [
[
"help-commands",
null,
"list all available commands"
],
[
"name",
null,
"print package name"
],
[
"version",
"V",
"print package version"
],
[
"fullname",
null,
"print <package name>-<version>"
],
[
"author",
null,
"print the author's name"
],
[
"author-email",
null,
"print the author's email address"
],
[
"maintainer",
null,
"print the maintainer's name"
],
[
"maintainer-email",
null,
"print the maintainer's email address"
],
[
"contact",
null,
"print the maintainer's name if known, else the author's"
],
[
"contact-email",
null,
"print the maintainer's email address if known, else the author's"
],
[
"url",
null,
"print the URL for this package"
],
[
"license",
null,
"print the license of the package"
],
[
"licence",
null,
"alias for --license"
],
[
"description",
null,
"print the package description"
],
[
"long-description",
null,
"print the long package description"
],
[
"platforms",
null,
"print the list of platforms"
],
[
"classifiers",
null,
"print the list of classifiers"
],
[
"keywords",
null,
"print the list of keywords"
],
[
"provides",
null,
"print the list of packages/modules provided"
],
[
"requires",
null,
"print the list of packages/modules required"
],
[
"obsoletes",
null,
"print the list of packages/modules made obsolete"
]
],
"dist_files": [],
"dry_run": 0,
"eager_resources": null,
"entry_points": null,
"exclude_package_data": null,
"ext_modules": null,
"ext_package": null,
"extra_path": null,
"extras_require": {},
"fullname": 0,
"global_options": [
[
"verbose",
"v",
"run verbosely (default)",
1
],
[
"quiet",
"q",
"run quietly (turns verbosity off)"
],
[
"dry-run",
"n",
"don't actually do anything"
],
[
"help",
"h",
"show detailed help message"
],
[
"no-user-cfg",
null,
"ignore pydistutils.cfg in your home directory"
]
],
"have_run": {
"dumpmeta": 0
},
"headers": null,
"help": 0,
"help_commands": 0,
"include_dirs": null,
"include_package_data": null,
"install_requires": [],
"keywords": 0,
"libraries": null,
"licence": 0,
"license": 0,
"long_description": 0,
"maintainer": 0,
"maintainer_email": 0,
"metadata": {
"__class__": "DistributionMetadata",
"methods": {
"get_author": null,
"get_author_email": null,
"get_classifiers": [],
"get_contact": null,
"get_contact_email": null,
"get_description": null,
"get_download_url": null,
"get_fullname": "mypackage-1.2.3",
"get_keywords": [],
"get_licence": null,
"get_license": null,
"get_long_description": null,
"get_maintainer": null,
"get_maintainer_email": null,
"get_metadata_version": "<Version('2.1')>",
"get_name": "mypackage",
"get_obsoletes": [],
"get_platforms": null,
"get_provides": [],
"get_requires": [],
"get_url": null,
"get_version": "1.2.3",
"read_pkg_file": "<not getter>",
"set_classifiers": "<not getter>",
"set_keywords": "<not getter>",
"set_obsoletes": "<not getter>",
"set_platforms": "<not getter>",
"set_provides": "<not getter>",
"set_requires": "<not getter>",
"write_pkg_file": "<not getter>",
"write_pkg_info": "<not getter>"
},
"properties": {
"author": null,
"author_email": null,
"classifiers": null,
"description": null,
"download_url": null,
"keywords": null,
"license": null,
"license_file": null,
"license_files": [
"LICENSE.txt"
],
"long_description": null,
"long_description_content_type": null,
"maintainer": null,
"maintainer_email": null,
"name": "mypackage",
"obsoletes": null,
"platforms": null,
"project_urls": {},
"provides": null,
"provides_extras": "OrderedSet()",
"requires": null,
"url": null,
"version": "1.2.3"
}
},
"name": 0,
"namespace_packages": null,
"negative_opt": {
"quiet": "verbose"
},
"obsoletes": 0,
"package_data": {},
"package_dir": {},
"packages": [],
"password": "",
"platforms": 0,
"provides": 0,
"py_modules": [],
"python_requires": null,
"requires": 0,
"script_args": [
"dumpmeta"
],
"script_name": "setup.py",
"scripts": null,
"setup_requires": [],
"src_root": null,
"test_loader": null,
"test_runner": null,
"test_suite": null,
"tests_require": null,
"url": 0,
"use_2to3": null,
"verbose": 1,
"version": 0,
"want_user_cfg": true,
"zip_safe": null
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment