Software Metadata for Humans
Project description
About - Metadata for Setuptools
Define the metadata of your project in a single place, then make it available in the setup and at runtime.
The standard pattern, for a simple module myproject, is to define an extra metadata module about_myproject:
# about_myproject.py
"""
My Project Summary
My Project Long Description
"""
metadata = dict(
__appname__ = "myproject",
__version__ = "1.0.0",
__license__ = "MIT License",
__author__ = u"Sébastien Boisgérault <Sebastien.Boisgerault@gmail.com>",
__url__ = "https://warehouse.python.org/project/about",
__doc__ = __doc__,
__docformat__ = "markdown",
__classifiers__ = ["Programming Language :: Python :: 2.7",
"Topic :: Software Development",
"License :: OSI Approved :: MIT License"]
)
globals().update(metadata)
__all__ = metadata.keys()
Then, in myproject.py, you add a metadata section
# Metadata from .about_myproject import *
and finally, in your setup.py file, use the following code:
import setuptools
import about
import .about_myproject
info = about.get_metadata(about_myproject)
# add extra information (contents, requirements, etc.) for the setup.
info.update(...)
if __name__ == "__main__":
setuptools.setup(**info)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
about-4.0.0-alpha.4.tar.gz
(38.5 kB
view details)
File details
Details for the file about-4.0.0-alpha.4.tar.gz.
File metadata
- Download URL: about-4.0.0-alpha.4.tar.gz
- Upload date:
- Size: 38.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5dca223af7bd05dc631ee146bf931fe06fde2c71edcb3ed8e6b4a963ebf737f4
|
|
| MD5 |
4f37ef32d9b004c93392f6c3cbbc4c95
|
|
| BLAKE2b-256 |
3a00e07c96ffa091b430a7ba674dc8aba8f84b2ddfa6310a70c3ad42d4d6977f
|